seam 7 năm trước cách đây
mục cha
commit
8b296135a1

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/housekeeping/home/static/css/app.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/housekeeping/home/static/js/app.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/housekeeping/home/static/js/app.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/housekeeping/home/static/js/manifest.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/housekeeping/home/static/js/vendor.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/housekeeping/home/static/js/vendor.js.map


+ 8 - 1
www/webapp/housekeeping/src/App.vue

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

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

@@ -75,10 +75,6 @@
       }
 
       console.log(config.user_id);
-      // 用户是否为管理员
-      if (config.user_id == '582405cea84ea02e3e8b4611') {
-        this.$router.push({path: '/managementList'});
-      }
     }
   }
 

+ 98 - 25
www/webapp/housekeeping/src/components/management/edit.vue

@@ -18,8 +18,11 @@
         <div><span class="title">服务技能:</span>{{order.skill_str}}</div>
         <div v-if='order.type - 1 == 1'><span class="title">预产期:</span>{{order.yc_time}}</div>
         <div v-if='order.type -1 == 2'><span class="title">孩子年龄:</span>{{order.age}}岁</div>
-        <div><span class="title">预约状态:</span>{{order.contract_str}}</div>
-        <div>
+        <!--showContract  btnContract-->
+        <div v-if="!showContract"><span class="title">签约状态:</span>{{order.contract_str}}</div>
+        <div v-if="showContract"><span class="title">签约状态:</span><span @click='btnContract'>{{contractStr}}</span></div>
+        <!--预约日期-->
+        <div v-if="!showStatus">
           <!--选择时间-->
           <datetime v-model="bookingTime" format="YYYY-MM-DD HH:00"
                     @on-change="change" :title="('预约日期:')" year-row="{value}年" month-row="{value}月" day-row="{value}日"
@@ -28,10 +31,13 @@
                     placeholder="请选择日期"
                     :end-date='endDate' :min-hour=9 :max-hour=18></datetime>
         </div>
-        <div>
+        <div v-if="showStatus"><span class="title">预约日期:</span>{{order.status_time}}</div>
+        <!--家政员-->
+        <div v-if="!showTech">
           <span class="title">家政员:</span><span><input v-model="tech" class="tech" type="text"
                                                       placeholder='请输入家政员'></span>
         </div>
+        <div v-if='showTech'><span class="title">家政员:</span>{{order.tech}}</div>
         <div><span class="title">备注:</span>{{order.desc}}</div>
       </div>
       <div class="m-btn">
@@ -58,26 +64,44 @@
         value: ['2017-06-24', '03', '05'], // 设定日期格式
         startDate: selectTime.startDate, // 限定最小日期
         endDate: '', // 限定最大日期
