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 |   45 +++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 41 insertions(+), 4 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 1b9b35b..33c5c44 100644
--- a/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
+++ b/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
@@ -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: '鍚�',
@@ -317,6 +318,27 @@
 					// ],
 				},
 			};
+		},
+		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