| | |
| | | </up-form-item> |
| | | |
| | | <up-form-item label="送货单" prop="attachments" required> |
| | | <tem-upload-file immediate :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" ref="uploadB" |
| | | <tem-upload-file immediate :sourceType="['camera']" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" ref="uploadB" |
| | | :isSource='true' fileType="all" @success="success('File',$event)" @error="errorInvoice" |
| | | @complete="completeInvoice('',$event)"> |
| | | </tem-upload-file> |
| | |
| | | <up-form labelPosition="left" :model="clockInfo" ref="formClockInRef" labelWidth='140rpx'> |
| | | <up-form-item label="车辆检查" prop="carConditionAttachments" v-if="clockInfo.clockType=='ClockIn'" |
| | | required> |
| | | <tem-upload-file immediate btnText="上传照片" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" |
| | | <tem-upload-file immediate btnText="上传照片" :sourceType="['camera']" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" |
| | | ref="carCondition" :isSource='true' fileType="all" |
| | | @success="successClock('carCondition',$event)" @error="errorInvoice" |
| | | @complete="completeInvoice('carCondition',$event)"> |
| | |
| | | </up-form-item> |
| | | <template v-else> |
| | | <up-form-item label="装货照片" prop="attachments" required v-if='!clockInfo.emptyCause'> |
| | | <tem-upload-file immediate btnText="上传照片" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" |
| | | <tem-upload-file immediate btnText="上传照片" :sourceType="['camera']" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" |
| | | ref="zhuanghuo" :isSource='true' fileType="all" @success="successClock('zhuanghuo',$event)" |
| | | @error="errorInvoice" @complete="completeInvoice('zhuanghuo',$event)"> |
| | | </tem-upload-file> |
| | |
| | | </up-input> |
| | | </up-form-item> |
| | | <up-form-item label="里程照片" required prop="mileageImg" :borderBottom='false' ref="item1"> |
| | | <tem-upload-file immediate max="1" btnText="上传照片" |
| | | <tem-upload-file immediate max="1" btnText="上传照片" :sourceType="['camera']" |
| | | :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" ref="licheng" :isSource='true' |
| | | fileType="all" @success="successClock('licheng',$event)" @error="errorInvoice" |
| | | @complete="completeInvoice('licheng',$event)"> |
| | |
| | | //e.res 为服务器返回数据 |
| | | //上传成功回调,处理服务器返回数据【此处根据实际返回数据进行处理】 |
| | | let res = e.res |
| | | console.log(res,'000000000000’'); |
| | | // let res = JSON.parse(e.res.data.replace(/\ufeff/g, "") || "{}") |
| | | if (res.statusCode == 200) { |
| | | if (res.data && text == 'carCondition') { |
| | |
| | | }) |
| | | this.$refs.carCondition.status.push('success') |
| | | this.$refs.carCondition.status.length = this.$refs.carCondition.urls.length |
| | | console.log(this.$refs.carCondition.status); |
| | | console.log(this.$refs.carCondition.status,this.clockInfo.carConditionAttachments); |
| | | this.clockInfo.carConditionAttachments.push(obj) |
| | | } else if (res.data && text == 'licheng') { |
| | | this.clockInfo.mileageImg = res.data //里程照片 |
| | |
| | | }, |
| | | //选择图片或上传完成时触发 |
| | | completeInvoice(val, e) { |
| | | console.log(val,e); |
| | | if (e.action == 'delete') { |
| | | if (val == 'licheng') { |
| | | this.clockInfo.mileageImg = '' |
| | |
| | | }) |
| | | this.$refs.clockInModal.loading = false |
| | | } |
| | | }).catch(err=>{ |
| | | this.$util.showToast({ |
| | | title: `打卡异常-${err}`, |
| | | }) |
| | | }) |
| | | }).catch(errors => { |
| | | this.$util.showToast({ |
| | | title: `打卡异常-${errors[0].message}`, |
| | | }) |
| | | this.clockInfo.carConditionAttachments=this.clockInfo.carConditionAttachments||[] |
| | | this.$refs.clockInModal.loading = false |
| | | }) |
| | | |
| | |
| | | }) |
| | | this.$refs.clockInModal.loading = false |
| | | } |
| | | }).catch(err=>{ |
| | | this.$util.showToast({ |
| | | title: `打卡异常-${err}`, |
| | | }) |
| | | this.$refs.cancelModal.loading = false |
| | | }) |
| | | |
| | | }, |
| | | closeModal() { |
| | | this.showClockIn = false |