| | |
| | | <text>*</text> |
| | | <text>入园原因</text> |
| | | </view> |
| | | <view class="value" @click="showReason = true"> |
| | | <text class="mr6" :style="{ color: param.inReason ? '#000000' : '#999999' }">{{ param.inReason ? param.inReason : '请选择' }}</text> |
| | | <view class="value" @click="reasonClick"> |
| | | <text class="mr6" :class="{gray: param.id}" :style="{ color: param.inReason ? '#000000' : '#999999' }">{{ param.inReason ? param.inReason : '请选择' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <!-- --> |
| | | <u-picker :show="showReason" keyName="reason" :columns="reasonList" @confirm="reasonConfirm"></u-picker> |
| | | <u-picker :show="showReason" keyName="reason" closeOnClickOverlay @close="showReason = false" |
| | | @cancel="showReason = false" :columns="reasonList" @confirm="reasonConfirm"></u-picker> |
| | | <u-datetime-picker |
| | | :show="showDatetime" |
| | | closeOnClickOverlay |
| | |
| | | |
| | | <script> |
| | | import keyboardInput from '@/components/keyboard-input/keyboard-input.vue'; |
| | | import { uploadUrl, driverCarApply, driverReasonList } from '@/api'; |
| | | import { uploadUrl, driverCarApply,driverCarApplyEdit, driverReasonList, driverApplyDetail } from '@/api'; |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | components: { |
| | |
| | | inputType: '' |
| | | }; |
| | | }, |
| | | created() { |
| | | onLoad(option) { |
| | | if(option && option.id){ |
| | | this.getDetail(option.id, option.type) |
| | | } |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | reasonClick() { |
| | | if(this.param.id){ |
| | | return |
| | | } |
| | | this.showReason = true |
| | | }, |
| | | onSubmit() { |
| | | const param = { ...this.param } |
| | | if (!param.arriveDate) return this.showToast('请选择到场时间') |
| | |
| | | if (!param.carCodeBack) return this.showToast('请输入车后牌号') |
| | | if (!param.transportImgFull) return this.showToast('请上传准运证照片') |
| | | param.arriveDate = param.arriveDate + ':00' |
| | | driverCarApply({...param}).then(res => { |
| | | let fn = param.id ? driverCarApplyEdit : driverCarApply |
| | | fn({...param}).then(res => { |
| | | if(res && res.code === 200){ |
| | | uni.navigateBack() |
| | | setTimeout(() => { |
| | | this.showToast('预约申请成功') |
| | | }) |
| | | this.$jump('/pages/driver/reservedRecord') |
| | | } |
| | | }) |
| | | }, |
| | | getDetail(id, type) { |
| | | driverApplyDetail({id}).then(res => { |
| | | this.param = { ...res.data, transportImgFull: res.data.prefixUrl + res.data.transportImg } |
| | | if(type && type == 'reject'){ |
| | | this.$set(this.param, 'id', null) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.$forceUpdate(); |
| | | this.closeInput(); |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | }, |
| | | copy(){ |
| | | if(this.param.carCodeFront){ |
| | | this.$set(this.param, 'carCodeBack', this.param.carCodeFront) |
| | | this.showToast('复制成功'); |
| | | } |
| | | |
| | | }, |
| | | handleUpload() { |
| | | let token = uni.getStorageSync('token') || '' |
| | |
| | | } |
| | | }) |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | .gray{ |
| | | color: #999999 !important; |
| | | } |
| | | .btns { |
| | | display: flex; |
| | | align-items: center; |