Browse Source

预约优化

zhanghui 2 years ago
parent
commit
264996bd4b
2 changed files with 19 additions and 6 deletions
  1. 14 3
      orderPages/bookService/index.vue
  2. 5 3
      orderPages/serviceTeacher/index.vue

+ 14 - 3
orderPages/bookService/index.vue

@@ -223,7 +223,7 @@ export default {
     this.userInfo = uni.getStorageSync('userInfo')
     this.userInfo = uni.getStorageSync('userInfo')
     // this.storeAllServiceList()
     // this.storeAllServiceList()
     this.category()
     this.category()
-    this.selectDate()
+    // this.selectDate()
   },
   },
 
 
   onShow() {
   onShow() {
@@ -447,7 +447,10 @@ export default {
       console.log("a->", this.periodTimeIndex)
       console.log("a->", this.periodTimeIndex)
       console.log("b->", this.periodTimeList)
       console.log("b->", this.periodTimeList)
       uni.navigateTo({
       uni.navigateTo({
-        url: '/orderPages/serviceTeacher/index?organization=' + this.store.storeId + '&schedulingDate=' + this.periodDateList[this.periodDateIndex].label + '&time=' + this.periodTimeList[this.periodTimeIndex].value
+        url: '/orderPages/serviceTeacher/index?organization=' + this.store.storeId
+                + '&schedulingDate=' + this.periodDateList[this.periodDateIndex].label
+                + '&time=' + this.periodTimeList[this.periodTimeIndex].value
+                + '&serviceTypeId=' + this.storeServiceList[this.storeServiceIndex].id
       })
       })
     },
     },
 
 
@@ -480,7 +483,8 @@ export default {
     getServiceTime(date) {
     getServiceTime(date) {
       this.$api.getServiceTime({
       this.$api.getServiceTime({
         storeId: this.store.storeId,
         storeId: this.store.storeId,
-        date: date
+        date: date,
+        serviceTypeId:this.storeServiceList[this.storeServiceIndex].id
       }).then(res => {
       }).then(res => {
         this.periodTimeList = res.data.data
         this.periodTimeList = res.data.data
         if (this.periodTimeList.length === 0) {
         if (this.periodTimeList.length === 0) {
@@ -514,16 +518,22 @@ export default {
       this.getAppointmentPrice()
       this.getAppointmentPrice()
     },
     },
 
 
+    //服务类别发生改变
     bindPickerChange(e) {
     bindPickerChange(e) {
+      this.serviceTeacher = {}
       this.storeServiceIndex = e.detail.value
       this.storeServiceIndex = e.detail.value
       console.log(e)
       console.log(e)
+      this.selectDate()
     },
     },
+    //服务日期发生改变
     bindPickerChange1(e) {
     bindPickerChange1(e) {
       this.periodDateIndex = e.detail.value
       this.periodDateIndex = e.detail.value
       this.getServiceTime(this.periodDateList[e.detail.value].label)
       this.getServiceTime(this.periodDateList[e.detail.value].label)
       this.serviceTeacher = {};
       this.serviceTeacher = {};
       console.log(e)
       console.log(e)
     },
     },
+
+    //服务时段发生改变
     bindPickerChange2(e) {
     bindPickerChange2(e) {
       this.periodTimeIndex = e.detail.value
       this.periodTimeIndex = e.detail.value
       this.serviceTeacher = {}
       this.serviceTeacher = {}
@@ -533,6 +543,7 @@ export default {
     category() {
     category() {
       this.$api.category({storeId: this.store.storeId}).then(res => {
       this.$api.category({storeId: this.store.storeId}).then(res => {
         this.storeServiceList = res.data.data
         this.storeServiceList = res.data.data
+        this.selectDate()
       })
       })
 
 
     },
     },

+ 5 - 3
orderPages/serviceTeacher/index.vue

@@ -35,9 +35,10 @@
 		data() {
 		data() {
 			return {
 			return {
 				reqParm: {
 				reqParm: {
-          date: null,
-          time: null,
-          storeId: null, // 所属门店
+				    date: '',
+				    time: '',
+				    storeId: '',
+					serviceTypeId:''
 				},
 				},
 				workPersonList: []
 				workPersonList: []
 			}
 			}
@@ -47,6 +48,7 @@
 			this.reqParm.date = option.schedulingDate;
 			this.reqParm.date = option.schedulingDate;
 			this.reqParm.time = option.time;
 			this.reqParm.time = option.time;
 			this.reqParm.storeId = option.organization;
 			this.reqParm.storeId = option.organization;
+			this.reqParm.serviceTypeId = option.serviceTypeId;
 
 
 			// 查询服务工作人员列表
 			// 查询服务工作人员列表
 			// this.serviceWorkPersonList();
 			// this.serviceWorkPersonList();