yangan
2023-11-02 292019d23db79aa99535735e13e6b3c129d87251
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -517,6 +517,20 @@
                  }
               })
         },
         // 校验数据是否合格
         checkValue(data,target){
            if(!data.length){
               return
            }
            let flag = data.find(item=>item[target] <=0);
            console.log(flag,'flag');
             if(flag){
               return false
            }else{
               return true;
            }
         },
         // 物资明细
         goodsPopoverShow(index) {
            if (this.roleType === 4 && !this.flag) {
@@ -560,13 +574,17 @@
         discountInputHandle(value, index, clean) {
            console.log('计算净重',value, index, clean)
            this.showWeigh[index].cinderWeight = (value - 0)
            if (clean) {
               let x = new BigNumber(clean)
               let x = new BigNumber(clean - 0)
               let y = new BigNumber(value - 0)
               let z =  new BigNumber(this.showWeigh[index].unqualifiedWeight - 0)
               console.log(clean,value,this.showWeigh[index].unqualifiedWeight - 0,'扣渣')
               this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2)
            }
               console.log(clean,value,this.showWeigh[index].unqualifiedWeight - 0,'扣渣');
               if(x.minus(y).minus(z).toFixed(2) <= 0){
                  this.showWeigh[index].weight = '0';
                  this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
               }else{
                  this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2)
               }
            
         },
         // 选择不合格品名
@@ -587,10 +605,18 @@
         },
         // 不合格重量输入
         unqualifiedWeightInputHandle(value, index, clean) {
            let x = new BigNumber(clean)
            // 判断是不是有净重才进行计算
            let x = new BigNumber(clean - 0)
            let y = new BigNumber(value - 0)
            let z = new BigNumber(this.showWeigh[index].cinderWeight -  0)  ;
            this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2) || ''
            let z = new BigNumber(this.showWeigh[index].cinderWeight -  0);
            if(x.minus(y).minus(z).toFixed(2)  <= 0){
                  this.showWeigh[index].weight = '0';
                  this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
               }else{
                  this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2) ;
               }
         },
         // 删除图片
         deletePic(event) {