| | |
| | | </view> |
| | | <view v-show="isExceedOrigin" |
| | | style="color: #ff6363;width: auto;margin: 0 auto;"> |
| | | <text v-if="weighList.orderType == '外购'">超出原发毛重,磅房人员确认中,请勿离开此页面</text> |
| | | <text v-else>超出最大毛重,磅房人员确认中,请勿离开此页面</text> |
| | | <text v-if="weighList.orderType == '外购'">超出原发{{avgFalse ? '皮重' :'毛重'}} ,磅房人员确认中,请勿离开此页面</text> |
| | | <text v-else>超出最大 {{avgFalse ? '皮重' :'毛重'}},磅房人员确认中,请勿离开此页面</text> |
| | | </view> |
| | | <view v-show="afterEvacuationStatus" |
| | | style="color: #ff6363;width: auto;margin: 0 auto;"> |
| | |
| | | <script> |
| | | import { webSocketUrl } from '@/api/request.js'; |
| | | import { mapState, mapMutations } from 'vuex'; |
| | | import { BaseUrl } from '@/api/publicInterface.js' |
| | | import combinedTitle from '@/components/combined-title/combined-title.vue'; |
| | | import BigNumber from "bignumber.js" |
| | | export default { |
| | |
| | | this.weighHouseCode = params.weighHouseCode; |
| | | this.primarySkin = params.primarySkin; |
| | | this.primaryHair = params.primaryHair; |
| | | this.deptId = params.deptId; |
| | | this.primaryClean = params.primaryClean; |
| | | if (params.overTmWaixiao !== 'null') { |
| | | this.weighData.overTmWaixiao = 1 |
| | | } |
| | | this.changeweighHouseCode(params.weighHouseCode); |
| | | this.init(); |
| | | this.getDept(); |
| | | this.changeWeigh('') |
| | | this.realTimeWeigh = 0 |
| | | }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | avgFalse:false, // 是否皮重异常 |
| | | weighData: { |
| | | //确认称重接口参数 |
| | | deptId: '', |
| | |
| | | carNo: '', |
| | | gateCameraId: '', |
| | | equipmentCode: '', |
| | | avgSkin:'', |
| | | weigh: 0, |
| | | tmCode: '', |
| | | sceneInOut: '', |
| | |
| | | abnormalText: '' |
| | | }, |
| | | takeCoalId: null, |
| | | deptId:'', |
| | | weightReal:0, // 称重浮动数据 |
| | | weighHouseCode: '', |
| | | isConfirmWeighLoading: false, //确定称重按钮 |
| | | realTimeWeigh: 0, |
| | |
| | | this.temporaryWeighObj.skin = newV; |
| | | let xx = new BigNumber(this.avgSkin) |
| | | let yy = new BigNumber(newV) |
| | | this.errorTipShow = (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) && |
| | | this.errorTipShow = (xx.minus(yy).toNumber() <= -this.weightReal || xx.minus(yy).toNumber() >= this.weightReal) && |
| | | this.avgSkin !== 0 |
| | | } else { |
| | | this.isSkinWeigh = false; |
| | |
| | | this.temporaryWeighObj.skin = newV; |
| | | let xx = new BigNumber(this.avgSkin) |
| | | let yy = new BigNumber(newV) |
| | | this.errorTipShow = (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) && |
| | | this.errorTipShow = (xx.minus(yy).toNumber() <= -this.weightReal || xx.minus(yy).toNumber() >= this.weightReal) && |
| | | this.avgSkin !== 0; |
| | | let x = new BigNumber(this.weighList.hair) |
| | | let y = new BigNumber(this.temporaryWeighObj.skin) |
| | |
| | | } 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) { |
| | | if (xx.minus(yy).toNumber() <= -this.weightReal || xx.minus(yy).toNumber() >= this.weightReal) { |
| | | this.abnormalModalShow = true |
| | | this.skinAbnormal() |
| | | } else { |
| | |
| | | this.isConfirmWeighLoading = false; |
| | | }, 1000); |
| | | } else if (res.code === 3) { |
| | | this.isExceedOrigin = true |
| | | if(/皮重/.test(res.msg)){ |
| | | this.avgFalse = true; |
| | | this.isExceedOrigin = true; |
| | | }else{ |
| | | this.avgFalse = false; |
| | | this.isExceedOrigin = true; |
| | | } |
| | | |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '称重失败,请稍后重试'); |
| | | this.isConfirmWeighLoading = false |
| | |
| | | this.$reqGet('getAvgSkin', { xsUserId1: this.weighList.xsUserId1 }).then(res => { |
| | | if (res.code === 0) { |
| | | uni.hideLoading() |
| | | this.avgSkin = res.data.avgSkin |
| | | this.avgSkin = res.data.avgSkin; |
| | | this.weighData.avgSkin = res.data.avgSkin; |
| | | this.tmTaskCoalList = res.data.tmTaskCoalList |
| | | /** |
| | | * @description true的话是第一次称, false就不是,没有历史,平均皮重为0是第一次也是正常 */ |
| | |
| | | delta: 1 |
| | | }) |
| | | }, 800) |
| | | }, |
| | | //获取重量阈值 |
| | | getDept(){ |
| | | uni.request({ |
| | | url: `${BaseUrl}/admin/dept/${this.deptId}`, |
| | | method: 'GET', |
| | | header: { |
| | | 'content-type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | success: (res) => { |
| | | console.log(res.data.data,'res.datra') |
| | | res.data.data.skinSafeValue ? this.weightReal = res.data.data.skinSafeValue : this.weightReal = ''; |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }; |