qingyiay
2023-10-13 eec82b55813387e20087989536cd32810b59cd48
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -189,6 +189,7 @@
            plain
            @click="evacuation"
            throttleTime="500"
            :loading="TwoEvacuationLoading"
            v-if='weighList.skin||weighList.hair'></u-button>
         <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 -->
         <u-button type="primary"
@@ -203,7 +204,8 @@
            :disabled="addAndSubtractCoalDisabled"
            @click="addAndSubtractCoal"
            class="jiajian"
            v-if="outBuy||!isSkinWeigh"></u-button>
            v-if="outBuy||!isSkinWeigh"
            :loading="addAndSubtractCoalLoading"></u-button>
      </view>
      <view v-show="isExceedOrigin"
         style="color: #ff6363;width: auto;margin: 0 auto;">
@@ -389,7 +391,9 @@
            refreshLoading: false,
            timer: null,
            afterEvacuationStatus: null, //放空后提煤单状态状态为21时提示‘等待磅房确认’
            afterEvacuationText: ''
            afterEvacuationText: '',
            TwoEvacuationLoading: false,
            addAndSubtractCoalLoading: false
         };
      },
      watch: {
@@ -582,6 +586,7 @@
         },
         // 加减煤
         addAndSubtractCoal() {
            this.addAndSubtractCoalLoading = true
            this.$reqPost('addAndSubtractCoal', {
               deptId: this.weighData.deptId,
               sceneId: this.weighData.sceneId,
@@ -592,6 +597,7 @@
               weigh: this.weighData.weigh
            }, 'json').then(res => {
               if (res.code == 0) {
                  this.addAndSubtractCoalLoading = false
                  this.$u.toast('操作成功,即将返回上一页');
                  setTimeout(() => {
                     uni.navigateBack({
@@ -599,7 +605,8 @@
                     });
                     this.isConfirmWeighLoading = false;
                  }, 1000);
                  console.log(res, '加减煤');
               } else {
                  this.$u.toast(res.msg ? res.msg : '操作失败');
               }
            });
         },
@@ -609,22 +616,24 @@
         },
         // 放空弹窗确认
         evacuationConfirm() {
            this.TwoEvacuationLoading = true;
            this.$reqPost('getTwoEvacuation', this.weighData, 'json').then(res => {
               console.log(res, '第二次放空');
               if (res.code == 0) {
                  this.$u.toast('操作成功');
                  // setTimeout(() => {
                  //    uni.navigateBack({
                  //       delta: 1
                  //    });
                  // }, 1000);
               if (res.msg.length > 4) { //大于4是等待后台确认
                  this.TwoEvacuationLoading = true;
                  this.evacuationModalShow = false;
                  this.afterEvacuationStatus = res.data.status === 21 || res.data.status === 22
                  this.afterEvacuationText = res.msg
               } else {
                  this.$u.toast(res.msg ? res.msg : '操作失败');
                  this.evacuationModalShow = true;
               } else { //小于4成功
                  this.TwoEvacuationLoading = false;
                  this.evacuationModalShow = false;
                  this.$u.toast('操作成功,即将返回上一页');
                  setTimeout(() => {
                     uni.navigateBack({
                        delta: 1
                     });
                  }, 1000);
               }
            });
         },
@@ -700,6 +709,7 @@
         confirmWeighConfirm() {
            this.changeconfirmWeighVisiable(false)
            this.isConfirmWeighLoading = false
            this.TwoEvacuationLoading = false;
            setTimeout(() => {
               this.$u.toast('即将返回上一页'),
                  uni.navigateBack({