| | |
| | | :loading="isConfirmWeighLoading" |
| | | loadingText="确认" |
| | | @click="confirmWeigh" |
| | | v-show="!historyBtn"></u-button> |
| | | v-if="!historyBtn"></u-button> |
| | | <u-button type="primary" |
| | | text="返回加减吨" |
| | | :disabled="addAndSubtractCoalDisabled" |
| | |
| | | v-if="outBuy"></u-button> |
| | | </view> |
| | | <view style="width: 200rpx;margin: auto;position: relative;" |
| | | v-if="!historyBtn"><u-button type="primary" |
| | | v-if="historyBtn"><u-button type="primary" |
| | | text="显示历史皮重" |
| | | @click.stop="displayHistory"></u-button></view> |
| | | <Transition name="slide-fade"> |
| | |
| | | import { webSocketUrl } from '@/api/request.js'; |
| | | import { mapState, mapMutations } from 'vuex'; |
| | | import combinedTitle from '@/components/combined-title/combined-title.vue'; |
| | | import BigNumber from "bignumber.js" |
| | | export default { |
| | | onLoad(params) { |
| | | this.takeCoalId = params.takeCoalId; |
| | |
| | | '转出') { |
| | | if (this.weighList.skin == 0) { |
| | | this.temporaryWeighObj.skin = newV; |
| | | this.getAverageSkin() |
| | | if (this.avgSkin < newV) { |
| | | this.abnormalModalShow = true |
| | | this.historyBtn = true |
| | | } |
| | | this.getAverageSkin(newV) |
| | | } else { |
| | | this.temporaryWeighObj.hair = newV; |
| | | this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed( |
| | |
| | | this.temporaryWeighObj.hair = newV; |
| | | } else { |
| | | this.temporaryWeighObj.skin = newV; |
| | | this.getAverageSkin() |
| | | if (this.avgSkin < newV) { |
| | | this.abnormalModalShow = true |
| | | this.historyBtn = true |
| | | } |
| | | this.getAverageSkin(newV) |
| | | this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed( |
| | | 2); |
| | | this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this |
| | |
| | | this.isInputOrigin = true; |
| | | } |
| | | }, |
| | | getAverageSkin() { |
| | | getAverageSkin(weigh) { |
| | | uni.showLoading({ |
| | | title: "加载中" |
| | | }) |
| | |
| | | uni.hideLoading() |
| | | this.avgSkin = res.data.avgSkin |
| | | this.tmTaskCoalList = res.data.tmTaskCoalList |
| | | let xx = new BigNumber(this.avgSkin) |
| | | let yy = new BigNumber(weigh) |
| | | console.log(weigh, this.avgSkin, yy.minus(xx).toNumber()); |
| | | if (xx.minus(yy).toNumber() <= 0.2) { |
| | | this.abnormalModalShow = true |
| | | this.historyBtn = true |
| | | } |
| | | } else { |
| | | uni.hideLoading() |
| | | this.$u.toast('加载失败') |