qingyiay
2023-11-08 fab582b94341913044d17ccd463d97ea20945e3e
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -158,7 +158,7 @@
               <view class="suffix">{{ weighList.orderSurplus ||""  }}</view>
               <text style="color: #ff6363;font-weight: bold;font-size: 26rpx;"
                  class="error-tip"
                  v-show="orderSurplusLess">* 订单余量不足</text>
                  v-show="orderSurplusLess&&!isSpecial">* 订单余量不足</text>
            </view>
         </view>
      </view>
@@ -237,12 +237,11 @@
                  :model='abnormalForm'
                  :rules="rules"
                  ref="uForm">
                  <u-form-item prop="abnormalContent">
                  <u-form-item>
                     <u-textarea v-model="abnormalForm.abnormalContent"
                        confirmType="done"
                        placeholder="请输入异常原因(字数不少于5个字)"
                        height='140'
                        count
                        :height='200'
                        border="surround"
                        autoHeight></u-textarea>
                  </u-form-item>
@@ -323,8 +322,9 @@
               coalContactClean: 0,
               coalContactHair: 0,
               coalContactSkin: 0,
               isMerge: '0', //1是 0不是  默认0  是否合卡
               isBackground: '0'
               isMerge: '0', //1是 0不是  默认0  是否合卡 已无用
               isBackground: '0',
               abnormalText: ''
            },
            takeCoalId: null,
            weighHouseCode: '',
@@ -368,7 +368,7 @@
            errorTipShow: false,
            rules: {
               abnormalContent: [{
                     required: true,
                     required: false,
                     message: "请填写异常原因",
                     trigger: ['blur', 'change'],
                     type: 'string'
@@ -393,7 +393,8 @@
            afterEvacuationStatus: null, //放空后提煤单状态状态为21时提示‘等待磅房确认’
            afterEvacuationText: '',
            TwoEvacuationLoading: false,
            addAndSubtractCoalLoading: false
            addAndSubtractCoalLoading: false,
            isSpecial: null //1 是特殊 0不是特殊
         };
      },
      watch: {
@@ -420,13 +421,11 @@
                     let x = new BigNumber(this.temporaryWeighObj.hair)
                     let y = new BigNumber(this.weighList.skin)
                     this.temporaryWeighObj.clean = x.minus(y).toNumber().toFixed(2)
                     // this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(
                     //    2);
                     this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
                     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
                        .clean < 0) && !this.isSpecial
                     this.orderSurplusLess = (this.temporaryWeighObj.clean > this.weighList.orderSurplus) && !
                        this.weighList.source
                  }
               } else if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList
                  .orderType == '转入') {
@@ -445,13 +444,11 @@
                     let x = new BigNumber(this.weighList.hair)
                     let y = new BigNumber(this.temporaryWeighObj.skin)
                     this.temporaryWeighObj.clean = x.minus(y).toNumber().toFixed(2)
                     // this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(
                     //    2);
                     this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
                     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
                        .clean < 0) && !this.isSpecial
                     this.orderSurplusLess = (this.temporaryWeighObj.clean > this.weighList.orderSurplus) && !
                        this.weighList.source
                  }
               }
            }
@@ -486,6 +483,9 @@
         },
         sideline() {
            return this.weighList.orderType == '内购' || this.weighList.orderType == '转入';
         },
         isNeedOrigin() {
            return uni.getStorageSync('isNeedOrigin')
         }
      },
@@ -503,6 +503,7 @@
               if (res.code == 0) {
                  uni.hideLoading()
                  this.weighList = res.data;
                  this.isSpecial = res.data.isSpecial
                  this.weighData.deptId = res.data.deptId;
                  this.weighData.tmId = res.data.id;
                  this.weighData.carNo = res.data.carNo;
@@ -510,7 +511,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
                  this.weighList.source = res.data.source //0手动 1不是 是0判断余量不足
                  if (this.weighList.orderType == '外购') {
                     this.firstHairCustomernameShow = true;
                     if (this.weighList.hair > 0) {
@@ -692,26 +693,13 @@
         },
         // 提交异常原因
         abnormalConfirm() {
            this.weighData.abnormalText = this.abnormalContent
            this.weighData.abnormalText = this.abnormalForm.abnormalContent
            this.saveWeigh()
            this.abnormalModalShow = false
         },
         skinAbnormal() {
            this.$reqPost('skinAbnormal', { sceneId: this.weighData.sceneId, tmId: this.weighData.tmId }, 'params')
         },
         // mergeStateChange(e) {
         //    if (e.length !== 0) {
         //       this.weighData.isMerge = 1
         //       this.MergeState = true
         //       this.isweigh = false
         //       this.orderSurplusLess = false
         //    } else {
         //       this.weighData.isMerge = 0
         //       this.MergeState = false
         //       this.isweigh = true
         //       this.orderSurplusLess = true
         //    }
         // },
         confirmWeighConfirm() {
            this.changeconfirmWeighVisiable(false)
            this.isConfirmWeighLoading = false
@@ -743,7 +731,8 @@
      .slot-content {
         width: 96%;
         border: 1rpx solid rgb(220, 223, 230);
         height: 210rpx;
         border-bottom: 1rpx solid rgb(220, 223, 230);
      }
      .table-title {
@@ -998,12 +987,17 @@
      }
      .three {
         margin: 0 auto vww(30);
         flex: 0.7;
         width: 60%;
         height: vww(60);
         margin: vww(20) auto;
         display: flex;
         justify-content: space-between;
         align-items: center;
         color: #939393;
         .u-button {
            letter-spacing: vww(4);
            &:nth-of-type(2) {
               margin-left: vww(10);
            }