qingyiay
2023-12-25 aef949a659d073443e81f22686b44bd440a69a0e
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -503,33 +503,31 @@
          * @确认称重等待后端提供实时称重接口,获取皮重,毛重
          */
         confirmWeigh() {
            if (this.isConfirmWeighLoading == false) {
               this.isConfirmWeighLoading = true;
               if (this.weighData.weigh != 0) {
                  // 如果正在称皮
                  if (this.isSkinWeigh) {
                     // 如果平均皮重为0
                     if (this.isAbnormalAvgSkin) {
                        this.abnormalModalShow = false
                        this.saveWeigh();
                     } else {
                        let xx = new BigNumber(this.avgSkin)
                        let yy = new BigNumber(this.globalweigh)
                        if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) {
                           this.abnormalModalShow = true
                           this.skinAbnormal()
                        } else {
                           this.saveWeigh();
                        }
                     }
                  } else {
            this.isConfirmWeighLoading = true;
            if (this.weighData.weigh != 0) {
               // 如果正在称皮
               if (this.isSkinWeigh) {
                  // 如果平均皮重为0
                  if (this.isAbnormalAvgSkin) {
                     this.abnormalModalShow = false
                     this.saveWeigh();
                  } else {
                     let xx = new BigNumber(this.avgSkin)
                     let yy = new BigNumber(this.globalweigh)
                     if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) {
                        this.abnormalModalShow = true
                        this.skinAbnormal()
                     } else {
                        this.saveWeigh();
                     }
                  }
               } else {
                  this.$u.toast('未能获取地磅重量');
                  this.isConfirmWeighLoading = false;
                  this.saveWeigh();
               }
            } else {
               this.$u.toast('未能获取地磅重量');
               this.isConfirmWeighLoading = false;
            }
         },
         // 确认称重接口
@@ -540,11 +538,11 @@
                  console.log(res, '称重接口');
                  if (res.code == 0) {
                     this.$u.toast('称重成功,即将返回上一页');
                     this.isConfirmWeighLoading = false;
                     setTimeout(() => {
                        uni.navigateBack({
                           delta: 1
                        });
                        this.isConfirmWeighLoading = false;
                     }, 1000);
                  } else if (res.code === 3) {
                     this.isExceedOrigin = true