| | |
| | | this.init(); |
| | | this.changeWeigh('') |
| | | this.realTimeWeigh = 0 |
| | | console.log(this.abnormalModalShow); |
| | | }, |
| | | components: { |
| | | combinedTitle |
| | |
| | | }; |
| | | }, |
| | | watch: { |
| | | realTimeWeigh(newV, oldV) { |
| | | |
| | | }, |
| | | // 监听重量变化 |
| | | globalweigh: { |
| | | deep: true, |
| | |
| | | this.temporaryWeighObj.skin = newV; |
| | | let xx = new BigNumber(this.avgSkin) |
| | | let yy = new BigNumber(newV) |
| | | if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) { |
| | | this.errorTipShow = true |
| | | } |
| | | this.errorTipShow = xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2 |
| | | } else { |
| | | this.isSkinWeigh = false; |
| | | this.temporaryWeighObj.hair = newV; |
| | |
| | | this.temporaryWeighObj.skin = newV; |
| | | let xx = new BigNumber(this.avgSkin) |
| | | let yy = new BigNumber(newV) |
| | | if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) { |
| | | this.errorTipShow = true |
| | | } |
| | | this.errorTipShow = xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2 |
| | | this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed( |
| | | 2); |
| | | this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this |
| | |
| | | computed: { |
| | | ...mapState(['globalweigh', 'globalinfraredStatus']), |
| | | coalContactClean() { |
| | | return (Number(this.weighData.coalContactHair) - Number(this.weighData.coalContactSkin)).toFixed(2); |
| | | let xx = BigNumber(this.weighData.coalContactHair) |
| | | let yy = BigNumber(this.weighData.coalContactSkin) |
| | | return xx.minus(yy).toNumber().toFixed(2) |
| | | }, |
| | | token() { |
| | | return uni.getStorageSync('token'); |
| | |
| | | if (this.weighData.weigh != 0) { |
| | | // 如果正在称皮 |
| | | if (this.isSkinWeigh) { |
| | | // 如果第一次称重 |
| | | // 如果平均皮重为0 |
| | | if (this.isAbnormalAvgSkin) { |
| | | this.abnormalModalShow = false |
| | | this.saveWeigh(); |
| | |
| | | this.tmTaskCoalList = res.data.tmTaskCoalList |
| | | /** |
| | | * @description true的话是第一次称, false就不是,没有历史,平均皮重为0是第一次也是正常 */ |
| | | this.isAbnormalAvgSkin = (Array.isArray(this.tmTaskCoalList) && this |
| | | .tmTaskCoalList.length === 0 || !this.tmTaskCoalList) && this.avgSkin == 0 |
| | | // this.isAbnormalAvgSkin = (Array.isArray(this.tmTaskCoalList) && this |
| | | // .tmTaskCoalList.length === 0 || !this.tmTaskCoalList) && this.avgSkin == 0 |
| | | this.isAbnormalAvgSkin = this.avgSkin == 0 |
| | | } else { |
| | | uni.hideLoading() |
| | | this.$u.toast('加载失败') |