From 45fb4b11ad51bb38306765b11a6747402e382cee Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Sat, 20 Feb 2021 17:37:33 +0800 Subject: [PATCH] fix --- hive-app/pages/workbench/serviceOrderList.vue | 37 +++++++++++++++++++++++++++++-------- 1 files changed, 29 insertions(+), 8 deletions(-) diff --git a/hive-app/pages/workbench/serviceOrderList.vue b/hive-app/pages/workbench/serviceOrderList.vue index 87fb353..01e1fbe 100644 --- a/hive-app/pages/workbench/serviceOrderList.vue +++ b/hive-app/pages/workbench/serviceOrderList.vue @@ -56,7 +56,7 @@ </text> <text class="blue-btn small-btn ml-10" v-if="isShowOrder(item.status)" - @click.stop=""> + @click.stop="confirmServiceOrder(item.id)"> 确认预约 </text> <text class="blue-btn small-btn ml-10" @@ -104,23 +104,23 @@ name: '待确认' }, { - state: 8, + state: 2, name: '待排班' }, { - state: 2, + state: 3, name: '待配料' }, { - state: 3, + state: 4, name: '待服务' }, { - state: 4, + state: 5, name: '服务中' }, { - state: 5, + state: 6, name: '已完成' } ], @@ -152,7 +152,7 @@ onPullDownRefresh(){ this.reloadData(); let timer = setTimeout(function () { - uni.startPullDownRefresh(); + uni.stopPullDownRefresh(); clearTimeout(timer); timer = null; }, 800); @@ -211,7 +211,7 @@ }, // 是否显示确认预约 isShowOrder(status){ - return status == 1 && this.$utils.hasPermission('fwdgl.qryy'); + return status == 9 && this.$utils.hasPermission('fwdgl.qryy'); }, // 是否显示开始服务按钮 isShowStartServiceBtn(status, items){ @@ -244,6 +244,25 @@ success: (res) => { if (res.confirm) { this.$httpUtils.request('/api/serviceOrder/cancelService/'+id).then((res) => { + if(res.status == 200){ + this.reloadData() + } + this.$toast.info(res.info); + }) + } + } + }); + }, + // 确认预约 + confirmServiceOrder(id){ + uni.showModal({ + title: '提示', + content: '确认预约吗?', + success: (res) => { + if (res.confirm) { + this.$httpUtils.request('/api/serviceOrder/confirmServiceOrder', { + id:id + }, 'POST').then((res) => { if(res.status == 200){ this.reloadData() } @@ -305,6 +324,8 @@ return '已完成' } else if(val == 7){ return '服务单结束' + } else if(val == 9){ + return '待确认' } else { return '已取消' } -- Gitblit v1.9.1