From 75811022288e2c4832974a1586f442608706c30a Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 12 九月 2024 17:40:10 +0800 Subject: [PATCH] feat:司机接单pvc吨数提示 --- pages/driver-page/delivery-my/delivery-my/delivery-my.vue | 81 +++++++++++++++++++++++++++++----------- 1 files changed, 59 insertions(+), 22 deletions(-) diff --git a/pages/driver-page/delivery-my/delivery-my/delivery-my.vue b/pages/driver-page/delivery-my/delivery-my/delivery-my.vue index 8207da2..33c5c44 100644 --- a/pages/driver-page/delivery-my/delivery-my/delivery-my.vue +++ b/pages/driver-page/delivery-my/delivery-my/delivery-my.vue @@ -35,7 +35,7 @@ label="杞︾墝鍙�" labelWidth="20%" borderBottom - required> + > <u--input v-model="registerFormModel.carNo" placeholder="璇疯緭鍏ュ唴瀹�" clearable></u--input> @@ -67,6 +67,7 @@ required v-if="daydata.isWeighing==1"> <u--input v-model="clean" border="surround" + disabled placeholder="璇疯緭鍏ュ噣閲�" clearable></u--input> </u-form-item> @@ -205,6 +206,7 @@ import { apiRegister } from '@/api/publicInterface.js'; import { mapMutations } from 'vuex'; import { BaseUrl } from '@/api/publicInterface.js'; + import BigNumber from "bignumber.js" export default { // 鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚銆傛敞鎰忓鏋滄覆鏌撻�熷害蹇紝浼氬湪椤甸潰杩涘叆鍔ㄧ敾瀹屾垚鍓嶈Е鍙� onReady() { @@ -244,7 +246,6 @@ }, skin:"", hair:"", - clean:"", TableData:[], radiolist1: [{ name: '鍚�', @@ -298,25 +299,46 @@ trigger: ['change', 'blur'] } ], - carNo: [{ - type: 'string', - required: true, - message: '璇疯緭鍏ヨ溅鐗屽彿', - trigger: ['blur', 'change'] - }, - { - transform(value) { - return String(value); - }, - validator: (rule, value, callback) => { - return uni.$u.test.carNo(value); - }, - message: '璇疯緭鍏ユ纭殑杞︾墝鍙�', - trigger: ['change', 'blur'] - } - ], + // carNo: [{ + // type: 'string', + // required: true, + // message: '璇疯緭鍏ヨ溅鐗屽彿', + // trigger: ['blur', 'change'] + // }, + // { + // transform(value) { + // return String(value); + // }, + // validator: (rule, value, callback) => { + // return uni.$u.test.carNo(value); + // }, + // message: '璇疯緭鍏ユ纭殑杞︾墝鍙�', + // trigger: ['change', 'blur'] + // } + // ], }, }; + }, + computed:{ + clean() { + if(this.daydata.isWeighing==1){ + let xx = BigNumber(this.hair ? this.hair : 0) + let yy = BigNumber(this.skin ? this.skin : 0) + return xx.minus(yy).toNumber() > 0 ? xx.minus(yy).toNumber().toFixed(2) : 0 + }else{ + //鏁伴噺 + if(!this.tmTaskCoalList.length){ + return false + }else{ + const reslut = this.tmTaskCoalList.find(item=>!item.productQuantity); + if(reslut){ + return false + }else{ + return true + } + } + } + } }, methods: { ...mapMutations(['changeisUploadimg']), @@ -414,7 +436,7 @@ }); if (res.code === 0) { uni.$u.toast('棰勭害鎴愬姛') - this.GetMyDelivery() + this.GetMyDeliverys() } else { uni.$u.toast(res.msg ? res.msg : '棰勭害澶辫触') } @@ -445,7 +467,7 @@ }); if (res.code === 0) { uni.$u.toast('棰勭害鎴愬姛') - this.GetMyDelivery() + this.GetMyDeliverys() } else { uni.$u.toast(res.msg ? res.msg : '棰勭害澶辫触') } @@ -471,7 +493,7 @@ }); if (res.code === 0) { uni.$u.toast('棰勭害鎴愬姛') - this.GetMyDelivery() + this.GetMyDeliverys() } else { uni.$u.toast(res.msg ? res.msg : '棰勭害澶辫触') } @@ -479,6 +501,21 @@ } }) }, + 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: '鍔犺浇涓�...' -- Gitblit v1.9.1