| | |
| | | <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 --> |
| | | <u-button type="primary" |
| | | text="确定称重" |
| | | :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||globalWarning" |
| | | :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||globalWarning||addAndSubtractCoalDisabled" |
| | | :loading="isConfirmWeighLoading" |
| | | loadingText="确认" |
| | | @click="confirmWeigh" |
| | | throttleTime="800"></u-button> |
| | | <u-button type="primary" |
| | | text="返回装卸" |
| | | :disabled="addAndSubtractCoalDisabled" |
| | | :disabled="addAndSubtractCoalDisabled||isConfirmWeighLoading" |
| | | @click="addAndSubtractCoal" |
| | | class="jiajian" |
| | | v-if="outBuy&&!isSkinWeigh" |
| | |
| | | weighList: {}, |
| | | // 临时称重对象 |
| | | temporaryWeighObj: { |
| | | skin: 0, |
| | | hair: 0, |
| | | clean: 0 |
| | | skin: 0, //皮 |
| | | hair: 0, //毛 |
| | | clean: 0 //净重 |
| | | }, |
| | | infraredStatus: false, // 红外状态, |
| | | // 放空控制 |
| | |
| | | }, |
| | | ] |
| | | }, |
| | | mergeState: true, //合卡状态 |
| | | mergeState: true, //合卡状态 |
| | | // mergeStateShow: false, //合卡弹窗 |
| | | checkboxValue1: [], |
| | | isExceedOrigin: false, //是否超出毛重 |
| | |
| | | this.outBuy = !(this.weighList.orderType === '外购' || this.weighList.orderType === |
| | | '内购' || |
| | | this.weighList.orderType === '转入') |
| | | console.log(this.outBuy); |
| | | } else { |
| | | uni.hideLoading() |
| | | this.$u.toast('加载失败') |
| | |
| | | * @确认称重等待后端提供实时称重接口,获取皮重,毛重 |
| | | */ |
| | | confirmWeigh() { |
| | | if (this.isConfirmWeighLoading == false) { |
| | | this.isConfirmWeighLoading = true; |
| | | if (this.weighData.weigh != 0) { |
| | | // 如果正在称皮 |
| | | if (this.isSkinWeigh) { |
| | | // 如果平均皮重为0 |
| | | if (this.isAbnormalAvgSkin) { |
| | | this.abnormalModalShow = false |
| | | this.saveWeigh(); |
| | | } else { |
| | | let xx = new BigNumber(this.avgSkin) |
| | | let yy = new BigNumber(this.globalweigh) |
| | | if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) { |
| | | this.abnormalModalShow = true |
| | | this.skinAbnormal() |
| | | } else { |
| | | this.saveWeigh(); |
| | | } |
| | | } |
| | | } else { |
| | | this.isConfirmWeighLoading = true; |
| | | if (this.weighData.weigh != 0) { |
| | | // 如果正在称皮 |
| | | if (this.isSkinWeigh) { |
| | | // 如果平均皮重为0 |
| | | if (this.isAbnormalAvgSkin) { |
| | | this.abnormalModalShow = false |
| | | this.saveWeigh(); |
| | | } else { |
| | | let xx = new BigNumber(this.avgSkin) |
| | | let yy = new BigNumber(this.globalweigh) |
| | | if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) { |
| | | this.abnormalModalShow = true |
| | | this.skinAbnormal() |
| | | } else { |
| | | this.saveWeigh(); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | this.$u.toast('未能获取地磅重量'); |
| | | this.isConfirmWeighLoading = false; |
| | | this.saveWeigh(); |
| | | } |
| | | |
| | | } else { |
| | | this.$u.toast('未能获取地磅重量'); |
| | | this.isConfirmWeighLoading = false; |
| | | } |
| | | }, |
| | | // 确认称重接口 |
| | |
| | | console.log(res, '称重接口'); |
| | | if (res.code == 0) { |
| | | this.$u.toast('称重成功,即将返回上一页'); |
| | | this.isConfirmWeighLoading = false; |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | this.isConfirmWeighLoading = false; |
| | | }, 1000); |
| | | } else if (res.code === 3) { |
| | | this.isExceedOrigin = true |
| | |
| | | justify-content: space-between; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |