| @@ -17,6 +17,9 @@ Page({ | |||||
| pickedStartTime: "请选择", | pickedStartTime: "请选择", | ||||
| pickedEndTime: "请选择", | pickedEndTime: "请选择", | ||||
| describeStr: "", | describeStr: "", | ||||
| mallList: [], | |||||
| merchantId: "", | |||||
| currentIndex: "", | |||||
| status: "", | status: "", | ||||
| isShowBtns: false | isShowBtns: false | ||||
| }, | }, | ||||
| @@ -37,10 +40,11 @@ Page({ | |||||
| id: options.id || '', | id: options.id || '', | ||||
| orderId: options.orderId || '', | orderId: options.orderId || '', | ||||
| startTime: finalStartTime, | startTime: finalStartTime, | ||||
| endTime: options.endTime || '' | |||||
| endTime: options.endTime || '', | |||||
| mallList: JSON.parse(options.mallList)[0].merchantVoList || '', | |||||
| }) | }) | ||||
| console.log(this.data.startTime, 'startTime'); | |||||
| console.log(this.data.mallList, 'mallList'); | |||||
| const mallTenantId = tt.getStorageSync('mallTenantId'); | const mallTenantId = tt.getStorageSync('mallTenantId'); | ||||
| if (mallTenantId) { | if (mallTenantId) { | ||||
| @@ -58,6 +62,16 @@ Page({ | |||||
| } | } | ||||
| }, | }, | ||||
| setMerchant(e) { | |||||
| console.log(e.detail.value, 'e'); | |||||
| const index = e.detail.value | |||||
| this.setData({ | |||||
| currentIndex: index, | |||||
| merchantId: this.data.mallList[index].id | |||||
| }) | |||||
| console.log(this.data.currentIndex, this.data.merchantId); | |||||
| }, | |||||
| chooseAddress() { | chooseAddress() { | ||||
| if (!this.data.isShowBtns) return | if (!this.data.isShowBtns) return | ||||
| let that = this; | let that = this; | ||||
| @@ -142,7 +156,8 @@ Page({ | |||||
| startDate: tempData.pickedDate + " " + tempData.pickedStartTime + ":00", | startDate: tempData.pickedDate + " " + tempData.pickedStartTime + ":00", | ||||
| endDate: tempData.pickedDate + " " + tempData.pickedEndTime + ":00", | endDate: tempData.pickedDate + " " + tempData.pickedEndTime + ":00", | ||||
| describeStr: tempData.describeStr, | describeStr: tempData.describeStr, | ||||
| mallTenantId: tempData.mallTenantId || '' | |||||
| mallTenantId: tempData.mallTenantId || '', | |||||
| reservationMerchantId: tempData.merchantId | |||||
| } | } | ||||
| if (this.data.id) { | if (this.data.id) { | ||||
| @@ -32,6 +32,20 @@ | |||||
| </picker> | </picker> | ||||
| </view> | </view> | ||||
| <view class="datePickerFlex"> | |||||
| <view>选择可用商户:</view> | |||||
| <picker mode="selector" value="{{index}}" range="{{mallList}}" range-key="merchantName" disabled="{{false}}" | |||||
| bindchange="setMerchant"> | |||||
| <view tt:if="{{ !merchantId }}" class="picker"> | |||||
| 请选择 | |||||
| </view> | |||||
| <view tt:if="{{ merchantId }}" class="picker"> | |||||
| {{ mallList[currentIndex].merchantName }} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class="textarea"> | <view class="textarea"> | ||||
| <textarea class="describe" placeholder="备注:说点什么吧" disabled="{{ !isShowBtns }}" bindinput="describing" | <textarea class="describe" placeholder="备注:说点什么吧" disabled="{{ !isShowBtns }}" bindinput="describing" | ||||
| value="{{ describeStr }}"></textarea> | value="{{ describeStr }}"></textarea> | ||||
| @@ -187,11 +187,11 @@ Page({ | |||||
| const id = this.data.appointmentId | const id = this.data.appointmentId | ||||
| const startTime = that.data.order.validStartDATE | const startTime = that.data.order.validStartDATE | ||||
| const endTime = that.data.order.validEndDate | const endTime = that.data.order.validEndDate | ||||
| console.log(startTime, endTime); | |||||
| const mallList = JSON.stringify(that.data.mallList) | |||||
| console.log(startTime, endTime, mallList); | |||||
| tt.navigateTo({ | tt.navigateTo({ | ||||
| url: `/package2/pages/appointment/appointment?id=${id}&orderId=${orderId}&startTime=${startTime}&endTime=${endTime}`, | |||||
| url: `/package2/pages/appointment/appointment?id=${id}&orderId=${orderId}&startTime=${startTime}&endTime=${endTime}&mallList=${mallList}`, | |||||
| }); | }); | ||||
| }, | }, | ||||
| @@ -56,15 +56,6 @@ | |||||
| "scene": "011007", | "scene": "011007", | ||||
| "launchFrom": "scan", | "launchFrom": "scan", | ||||
| "location": "audit" | "location": "audit" | ||||
| }, | |||||
| { | |||||
| "id": 1686207127735, | |||||
| "name": "预约功能调试", | |||||
| "pathName": "package2/pages/appointment/appointment", | |||||
| "query": "id=826355515227168768&startTime=2023-05-29&endTime=2023-06-28", | |||||
| "scene": "990001", | |||||
| "launchFrom": "scan", | |||||
| "location": "qr_code" | |||||
| } | } | ||||
| ] | ] | ||||
| } | } | ||||