qingyiay
2023-03-31 04f3f15c930c2b02187d0ce11d68978b65361d54
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -20,7 +20,7 @@
               </view> -->
            </view>
         </view>
         <view class="bottom"><text>TIP:当前状态正常可以称重</text></view>
         <view class="bottom"><text>TIP:当前状态为正常时可以称重</text></view>
      </view>
      <view class="two">
         <p>订单编号:{{ weighList.code || '' }}</p>
@@ -34,7 +34,8 @@
         <p>矿场名称:{{ weighList.filedName || '' }}</p>
      </view>
      <view class="three">
         <!-- 外销订单成皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 -->
         <u-button type="primary" text="放空" plain @click="evacuation" throttleTime="500"></u-button>
         <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 -->
         <u-button
            type="primary"
            text="确定称重"
@@ -45,7 +46,17 @@
         ></u-button>
         <u-button type="primary" text="返回加减吨" :disabled="addAndSubtractCoalDisabled" v-if="weighList.orderTye == '外销'" @click="addAndSubtractCoal"></u-button>
      </view>
      <view class="four">如您需要调整装载货品吨数,请点击返回加减吨</view>
      <view class="four" v-if="weighList.orderTye == '外销'">如您需要调整装载货品吨数,请点击返回加减吨</view>
      <view class="evacuationModal">
         <u-modal
            :show="evacuationModalShow"
            :title="evacuationTitle"
            :content="evacuationContent"
            :showCancelButton="true"
            @confirm="evacuationConfirm"
            @cancel="evacuationCancel"
         ></u-modal>
      </view>
   </view>
</template>
@@ -95,7 +106,11 @@
            hair: 0,
            clean: 0
         },
         infraredStatus: false // 红外状态
         infraredStatus: false, // 红外状态,
         // 放空控制
         evacuationModalShow: false,
         evacuationTitle: '第二次放空确认',
         evacuationContent: '是否确认放空'
      };
   },
   watch: {
@@ -105,7 +120,7 @@
               this.temporaryWeighObj.skin = this.realTimeWeigh;
            } else {
               this.temporaryWeighObj.hair = this.realTimeWeigh;
               this.temporaryWeighObj.clean = this.temporaryWeighObj.hair - this.weighList.skin;
               this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2);
            }
         } else if (this.weighList.orderTye == '外购') {
            if (this.weighList.hair == 0) {
@@ -137,6 +152,18 @@
      }
   },
   methods: {
      // 放空
      evacuation() {
         this.evacuationModalShow = true;
      },
      // 放空弹窗确认
      evacuationConfirm() {
         this.evacuationModalShow = false;
      },
      // 放空弹窗取消
      evacuationCancel() {
         this.evacuationModalShow = false;
      },
      init() {
         // 获取称重信息
         this.$reqGet('weighList', { id: this.takeCoalId }).then(res => {
@@ -161,7 +188,7 @@
                  if (this.weighList.skin ? (this.weighList.skin < this.realTimeWeigh ? true : false) : true) {
                     this.saveWeigh();
                  } else {
                     this.$u.toast('毛重不能小于皮重');
                     this.$u.toast('毛重不q能小于皮重');
                     this.isConfirmWeighLoading = false;
                  }
               } else {