From ba8ce4451b48b5902a307df075442bf016b5e4ae Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Mon, 11 Jan 2021 17:06:21 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/jyyforjava/hive-app into master
---
hive-app/pages/workbench/confirmService.vue | 72 ++++++++++++++++++++++++++++++++---
1 files changed, 65 insertions(+), 7 deletions(-)
diff --git a/hive-app/pages/workbench/confirmService.vue b/hive-app/pages/workbench/confirmService.vue
index cfb01e9..1955d9d 100644
--- a/hive-app/pages/workbench/confirmService.vue
+++ b/hive-app/pages/workbench/confirmService.vue
@@ -16,7 +16,7 @@
<text>预约时间</text>
<text class="gray" @click="showTime()">{{yyTime || '请选择预约时间'}}</text>
</view>
- <date-time-picker ref='date-time' type='datetime' @change='dateTimeChange'></date-time-picker>
+ <date-time-picker ref='date-time' :startDate="startDate" type='datetime' @change='dateTimeChange'></date-time-picker>
<view class="content-row flex align-center justify-between">
<text>预约技师</text>
<view class="blue">
@@ -55,14 +55,28 @@
<view class="footer">
<button :disabled="isDisabled" class="blue-btn" @click="createOrder">提交服务单</button>
</view>
+
+ <uni-popup ref="popup" type="center" @change="popupChange">
+ <view class="popup-container">
+ <view class="popup-title">请输入资金密码</view>
+ <password-input :numLng='password'></password-input>
+ </view>
+ </uni-popup>
+ <number-keyboard ref='KeyboarHid' :topBarShow="false" @input='changePwd' psdLength='6' :value="password"></number-keyboard>
</view>
</template>
<script>
+ import numberKeyboard from '@/components/number-keyboard/number-keyboard.vue'
+ import passwordInput from '@/components/password-input/password-input.vue'
import DateTimePicker from '../../components/bory-dateTimePicker/bory-dateTimePicker.vue'
+ import uniPopup from '@/components/uni-popup/uni-popup.vue'
export default{
components:{
- DateTimePicker
+ DateTimePicker,
+ numberKeyboard,
+ passwordInput,
+ uniPopup
},
data(){
return{
@@ -73,7 +87,8 @@
curEmployee: {},
memberInfo: {},
remark: '',
- isDisabled: false
+ isDisabled: false,
+ password: ''
}
},
computed:{
@@ -90,6 +105,9 @@
timeLength += item.timeLength * item.num;
})
return timeLength;
+ },
+ startDate(){
+ return this.$utils.formmatTime('YY-mm-dd')
}
},
onLoad(options) {
@@ -137,11 +155,34 @@
return false
}
},
+ // 弹窗状态change
+ popupChange(e) {
+ if(!e.show){
+ this.password = '';
+ this.$refs.KeyboarHid.close();
+ }
+ },
+ changePwd(val){
+ this.password = val;
+ if(this.password.length == 6){
+ this.submit()
+ }
+ },
createOrder(){
if(this.valid() === false){
return;
}
- this.isDisabled = true;
+ this.$refs.popup.open();
+ setTimeout(() => {
+ this.$refs.KeyboarHid.open()
+ }, 50)
+
+ },
+ submit(){
+ if(this.isRequesting){
+ return;
+ }
+ this.isRequesting = true;
let projItems = this.list.map((item) => {
return {
"count": item.num,
@@ -154,7 +195,8 @@
remark: this.remark,
totalTime: this.totalTime,
yyTime: this.yyTime,
- vipId: this.id
+ vipId: this.id,
+ password: this.password
}, 'POST').then((res) => {
if(res.status == 200){
uni.navigateTo({
@@ -162,9 +204,9 @@
})
}
this.$toast.info(res.info);
- this.isDisabled = false;
+ this.isRequesting = false;
}).catch(() => {
- this.isDisabled = false;
+ this.isRequesting = false;
})
}
}
@@ -172,6 +214,22 @@
</script>
<style>
+ .popup-container{
+ background: #FFFFFF;
+ width: 500rpx;
+ padding: 20px 20px 20px;
+ border-radius: 6px;
+ }
+ .popup-title{
+ font-size: 16px;
+ text-align: center;
+ margin-bottom: 20px;
+ }
+ .popup-sub-title{
+ font-size: 15px;
+ text-align: center;
+ padding: 10px 0;
+ }
page{
background: #F6F6F8;
padding-top: 10px;
--
Gitblit v1.9.1