| | |
| | | </view> |
| | | <view class="main-information" |
| | | v-if="weighList.orderType!=='转入'||weighList.orderType!=='转出'"> |
| | | <view class="prefix">矿场:</view> |
| | | <view class="prefix">仓库:</view> |
| | | <view class="suffix">{{ weighList.deptName || '' }}</view> |
| | | </view> |
| | | <view class="main-information" |
| | | v-if="weighList.orderType!=='转入'||weighList.orderType!=='转出'"> |
| | | <view class="prefix">煤场:</view> |
| | | <view class="prefix">基地:</view> |
| | | <view class="suffix">{{ weighList.filedName || '' }}</view> |
| | | </view> |
| | | <view class="main-information"> |
| | | <!-- <view class="main-information"> |
| | | <view class="prefix">煤种名称:</view> |
| | | <view class="suffix">{{ weighList.coalName || '' }}</view> |
| | | </view> |
| | | </view> --> |
| | | <view class="main-information"> |
| | | <view class="prefix">订单类型:</view> |
| | | <view class="suffix">{{ weighList.orderType || '' }}</view> |
| | |
| | | <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 --> |
| | | <u-button type="primary" |
| | | text="确定称重" |
| | | :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh " |
| | | :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||globalWarning" |
| | | :loading="isConfirmWeighLoading" |
| | | loadingText="确认" |
| | | @click="confirmWeigh"></u-button> |
| | |
| | | }, |
| | | watch: { |
| | | realTimeWeigh(newV, oldV) { |
| | | if (this.weighList.orderType == '外销' || this.weighList.orderType == '内销' || this.weighList.orderType == |
| | | '转出') { |
| | | if (!this.showWeigh.skin) { |
| | | this.temporaryWeighObj.skin = newV; |
| | | } else { |
| | | this.temporaryWeighObj.hair = newV; |
| | | this.isweigh = Number(this.currentClean) > this.weighList.orderSurplus || Number(this |
| | | .currentClean) < 0; |
| | | } |
| | | } else if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList |
| | | .orderType == '转入') { |
| | | if (!this.showWeigh.hair) { |
| | | this.temporaryWeighObj.hair = newV; |
| | | } else { |
| | | this.temporaryWeighObj.skin = newV; |
| | | this.isweigh = Number(this.currentClean) < 0 || this.showWeigh.skin < newV && this.showWeigh |
| | | .skin > 0; |
| | | } |
| | | } |
| | | |
| | | }, |
| | | // 监听重量变化 |
| | | globalweigh: { |
| | | handler: function(newV) { |
| | | this.weighData.weigh = this.realTimeWeigh = newV; |
| | | console.log(this.realTimeWeigh, '真实重量改变了'); |
| | | if (this.weighList.orderType == '外销' || this.weighList.orderType == '内销' || this.weighList |
| | | .orderType == '转出') { |
| | | if (!this.showWeigh.skin) { |
| | | this.temporaryWeighObj.skin = newV; |
| | | } else { |
| | | this.temporaryWeighObj.hair = newV; |
| | | this.isweigh = Number(this.currentClean) > this.weighList.orderSurplus || Number(this |
| | | .currentClean) < 0; |
| | | } |
| | | } else if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList |
| | | .orderType == '转入') { |
| | | if (!this.showWeigh.hair) { |
| | | this.temporaryWeighObj.hair = newV; |
| | | } else { |
| | | this.temporaryWeighObj.skin = newV; |
| | | this.isweigh = Number(this.currentClean) < 0 || this.showWeigh.skin < newV && this |
| | | .showWeigh |
| | | .skin > 0; |
| | | } |
| | | } |
| | | }, |
| | | deep: true |
| | | } |
| | |
| | | // this.realTimeWeigh = 0 |
| | | }, |
| | | computed: { |
| | | ...mapState(['globalweigh', 'globalinfraredStatus']), |
| | | ...mapState(['globalweigh', 'globalinfraredStatus', 'globalWarning']), |
| | | token() { |
| | | return uni.getStorageSync('token'); |
| | | }, |
| | |
| | | }, |
| | | currentClean() { |
| | | if (!this.currentSkin) return '' |
| | | return (this.currentHair - this.currentSkin).toFixed(2) |
| | | if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList |
| | | .orderType == '转入') { |
| | | return (this.currentHair - this.currentSkin).toFixed(2) |
| | | } else { |
| | | return !this.showWeigh.skin ? this.currentSkin : (this.currentHair - this.currentSkin).toFixed(2) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | methods: { |