订单立即上门

This commit is contained in:
donqi 2022-06-17 18:34:14 +08:00
parent 600dd845e3
commit 28fd05cfca
3 changed files with 28 additions and 13 deletions

View File

@ -71,7 +71,7 @@
},
methods: {
loadData() {
this.curUserInfo = this.$request.getCurUserInfo();
this.curUserInfo = this.$request.getCurUserNoCache();
this.loadServAreas();
this.loadServSkills();
this.loadSpecialSkills();

View File

@ -94,9 +94,9 @@
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
<text>服务时间{{order.serverTime}}</text>
</view>
<view class="margin-top-sm" v-if="Boolean(order.doorTime)">
<view class="margin-top-sm" v-if="tabCur !== 0 && tabCur !== 1">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
<text>上门时间{{order.doorTime}}</text>
<text>上门时间{{order.workBeginTime}}</text>
</view>
<view class="margin-top-sm flex justify-start align-center" v-if="order.orderStatus === 2">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-repair"></text></text>

View File

@ -58,7 +58,7 @@
</view> -->
<view class="margin-top-sm" v-if="servDetail.orderStatus === 3">
<text class="cuIcon-time text-main-color margin-right-xs"></text>
<text>上门时间{{servDetail.mainServOrder.doorTime}}</text>
<text>上门时间{{servDetail.workBeginTime}}</text>
</view>
<view class="margin-top-sm">
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
@ -109,7 +109,7 @@
</view>
发送急报
</view>
<view v-if="servDetail.orderStatus === 2" class="bg-main-color submit">立即上门</view>
<view v-if="servDetail.orderStatus === 2 && !servDetail.workBeginTime" class="bg-main-color submit" @click="workBegin">立即上门</view>
</view>
<uni-popup ref="orderManage" type="bottom" @change="changePopupState">
<view class="bg-white text-center">
@ -177,14 +177,14 @@
id: orderDetailId
});
this.servDetail = servDetailRes.data;
this.finishList4Show = this.servDetail.finishRecord;
for (let i = 0; i < this.finishList4Show.length; i++) {
let finishList = this.finishList4Show[i].finishList;
for (let j = 0; j < finishList.length; j++) {
finishList[j].secondColumnNum = finishList[j].servedNum;
}
this.finishList4Show[i].finishList = finishList;
}
// this.finishList4Show = this.servDetail.finishRecord;
// for (let i = 0; i < this.finishList4Show.length; i++) {
// let finishList = this.finishList4Show[i].finishList;
// for (let j = 0; j < finishList.length; j++) {
// finishList[j].secondColumnNum = finishList[j].servedNum;
// }
// this.finishList4Show[i].finishList = finishList;
// }
},
changePopupState(e) {
this.ifShowPageMeta = e.show;
@ -211,6 +211,21 @@
url: '/pages/order-manage/cancel-order?params=' + encodeURIComponent(JSON.stringify(params))
})
},
async workBegin() {
let curDate = new Date();
let formatCurDate = curDate.getFullYear() + '-' + (curDate.getMonth() + 1) + '-' + curDate.getDate()
+ ' ' + curDate.getHours() + ':' + curDate.getMinutes() + ':' + curDate.getSeconds();
let params = {
id: this.servDetail.orderDetailId,
orderStatus: 3,
workBeginTime: formatCurDate
}
console.log(params)
let res = await this.$request.updateDetailOrder(params);
if (res && res.code === 0) {
this.loadData(this.servDetail.orderDetailId);
}
},
showModal(e) {
this[e.currentTarget.dataset.modal] = true;
},