From 79f11f34546a394ab1c16ba427c31e9b59d05523 Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Sat, 09 Jan 2021 10:40:57 +0800
Subject: [PATCH] gx

---
 hive-app/pages/workbench/serviceOrderList.vue |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/hive-app/pages/workbench/serviceOrderList.vue b/hive-app/pages/workbench/serviceOrderList.vue
index 2ab8b80..aaec120 100644
--- a/hive-app/pages/workbench/serviceOrderList.vue
+++ b/hive-app/pages/workbench/serviceOrderList.vue
@@ -54,6 +54,11 @@
 							@click.stop="cancelOrder(item.id)">
 							取消
 						</text>
+						<text class="blue-btn small-btn ml-10"
+							v-if="isShowOrder(item.status)"
+							@click.stop="">
+							确认预约
+						</text>
 						<text class="blue-btn small-btn ml-10" 
 							v-if="isShowStartServiceBtn(item.status, item.projs)"
 							@click.stop="startService(item.id)">
@@ -124,6 +129,15 @@
 			}
 			this.loadList();
 			this.userId = this.$httpUtils.getRoleInfo().id;
+			// 判断权限
+			// #ifdef APP-PLUS
+			if(!this.$utils.hasPermission('fwdgl.add')){
+				let webView = this.$mp.page.$getAppWebview();
+				webView.setTitleNViewButtonStyle(0, {
+				    width: 0,  
+				});
+			}
+			// #endif
 		},
 		onNavigationBarButtonTap(Object){
 			if(Object.key === 'add'){
@@ -149,25 +163,30 @@
 			isShowFooter(status, items, staffId){
 				return this.isShowCancelBtn(status, items, staffId) ||
 					this.isShowStartServiceBtn(status, items) ||
-					this.isShowEndServiceBtn(status, items)
+					this.isShowEndServiceBtn(status, items) ||
+					this.isShowOrder(status)
 			},
 			// 是否显示取消按钮
 			isShowCancelBtn(status, items, staffId){
 				// 美疗师和下单顾问可以取消服务
 				let isEnable = (items.some((item) => item.id == this.userId)) || (this.userId == staffId);
-				return status != 5 && status != 6 && status != 7 && status != 8 && isEnable;
+				return status != 5 && status != 6 && status != 7 && status != 8 && isEnable && this.$utils.hasPermission('fwdgl.cancel');
+			},
+			// 是否显示确认预约
+			isShowOrder(status){
+				return status == 1 && this.$utils.hasPermission('fwdgl.qryy');
 			},
 			// 是否显示开始服务按钮
 			isShowStartServiceBtn(status, items){
 				// 只有美疗师本人才可以开始服务
 				let isEnable = items.some((item) => item.id == this.userId)
-				return status == 4 && isEnable;
+				return status == 4 && isEnable && this.$utils.hasPermission('fwdgl.begin');
 			},
 			// 是否显示结束服务按钮
 			isShowEndServiceBtn(status, items){
 				// 只有美疗师本人才可以开始服务
 				let isEnable = items.some((item) => item.id == this.userId)
-				return status == 5 && isEnable;
+				return status == 5 && isEnable && this.$utils.hasPermission('fwdgl.end');
 			},
 			search(val){
 				this.queryKey = val;

--
Gitblit v1.9.1