| | |
| | | </uni-table> |
| | | <u-form-item prop='contactPicture'> |
| | | <view class="label-text"> |
| | | <text style="color: #f56c6c;">*</text>原发单据 |
| | | 原发单据 |
| | | </view> |
| | | <u-upload :fileList="fileList1" |
| | | @afterRead="afterRead" |
| | |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | <view class="logoutModel"> |
| | | <u-modal :show="logoutShow" |
| | | :title="logoutTitle" |
| | | showCancelButton |
| | | :content="logoutContent" |
| | | @confirm="logoutConfirm" |
| | | @cancel="logoutCancel"></u-modal> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | Object.assign(that.registerFormModel, res.data) |
| | | } |
| | | }); |
| | | uni.getStorage({ |
| | | key: 'isshow', |
| | | success: function (res) { |
| | | that.isshow=res.data |
| | | } |
| | | }); |
| | | this.ids=null |
| | | }, |
| | | data() { |
| | | return { |
| | | ids:null, |
| | | logoutShow: false, |
| | | logoutTitle: '提示', |
| | | logoutContent: '入场需要扫描车牌照和刷身份证入场,请携带身份证原件', |
| | | isshow:true, |
| | | scrollTop: 0, |
| | | id:"", |
| | | value: 0, |
| | |
| | | }, |
| | | message: '手机号码格式不正确', |
| | | trigger: ['change', 'blur'] |
| | | } |
| | | ], |
| | | idNumber: [{ |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入身份证号', |
| | | trigger: ['blur', 'change'] |
| | | } |
| | | ], |
| | | // carNo: [{ |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | yuYueBtnClick(item){ |
| | | logoutConfirm() { |
| | | this.$refs.regesterFormRef.validate().then(res => { |
| | | if(this.daydata.orderType=='外购'){ |
| | | if(this.daydata.isWeighing==1){ |
| | |
| | | orderTye:this.daydata.orderType, |
| | | sendDate:this.daydata.sendDate, |
| | | carNumSurplus:this.daydata.carNumSurplus, |
| | | yyId:item.id, |
| | | yyId:this.ids.id, |
| | | ...this.registerFormModel, |
| | | tmTaskCoalContact:{ |
| | | coalName:this.daydata.productName, |
| | |
| | | key: 'myDelivery', |
| | | data: this.registerFormModel, |
| | | }); |
| | | uni.setStorage({ |
| | | key: 'isshow', |
| | | data: false, |
| | | }); |
| | | this.logoutShow=false |
| | | this.isshow=false |
| | | if (res.code === 0) { |
| | | uni.$u.toast('预约成功') |
| | | this.GetMyDelivery() |
| | | this.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | |
| | | orderTye:this.daydata.orderType, |
| | | sendDate:this.daydata.sendDate, |
| | | carNumSurplus:this.daydata.carNumSurplus, |
| | | yyId:item.id, |
| | | yyId:this.ids.id, |
| | | ...this.registerFormModel, |
| | | tmTaskCoalContact:{ |
| | | contactPicture:this.contactPicture, |
| | |
| | | key: 'myDelivery', |
| | | data: this.registerFormModel, |
| | | }); |
| | | uni.setStorage({ |
| | | key: 'isshow', |
| | | data: false, |
| | | }); |
| | | this.logoutShow=false |
| | | this.isshow=false |
| | | if (res.code === 0) { |
| | | uni.$u.toast('预约成功') |
| | | this.GetMyDelivery() |
| | | this.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | |
| | | orderTye:this.daydata.orderType, |
| | | sendDate:this.daydata.sendDate, |
| | | carNumSurplus:this.daydata.carNumSurplus, |
| | | yyId:item.id, |
| | | yyId:this.ids.id, |
| | | ...this.registerFormModel |
| | | }, 'json').then(res => { |
| | | uni.setStorage({ |
| | | key: 'myDelivery', |
| | | data: this.registerFormModel, |
| | | }); |
| | | uni.setStorage({ |
| | | key: 'isshow', |
| | | data: false, |
| | | }); |
| | | this.logoutShow=false |
| | | this.isshow=false |
| | | if (res.code === 0) { |
| | | uni.$u.toast('预约成功') |
| | | this.GetMyDelivery() |
| | | this.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | |
| | | } |
| | | }) |
| | | }, |
| | | logoutCancel() { |
| | | this.logoutShow = false; |
| | | }, |
| | | yuYueBtnClick(item){ |
| | | this.$refs.regesterFormRef.validate().then(res => { |
| | | if(this.isshow){ |
| | | this.logoutShow = true; |
| | | this.ids=item |
| | | }else{ |
| | | if(this.daydata.orderType=='外购'){ |
| | | if(this.daydata.isWeighing==1){ |
| | | this.$reqPost('saveMyDelivery',{ |
| | | productName:this.daydata.productName, |
| | | customerId:this.daydata.customerId, |
| | | deptId:this.daydata.deptId, |
| | | filedId:this.daydata.filedId, |
| | | orderPlanId:this.daydata.id, |
| | | orderTye:this.daydata.orderType, |
| | | sendDate:this.daydata.sendDate, |
| | | carNumSurplus:this.daydata.carNumSurplus, |
| | | yyId:item.id, |
| | | ...this.registerFormModel, |
| | | tmTaskCoalContact:{ |
| | | coalName:this.daydata.productName, |
| | | contactPicture:this.contactPicture, |
| | | skin:this.skin, |
| | | hair:this.hair, |
| | | clean:this.clean |
| | | } |
| | | }, 'json').then(res => { |
| | | uni.setStorage({ |
| | | key: 'myDelivery', |
| | | data: this.registerFormModel, |
| | | }); |
| | | if (res.code === 0) { |
| | | uni.$u.toast('预约成功') |
| | | this.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | | }) |
| | | }else{ |
| | | let numDtoList=this.tmTaskCoalList.map(item=>{ |
| | | return {tmId:item.productId,num:item.productQuantity,coalName:item.coalName} |
| | | }) |
| | | this.$reqPost('saveMyDelivery',{ |
| | | productName:this.daydata.productName, |
| | | customerId:this.daydata.customerId, |
| | | deptId:this.daydata.deptId, |
| | | filedId:this.daydata.filedId, |
| | | orderPlanId:this.daydata.id, |
| | | orderTye:this.daydata.orderType, |
| | | sendDate:this.daydata.sendDate, |
| | | carNumSurplus:this.daydata.carNumSurplus, |
| | | yyId:item.id, |
| | | ...this.registerFormModel, |
| | | tmTaskCoalContact:{ |
| | | contactPicture:this.contactPicture, |
| | | numDtoList:numDtoList |
| | | } |
| | | }, 'json').then(res => { |
| | | uni.setStorage({ |
| | | key: 'myDelivery', |
| | | data: this.registerFormModel, |
| | | }); |
| | | if (res.code === 0) { |
| | | uni.$u.toast('预约成功') |
| | | this.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }else{ |
| | | this.$reqPost('saveMyDelivery',{ |
| | | productName:this.daydata.productName, |
| | | customerId:this.daydata.customerId, |
| | | deptId:this.daydata.deptId, |
| | | filedId:this.daydata.filedId, |
| | | orderPlanId:this.daydata.id, |
| | | orderTye:this.daydata.orderType, |
| | | sendDate:this.daydata.sendDate, |
| | | carNumSurplus:this.daydata.carNumSurplus, |
| | | yyId:item.id, |
| | | ...this.registerFormModel |
| | | }, 'json').then(res => { |
| | | uni.setStorage({ |
| | | key: 'myDelivery', |
| | | data: this.registerFormModel, |
| | | }); |
| | | if (res.code === 0) { |
| | | uni.$u.toast('预约成功') |
| | | this.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | GetMyDeliverys() { |
| | | this.$reqGet('driverYuYueList', {orderPlanId:this.id}).then(res => { |
| | | if (res.code == 0) { |
| | | this.yuYueData = res.data; |
| | | } else { |
| | | this.$u.toast('加载失败'); |
| | | } |
| | | }); |
| | | this.$reqGetId('myDelivery',this.id).then(res => { |
| | | if (res.data) { |
| | | this.daydata=res.data |
| | | this.tmTaskCoalList=res.data.jhOrderPlanList |
| | | } |
| | | }); |
| | | }, |
| | | GetMyDelivery() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |