qingyiay
2023-04-21 fb4fa76b4c1a93c833cd97f97f41b6158ab1aef7
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;
               }
            }
         }
      },