qingyiay
2023-07-14 f5d9fc10d155aed63fdf91217380610faa60f9e0
pages/public-page/forward/forward.vue
@@ -158,10 +158,10 @@
                  return {
                     id: item.id,
                     orderPlanId: item.orderPlanId,
                     name: item.xsUserName === null ? item.fleetName : item.xsUserName,
                     name: item.xsUserName ? item.xsUserName : item.fleetName,
                     carNum: item.carNum,
                     xsUserId: item.xsUserId === null ? 0 : item.xsUserId,
                     fleetId: item.fleetId === null ? 0 : item.fleetId,
                     xsUserId: item.xsUserId ? item.xsUserId : 0,
                     fleetId: item.fleetId ? item.fleetId : 0,
                     checkboxValue1: '',
                     vid: `${new Date().getTime()}${index}${item.id}`
                  };
@@ -173,8 +173,8 @@
                     orderPlanId: item.orderPlanId,
                     name: item.fleetName,
                     carNum: item.carNum,
                     xsUserId: item.xsUserId === null ? 0 : item.xsUserId,
                     fleetId: item.fleetId === null ? 0 : item.fleetId,
                     xsUserId: item.xsUserId ? 0 : item.xsUserId,
                     fleetId: item.fleetId ? 0 : item.fleetId,
                     checkboxValue1: '',
                     vid: `${new Date().getTime()}${index}${item.id}`
                  };
@@ -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;
               }
@@ -413,7 +413,7 @@
                     that.calculate(that.jhOrderPlanForwardList);
                     if (that.roleType == 1) {
                        if (that.jhOrderPlanForwardList[index].carNum < Number(that
                           .carNumSurplus1)) {
                              .carNumSurplus1)) {
                           that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
                           that.jhOrderPlanForwardList.forEach((v, i) => {
                              if (index != i) {