Explorar o código

Merge branch 'test' of git.oschina.net:yiguanjia/php into test

north %!s(int64=7) %!d(string=hai) anos
pai
achega
f46204d6cf

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
www/webapp/housekeeping/home/static/css/app.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
www/webapp/housekeeping/home/static/js/app.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
www/webapp/housekeeping/home/static/js/app.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
www/webapp/housekeeping/home/static/js/manifest.js.map


+ 0 - 4
www/webapp/housekeeping/src/App.vue

@@ -9,10 +9,6 @@
   export default {
     name: 'app',
     carted(){
-      // 用户是否为管理员
-      if (config.user_id == '582405cea84ea02e3e8b4611') {
-        this.$router.push({path: '/managementList'});
-      }
     }
   }
 </script>

+ 4 - 1
www/webapp/housekeeping/src/components/Home.vue

@@ -62,7 +62,10 @@
     created() {
 //      console.log(config)
       init();
-
+      // 用户是否为管理员
+      if (config.user_id === '57e238929f5160d6048b456d') {
+        this.$router.push({path: '/managementList'});
+      }
       function init() {
         setTimeout(function () {
           let hBox = document.querySelector('.h-box').clientHeight;

+ 18 - 8
www/webapp/housekeeping/src/components/management/list.vue

@@ -51,7 +51,8 @@
           {label: '做一休一', value: 1},
           {label: '做五休二', value: 3},
           {label: '做六休一', value: 4,}
-        ]
+        ],
+        storeId: null
       }
     },
     created() {
@@ -59,15 +60,24 @@
       _.oldOrderInfo = null;
       let that = this;
       _.auth = null;
-      axios.post(_.apiPath + '/j/HouseKeeping/list').then(res => {
-        if (res.status === 200) {
-          that.oldOrderList = res.data.rows;
-          for (let i = 0; i < that.oldOrderList.length; i++) {
-            that.oldOrderList[i].time = _.timetrans(that.oldOrderList[i].time)
+      axios.post(_.apiPath + '/j/HouseKeeping/GetUser&user_id=' + _.user_id).then(res => {
+        that.storeId = res.data.store_id;
+        setTimeout(function () {
+          if (that.storeId) {
+            axios.post(_.apiPath + '/j/HouseKeeping/list&store_id=' + that.storeId).then(res => {
+              if (res.status === 200) {
+                that.oldOrderList = res.data.rows;
+                for (let i = 0; i < that.oldOrderList.length; i++) {
+                  that.oldOrderList[i].time = _.timetrans(that.oldOrderList[i].time)
+                }
+                that.tabF(0);
+              }
+            })
           }
-          this.tabF(0);
-        }
+        }, 100)
+
       })
+
     },
     methods: {
       tabF(index) {

+ 48 - 5
www/webapp/housekeeping/src/components/reservation.vue

@@ -44,6 +44,15 @@
           </div>
           <div class="weui-cell__ft"><i class="weui-icon-warn"></i></div>
         </div>
+        <!--所属门店-->
+        <div class="weui-cell">
+          <div class="weui-cell__hd"><label class="weui-label">门店选择</label></div>
+          <div class="weui-cell__bd" @click='btnStore'>
+            <input class="weui-input select-time" type="button" required=""
+                   :value="store">
+          </div>
+          <div class="weui-cell__ft"><i class="weui-icon-warn"></i></div>
+        </div>
         <!--服务形式-->
         <div class="weui-cell" v-if="serviceType == 0">
           <div class="weui-cell__hd"><label class="weui-label">服务形式</label></div>
@@ -115,6 +124,9 @@
         number: '', // 客户手机
         oldNumber: '', // 客户手机已验证
         userAddress: '', // 服务地址
+        store: '请选择门店', // 门店
+        storeId: '', // 门店ID
+        storeArr: [], // 门店
         userAge: '', // 孩子年龄
         dec: '', // 备注
         time: '选择您的预产期', // 预产期
@@ -178,13 +190,14 @@
 //          }
     },
     created() {
-
-      console.log(time('15:00')); // 字符串转时间戳
       this.createCode = createCode();
       this.serviceType = config.serviceType;
       for (let i = 9; i < 20; i++) {
         this.serviceTimeArr.push(i + ':00');
       }
+      axios.post(config.apiPath + 'j/HouseKeeping/GetStore').then(res => {
+        this.storeArr = res.data;
+      })
     },
     methods: {
       // 服务技能
@@ -202,6 +215,31 @@
           id: 'serviceSkillsArr'
         });
       },
+      // 门店选择
+      btnStore() {
+        let that = this;
+        console.log(that.storeArr[0]);
+        let newStoreArr = [];
+        for (let i = 0; i < that.storeArr.length; i++) {
+          newStoreArr.push({
+            label:that.storeArr[i].store_name,
+            value:that.storeArr[i].store_id
+          })
+        }
+        // store
+        weui.picker(newStoreArr, {
+          className: 'custom-classname',
+          container: 'body',
+          defaultValue: [0],
+          onChange: function (result) {
+          },
+          onConfirm: function (result) {
+            that.store = result[0].label;
+            that.storeId = result[0].value;
+          },
+          id: 'singleLinePickerStore'
+        });
+      },
       // 时间选择
       btnServiceAM() {
         let that = this;
@@ -285,7 +323,7 @@
               weui.alert('短信已发送,请留意查收!');
               // 绑定短信验证码
               this.code = res.data.data.code;
-               this.iCode = this.code // 系统调试时开启
+              this.iCode = this.code // 系统调试时开启
               this.iCreateCode = '';// 清空已输入验证码
               this.createCode = createCode(); // 重置验证码
             } else {
@@ -319,6 +357,11 @@
           weui.alert('请输入您的服务地址');
           return
         }
+        // 门店验证
+          if(that.store ==  '请选择门店'){
+            weui.alert('请选择您的小区附近的门店');
+            return
+          }
         // 服务形式
         if (that.serviceType === 0) {
           if (that.serviceForm === '请选择') {
@@ -326,7 +369,7 @@
             return
           }
         } else {
-          that.serviceForm = 0
+          that.resServiceArr = 1
         }
         // 服务时间
         if (that.serviceType === 0) {
@@ -359,7 +402,7 @@
           that.userAge = 1
         }
         // 字符串拼接
-        let stitching = `&user_id=${config.user_id}&mobile=${that.number}&user_name=${that.userName}&type=${that.serviceType + 1}&skill=${that.serviceSkills}&cart=${that.resServiceArr}&age=${that.userAge}&address=${that.userAddress}&desc=${that.dec}&yc_time=${that.resTime}&server_start_time=${time(that.serviceTimeAM)}&server_end_time=${time(that.serviceTimePM)}`;
+        let stitching = `&user_id=${config.user_id}&mobile=${that.number}&user_name=${that.userName}&type=${that.serviceType + 1}&skill=${that.serviceSkills}&cart=${that.resServiceArr}&age=${that.userAge}&address=${that.userAddress}&store_id=${that.storeId}&desc=${that.dec}&yc_time=${that.resTime}&server_start_time=${time(that.serviceTimeAM)}&server_end_time=${time(that.serviceTimePM)}`;
         if (that)
           axios.post(config.apiPath + 'j/HouseKeeping/Add' + stitching).then(res => {
             console.log(res);

+ 7 - 3
www/webapp/housekeeping/src/config/index.js

@@ -9,7 +9,8 @@ if (locationHref.indexOf('common.yiguanjia.me') > -1) {
 // 正式开发判断test还是pro
 if (test) {
   apiPath = 'http://commontest.yiguanjia.me/index.php?r='
-  userId = '57e38f1b9f5160ac048b457d'
+  // userId = '57e38f1b9f5160ac048b457d'
+  userId = '57e238929f5160d6048b456d' // 管理员
 } else {
   apiPath = 'http://common.yiguanjia.me/index.php?r='
   userId = localStorage.getItem('wxUserID')
@@ -18,10 +19,13 @@ if (test) {
 if (locationHref.indexOf('http://localhost:8080/') > -1) {
   apiPath = 'http://commontest.yiguanjia.me/index.php?r='
   // userId = '57fe2dc59f5160a1048b4591' // 享月会
-  userId = '582405cea84ea02e3e8b4611' // 养老院
+  // userId = '582405cea84ea02e3e8b4611' // 养老院
+  userId = '57e238929f5160d6048b456d' // 管理员
 } else if (locationHref.indexOf('admin.yiguanjiadev.me') > -1) {
   apiPath = 'http://admin.yiguanjiadev.me/index.php?r='
-  userId = '57fe2dc59f5160a1048b4591'
+  // userId = '57fe2dc59f5160a1048b4591'; // 享月会
+
+  userId = '57e238929f5160d6048b456d'; // 管理员
 }
 // 时间戳 => 正常日期
 let timetrans = function (d) {

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio