| | |
| | | <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{ |
| | |
| | | curEmployee: {}, |
| | | memberInfo: {}, |
| | | remark: '', |
| | | isDisabled: false |
| | | isDisabled: false, |
| | | password: '' |
| | | } |
| | | }, |
| | | computed:{ |
| | |
| | | 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, |
| | |
| | | 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({ |
| | |
| | | }) |
| | | } |
| | | this.$toast.info(res.info); |
| | | this.isDisabled = false; |
| | | this.isRequesting = false; |
| | | }).catch(() => { |
| | | this.isDisabled = false; |
| | | this.isRequesting = false; |
| | | }) |
| | | } |
| | | } |
| | |
| | | </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; |