From fb4fa76b4c1a93c833cd97f97f41b6158ab1aef7 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期五, 21 四月 2023 17:24:44 +0800
Subject: [PATCH] 修改bug
---
pages/public-page/forward/forward.vue | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 70f2284..57a8e42 100644
--- a/pages/public-page/forward/forward.vue
+++ b/pages/public-page/forward/forward.vue
@@ -125,14 +125,7 @@
index: '',
checkboxValue1: '',
selectPopupShow: false,
- list1: [
- {
- name: '杞﹂槦'
- },
- {
- name: '璐т唬'
- }
- ],
+ list1: [{ name: '杞﹂槦' }, { name: '璐т唬' }],
tabHuoDai: false,
carNumSurplus1: '',
cars2: '',
@@ -153,10 +146,10 @@
return uni.getStorageSync('roleType');
},
text() {
- return `宸查鍙�${this.cars2}寮犳棩璁″垝鍗�,鍓╀綑${this.carNumSurplus1}寮犳棩璁″垝鍗昤;
+ return `宸查鍙�${this.cars2}寮犳彁鐓ゅ崟,鍓╀綑${this.carNumSurplus1}寮犳彁鐓ゅ崟`;
},
text1() {
- return `宸叉嫢鏈�${this.carNum}寮犳棩璁″垝鍗�,鍓╀綑${this.carNumSurplusHuodai}寮犳棩璁″垝鍗昤;
+ return `宸叉嫢鏈�${this.carNum}寮犳彁鐓ゅ崟,鍓╀綑${this.carNumSurplusHuodai}寮犳彁鐓ゅ崟`;
}
},
methods: {
@@ -177,19 +170,19 @@
allrelay(x, y) {
let a = 0;
if (y != 0) {
- a = x + y;
+ a = Number(x) + Number(y);
return a;
} else {
- return x;
+ return Number(x);
}
},
allrelayto(x, y) {
let a = 0;
if (y != 0) {
- a = x - y;
+ a = Number(x) - Number(y);
return a;
} else {
- return x;
+ return Number(x);
}
},
checkboxChange(value, index) {
@@ -226,10 +219,16 @@
// 璐т唬
if (this.roleType == 2) {
this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.forwardSurplus);
+ if (this.jhOrderPlanForwardList[index].carNum <= 0) {
+ this.jhOrderPlanForwardList[index].carNum = 0;
+ }
}
// 瀹㈡埛
if (this.roleType == 1) {
this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.carNumSurplus1);
+ if (this.jhOrderPlanForwardList[index].carNum <= 0) {
+ this.jhOrderPlanForwardList[index].carNum = 0;
+ }
}
}
},
--
Gitblit v1.9.1