| | |
| | | <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 --> |
| | | <u-button type="primary" |
| | | text="确定称重" |
| | | :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||!mergeState||isExceedOrigin" |
| | | :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||!mergeState" |
| | | :loading="isConfirmWeighLoading" |
| | | loadingText="确认" |
| | | @click="confirmWeigh" |
| | |
| | | class="jiajian" |
| | | v-if="outBuy||!isSkinWeigh"></u-button> |
| | | </view> |
| | | <view v-show="isConfirmWeighLoading" |
| | | <view v-show="isExceedOrigin" |
| | | style="color: #ff6363;width: auto;margin: 0 auto;"> |
| | | 超出毛重,磅房人员确认中,请勿离开此页面 |
| | | </view> |
| | | <!-- <view class="four"> |
| | | <u-button type="primary" |
| | | text="刷新" |
| | | @click.stop="RefreshHandle" |
| | | icon="reload" |
| | | throttle-time="800" |
| | | :loading="refreshLoading"></u-button> |
| | | </view> --> |
| | | <!-- 放空弹窗 --> |
| | | <view class="evacuationModal"> |
| | | <u-modal :show="evacuationModalShow" |
| | |
| | | <view class=""> |
| | | <u-modal :show="abnormalModalShow" |
| | | title="异常原因" |
| | | :showCancelButton="true" |
| | | :showCancelButton="false" |
| | | @confirm="abnormalConfirm" |
| | | confirmText="提交"> |
| | | <view class="slot-content"> |
| | |
| | | this.realTimeWeigh = 0 |
| | | }, |
| | | onShow() { |
| | | if (this.timer) { |
| | | clearTimeout(this.timer) |
| | | } |
| | | this.timer = setTimeout(() => { |
| | | if (!this.globalweigh) { |
| | | console.log('称重时自动重连'); |
| | |
| | | mergeState: true, //合卡状态 |
| | | mergeStateShow: false, //合卡弹窗 |
| | | checkboxValue1: [], |
| | | isExceedOrigin: false, //是否超出原发毛重 |
| | | isExceedOrigin: false, //是否超出毛重 |
| | | refreshLoading: false, |
| | | timer: null |
| | | }; |
| | |
| | | } |
| | | } |
| | | }, |
| | | confirmWeighVisiable(v) { |
| | | if (v) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['globalweigh', 'globalinfraredStatus', 'globalisconnect', 'globalisUploadimg', 'globalisLogin', |
| | |
| | | ...mapMutations(['changeweighHouseCode', 'changeisLogin', 'changeWeigh', 'changeconfirmWeighVisiable', |
| | | 'changesocketTask', 'changereconnectNum' |
| | | ]), |
| | | RefreshHandle() { |
| | | if (this.globalisconnect) return this.$u.toast('已连接,无需刷新') |
| | | this.refreshLoading = true |
| | | if (!this.globalisconnect && !this.globalisUploadimg && this.globalisLogin) { |
| | | if (!this.is_open_socket) { |
| | | this.$store.dispatch('websocketInit') |
| | | this.changeisconnect(true); |
| | | this.refreshLoading = false |
| | | this.$u.toast('刷新成功') |
| | | } |
| | | } |
| | | }, |
| | | init() { |
| | | uni.showLoading({ |
| | | title: "加载中" |
| | |
| | | .then(res => { |
| | | console.log(res, '称重接口'); |
| | | if (res.code == 0) { |
| | | this.$u.toast('称重成功'); |
| | | this.$u.toast('称重成功,即将返回上一页'); |
| | | this.isConfirmWeighLoading = false; |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | this.isConfirmWeighLoading = false; |
| | | }, 1000); |
| | | } else if (res.code === 3) { |
| | | uni.showLoading({ |
| | | title: '磅房人员确认中', |
| | | }) |
| | | this.isExceedOrigin = true |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '称重失败,请稍后重试'); |
| | | this.isConfirmWeighLoading = false |