| | |
| | | }, |
| | | 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 |
| | | } |
| | |
| | | }, |
| | | 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: { |