-        tech: ''
+        tech: '',
+        showTech: false, // 家政员
+        showContract: false, // 签约状态
+        contractStr: '未签约',
+        contractStrArr: [],
+        showStatus: false // 预约状态
       }
     },
     created() {
-      console.log(selectTime.endDate)
+
+//      console.log(_.oldOrderInfo)
       if (_.oldOrderInfo === undefined) {
         this.$router.push({path: '/managementList'})
       }
       this.order = _.oldOrderInfo;
+      console.log(this.order);
       // 转化时间格式
-      this.order.yc_time = _.timetrans(this.order.yc_time); // 预产期
-      this.order.yc_time = this.order.yc_time.substring(0, 10); // 预产期
-      this.order.server_start_time = _.timetrans(this.order.server_start_time);
-      this.order.server_start_time = this.order.server_start_time.substring(11, 16);
-      this.order.server_end_time = _.timetrans(this.order.server_end_time);
-      this.order.server_end_time = this.order.server_end_time.substring(11, 16);
-      this.order.status_time = _.timetrans(this.order.status_time);
+      /*     this.order.yc_time = _.timetrans(this.order.yc_time); // 预产期
+           this.order.yc_time = this.order.yc_time.substring(0, 10); // 预产期
+           this.order.server_start_time = _.timetrans(this.order.server_start_time);
+           this.order.server_start_time = this.order.server_start_time.substring(11, 16);
+           this.order.server_end_time = _.timetrans(this.order.server_end_time);
+           this.order.server_end_time = this.order.server_end_time.substring(11, 16);
+           this.order.status_time = _.timetrans(this.order.status_time);*/
       if (this.order.status - 1 == 0) {
         this.eAppointmentDate = true
       }
+      if (this.order.tech.length > 0) {
+        this.showTech = true;
+      }
+      if (this.order.status !== 1) {
+        this.showStatus = true;
+      }
+      if (this.order.contract == 1 && this.order.status == 2) {
+        this.showContract = true;
+      }
+      // showContract
+      console.log()
     },
     components: {
       Group,
@@ -85,29 +109,74 @@
       XButton
     },
     methods: {
+      btnContract() {
+        let that = this;
+        weui.picker([
+          {
+            label: '未签约',
+            value: 0,
+            disabled: true // 不可用
+          },
+          {
+            label: '已签约',
+            value: 1
+          },
+        ], {
+          className: 'custom-classname',
+          container: 'body',
+          defaultValue: [0],
+          onChange: function (result) {
+//            console.log(result)
+          },
+          onConfirm: function (result) {
+//            console.log(result)
+            that.contractStr = result[0].label;
+            that.contractStrArr = result[0];
+          },
+          id: 'singleLinePicker'
+        });
+      },
       btnSubmint() {
         let that = this;
-        if (that.bookingTime.length == 0) {
+        if (that.bookingTime.length == 0 && !that.showStatus) {
           weui.alert('请选择预约日期');
           return
         }
-        if (that.tech.length == 0) {
+        if (that.tech.length == 0 && !that.showTech) {
           weui.alert('请输入家政人员');
           return
         }
-        // 字符串拼接
-        let stitching = `&id=${_.oldOrderInfo.id}&status=2&status_time=${ycTime(this.bookingTime)}&tech=${this.tech}`;
-        axios.post(_.apiPath + 'j/HouseKeeping/Edit' + stitching).then(res => {
-          if (res.data.success) {
-            weui.alert('提交成功',function () {
-              that.$router.push({path:'/managementList'})
-            });
-            return
-          } else {
-            weui.alert('提交失败');
+        if (this.order.contract == 1 && this.order.status == 2) {
+          if (this.contractStr !== '已签约') {
+            weui.alert('请签约状态');
             return
           }
-        })
+          let stitching = `&id=${_.oldOrderInfo.id}&contract=2&status=3`;
+          axios.post(_.apiPath + 'j/HouseKeeping/Edit' + stitching).then(res => {
+            if (res.data.success) {
+              weui.alert('提交成功', function () {
+                that.$router.push({path: '/managementList'})
+              });
+              return
+            } else {
+              weui.alert('提交失败');
+              return
+            }
+          })
+        } else {
+          let stitching = `&id=${_.oldOrderInfo.id}&status=2&status_time=${ycTime(this.bookingTime)}&tech=${this.tech}`;
+          axios.post(_.apiPath + 'j/HouseKeeping/Edit' + stitching).then(res => {
+            if (res.data.success) {
+              weui.alert('提交成功', function () {
+                that.$router.push({path: '/managementList'})
+              });
+              return
+            } else {
+              weui.alert('提交失败');
+              return
+            }
+          })
+        }
       },
       change(val) {
         this.bookingTime = val;
@@ -160,6 +229,10 @@
         display: inline-block;
         margin-right: 20px;
       }
+      & > span:nth-child(2) {
+        width: 70%;
+        display: inline-block;
+      }
     }
   }
 

+ 13 - 2
www/webapp/housekeeping/src/components/management/list.vue

@@ -91,8 +91,19 @@
         }, 200);
       },
       btnEditOrder(item) {
-        _.oldOrderInfo = item;
-        this.$router.push({path: '/managementEdit'})
+        let that = this;
+        // 转化时间格式
+        item.yc_time = _.timetrans(item.yc_time); // 预产期
+        item.yc_time = item.yc_time.substring(0, 10); // 预产期
+        item.server_start_time = _.timetrans(item.server_start_time);
+        item.server_start_time = item.server_start_time.substring(11, 16);
+        item.server_end_time = _.timetrans(item.server_end_time);
+        item.server_end_time = item.server_end_time.substring(11, 16);
+        item.status_time = _.timetrans(item.status_time);
+        setTimeout(function () {
+          _.oldOrderInfo = item;
+          that.$router.push({path: '/managementEdit'})
+        }, 100);
       }
     }
   }

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

@@ -127,12 +127,13 @@
         iCodeShow: true, // show短信验证码
         serviceType: null,
         serviceArr: [
-          {label: '做一休一', value: 1},
+          {label: '做一休一', value: 2},
           {label: '做五休二', value: 3},
           {label: '做六休一', value: 4,}
         ],
         resServiceArr: null, // 已选服务形式集合
         serviceForm: '请选择', // 服务形式
+        serviceFormText: null, // 服务形式
         serviceTimeArr: [], // 服务时间
         serviceTimeAM: '开始时间',
         serviceTimePM: '结束时间',
@@ -241,8 +242,7 @@
           },
           onConfirm: function (result) {
             that.serviceForm = result[0].label;
-            that.resServiceArr = result[0];
-            console.log(result[0].label);
+            that.resServiceArr = result[0].value;
           },
           id: 'singleLinePicker'
         });
@@ -285,7 +285,7 @@
               weui.alert('短信已发送,请留意查收!');
               // 绑定短信验证码
               this.code = res.data.data.code;
-              // this.iCode = this.code // 系统调试时开启
+               this.iCode = this.code // 系统调试时开启
               this.iCreateCode = '';// 清空已输入验证码
               this.createCode = createCode(); // 重置验证码
             } else {
@@ -359,7 +359,7 @@
           that.userAge = 1
         }
         // 字符串拼接
-        let stitching = `&user_id=${config.user_id}&mobile=${that.number}&user_name=${that.userName}&type=${that.serviceType}&skill=${that.serviceSkills}&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}&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);

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác