qingyiay
2023-07-11 0c3e40c399a00fe6405f7b9a79eb1c93b7cc660e
pages/public-page/forward/forward.vue
@@ -247,10 +247,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: {
@@ -372,12 +372,12 @@
               }
            });
         },
         // 计算提煤单数量,添加或删除时调用
         // 计算通知单数量,添加或删除时调用
         calculate(arr) {
            let total = arr.reduce((prev, cur) => {
               return cur.carNum + prev;
            }, 0);
            console.log(total, '提煤单一共的数据');
            console.log(total, '通知单一共的数据');
            if (this.roleType == 1) {
               if (Number(this.cars2) >= total) {
                  this.carNumSurplus1 = Number(this.cars2) - total;
@@ -385,7 +385,7 @@
                  this.whetherClick1 = false;
               } else {
                  this.carNumSurplus1 = 0;
                  this.$u.toast('剩余提煤单数量不足');
                  this.$u.toast('剩余通知单数量不足');
                  this.whetherClick = true;
                  this.whetherClick1 = true;
               }
@@ -397,7 +397,7 @@
                  this.whetherClick1 = false;
               } else {
                  this.carNumSurplusHuodai = 0;
                  this.$u.toast('剩余提煤单数量不足');
                  this.$u.toast('剩余通知单数量不足');
                  this.whetherClick = true;
                  this.whetherClick1 = true;
               }