From a6653e19d20a61e7b8f788037d2a4df3f93a4f32 Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Tue, 12 Jan 2021 16:51:03 +0800
Subject: [PATCH] gx

---
 hive-app/pages/workbench/confirmService.vue |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/hive-app/pages/workbench/confirmService.vue b/hive-app/pages/workbench/confirmService.vue
index 1955d9d..297eb77 100644
--- a/hive-app/pages/workbench/confirmService.vue
+++ b/hive-app/pages/workbench/confirmService.vue
@@ -88,7 +88,8 @@
 				memberInfo: {},
 				remark: '',
 				isDisabled: false,
-				password: ''
+				password: '',
+				isExistPwd: false
 			}
 		},
 		computed:{
@@ -113,9 +114,17 @@
 		onLoad(options) {
 			this.id = options.id;
 			this.list = JSON.parse(decodeURIComponent(options.list));
+			this.loadIsExistFundPassword();
 			this.loadMemberInfo();
 		},
 		methods:{
+			loadIsExistFundPassword(){
+				this.$httpUtils.request('/api/vip/isExistFundPassword/'+this.id).then((res) => {
+					if(res.status == 200){
+						this.isExistPwd = res.mapInfo.isExist;
+					}
+				})
+			},
 			loadMemberInfo(){
 				this.$httpUtils.request('/api/vip/findVipInfoById/'+this.id).then((res) => {
 					if(res.status == 200){
@@ -143,6 +152,9 @@
 				this.loadEmployeeList()
 			},
 			employeeChange(e){
+				if(!this.employeeList.length){
+					return;
+				}
 				this.curEmployee = this.employeeList[e.detail.value];
 			},
 			valid(){
@@ -150,7 +162,7 @@
 					this.$toast.info('请预约时间');
 					return false
 				}
-				if(!this.curEmployee.id){
+				if(!this.curEmployee || !this.curEmployee.id){
 					this.$toast.info('请预约美疗师');
 					return false
 				}
@@ -172,11 +184,15 @@
 				if(this.valid() === false){
 					return;
 				}
+				// 未设置资金密码,不弹出密码框
+				if(!this.isExistPwd){
+					this.submit();
+					return;
+				}
 				this.$refs.popup.open();
 				setTimeout(() => {
 					this.$refs.KeyboarHid.open()
-				}, 50)
-				
+				}, 50);
 			},
 			submit(){
 				if(this.isRequesting){
@@ -202,6 +218,8 @@
 						uni.navigateTo({
 							url: './submitSucceed?type=2'
 						})
+					}else{
+						this.password = '';
 					}
 					this.$toast.info(res.info);
 					this.isRequesting = false;
@@ -217,13 +235,13 @@
 	.popup-container{
 		background: #FFFFFF;
 		width: 500rpx;
-		padding: 20px 20px 20px;
+		padding: 20px 20px 30px;
 		border-radius: 6px;
 	}
 	.popup-title{
 		font-size: 16px;
 		text-align: center;
-		margin-bottom: 20px;
+		margin-bottom: 15px;
 	}
 	.popup-sub-title{
 		font-size: 15px;

--
Gitblit v1.9.1