| | |
| | | }); |
| | | }); |
| | | }, |
| | | logoutConfirm() { |
| | | lohOutLogin(){ |
| | | this.$refs.regesterFormRef.validate().then(res => { |
| | | 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:this.ids.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, |
| | | }); |
| | | uni.setStorage({ |
| | | key: 'isshow', |
| | | data: false, |
| | | }); |
| | | this.logoutShow=false |
| | | this.isshow=false |
| | | if (res.code === 0) { |
| | | uni.$u.toast('预约成功') |
| | | this.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | | }) |
| | | 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:this.ids.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, |
| | | }); |
| | | uni.setStorage({ |
| | | key: 'isshow', |
| | | data: false, |
| | | }); |
| | | this.logoutShow=false |
| | | this.isshow=false |
| | | 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:this.ids.id, |
| | | ...this.registerFormModel, |
| | | tmTaskCoalContact:{ |
| | | contactPicture:this.contactPicture, |
| | | numDtoList:numDtoList |
| | | } |
| | | }, '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.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, |
| | |
| | | sendDate:this.daydata.sendDate, |
| | | carNumSurplus:this.daydata.carNumSurplus, |
| | | yyId:this.ids.id, |
| | | ...this.registerFormModel, |
| | | tmTaskCoalContact:{ |
| | | contactPicture:this.contactPicture, |
| | | numDtoList:numDtoList |
| | | } |
| | | ...this.registerFormModel |
| | | }, 'json').then(res => { |
| | | uni.setStorage({ |
| | | key: 'myDelivery', |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }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: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.GetMyDeliverys() |
| | | } else { |
| | | uni.$u.toast(res.msg ? res.msg : '预约失败') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | logoutConfirm() { |
| | | |
| | | if(this.registerFormModel.carNo==""){ |
| | | this.lohOutLogin() |
| | | }else{ |
| | | if(this.registerFormModel.carNo){ |
| | | var xreg=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; |
| | | var creg=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/; |
| | | if(this.registerFormModel.carNo.length == 7){ |
| | | if(!creg.test(this.registerFormModel.carNo)) { |
| | | uni.$u.toast('请输入正确的车牌号') |
| | | }else { |
| | | this.lohOutLogin() |
| | | } |
| | | } else if(this.registerFormModel.carNo.length == 8){ |
| | | if(!xreg.test(this.registerFormModel.carNo)) { |
| | | uni.$u.toast('请输入正确的车牌号') |
| | | }else { |
| | | this.lohOutLogin() |
| | | } |
| | | }else { |
| | | uni.$u.toast('请输入正确的车牌号') |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | logoutCancel() { |
| | | this.logoutShow = false; |
| | |
| | | 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 : '预约失败') |
| | | } |
| | | }) |
| | | } |
| | | this.logoutConfirm(); |
| | | } |
| | | }) |
| | | }, |