From 4b80c98ef5fda8d6358778f2efe8bb35cb20ccf9 Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Fri, 15 Jan 2021 16:18:21 +0800
Subject: [PATCH] gx

---
 hive-app/pages/workbench/serviceOrderList.vue |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/hive-app/pages/workbench/serviceOrderList.vue b/hive-app/pages/workbench/serviceOrderList.vue
index 87fb353..0f7267f 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: '已完成'
 				}
 			],
@@ -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