qingyiay
2023-09-18 e96eb325b42b25ecd83c065c4abd8ce9999cd468
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -218,11 +218,12 @@
            plain
            @click="evacuation"
            throttleTime="500"
            :disabled="!isEvacuation"></u-button>
            :disabled="!isEvacuation"
            v-if='weighList.skin||weighList.hair'></u-button>
         <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 -->
         <u-button type="primary"
            text="确定称重"
            :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh || !isInputOrigin"
            :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh || !isInputOrigin||!mergeState"
            :loading="isConfirmWeighLoading"
            loadingText="确认"
            @click="confirmWeigh"
@@ -268,6 +269,14 @@
               </u--form>
            </view>
         </u-modal>
      </view>
      <view class="mergeState">
         <u-modal :show="mergeStateShow"
            title="合卡确认"
            content="是否确认合卡"
            :showCancelButton="true"
            @confirm="mergeConfirm"
            @cancel="mergeCancel"></u-modal>
      </view>
   </view>
</template>
@@ -315,7 +324,8 @@
               sceneInOut: '',
               coalContactClean: 0,
               coalContactHair: 0,
               coalContactSkin: 0
               coalContactSkin: 0,
               isMerge: 0 //1是 0不是  默认0  是否合卡
            },
            // 是否填写原发信息
            isInputOrigin: false,
@@ -383,8 +393,9 @@
                     }
                  },
               ]
            }
            },
            mergeState: true, //合卡状态
            mergeStateShow: false, //合卡弹窗
         };
      },
      watch: {
@@ -410,6 +421,8 @@
                     this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
                        .temporaryWeighObj
                        .clean < 0;
                     this.orderSurplusLess = this.temporaryWeighObj.clean > this.weighList.orderSurplus
                     this.mergeStateShow = this.weighList.source !== 0 && this.orderSurplusLess
                  }
               } else if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList
                  .orderType == '转入') {
@@ -428,6 +441,7 @@
                        .temporaryWeighObj
                        .clean < 0;
                     this.orderSurplusLess = this.temporaryWeighObj.clean > this.weighList.orderSurplus
                     this.mergeStateShow = this.weighList.source !== 0 && this.orderSurplusLess
                  }
               }
            }
@@ -451,13 +465,11 @@
         isEvacuation() {
            if (this.weighList.orderType == '外销' || this.weighList.orderType == '内销' || this.weighList.orderType ==
               '转出') {
               return (this.weighList.skin === 0 ? this.temporaryWeighObj.skin : this.weighList.skin) == this
                  .temporaryWeighObj.hair;
               return this.weighList.skin == this.temporaryWeighObj.hair;
            }
            if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList.orderType ==
               '转入') {
               return (this.weighList.hair === 0 ? this.temporaryWeighObj.skin : this.weighList.hair) == this
                  .temporaryWeighObj.hair;
               return this.weighList.hair == this.temporaryWeighObj.skin;
            }
         },
         sideline() {
@@ -483,6 +495,7 @@
                  this.weighData.filedId = res.data.filedId;
                  this.weighData.coalContactHair = res.data.hairTwo ? res.data.hairTwo : 0;
                  this.weighData.coalContactSkin = res.data.skinTwo ? res.data.skinTwo : 0;
                  this.weighList.source = res.data.source
                  if (this.weighList.orderType == '外购') {
                     this.firstHairCustomernameShow = true;
                     if (this.weighList.hair > 0) {
@@ -550,7 +563,7 @@
                        this.isConfirmWeighLoading = false;
                     }, 1000);
                  } else {
                     this.$u.toast('称重失败,请稍后重试');
                     this.$u.toast(res.msg ? res.msg : '称重失败,请稍后重试');
                     this.isConfirmWeighLoading = false
                  }
               })
@@ -661,7 +674,21 @@
            this.$reqPost('skinAbnormal', { sceneId: this.weighData.sceneId }, 'params').then(() => {
               this.abnormalModalShow = false
            })
         }
         },
         mergeConfirm() {
            this.mergeStateShow = false
            this.weighData.isMerge = 1
            this.MergeState = true
            this.isweigh = false
            this.orderSurplusLess = false
         },
         mergeCancel() {
            this.mergeStateShow = false
            this.weighData.isMerge = 0
            this.MergeState = false
            this.isweigh = true
            this.orderSurplusLess = true
         },
      }
   };
</script>