qingyiay
2023-10-10 a25c7697644a40d3aa3a9746085a9a7618dd098a
修改称重提示错误 修改判断
3个文件已修改
49 ■■■■ 已修改文件
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -759,7 +759,8 @@
                    type: 2,
                    weighingNumber: 1
                }
                this.$reqPost('printer', Object.assign(form, JSON.parse(uni.getStorageSync('WeighHouseForm'))),
                let form1 = uni.getStorageSync('WeighHouseForm') ? uni.getStorageSync('WeighHouseForm') : '{}'
                this.$reqPost('printer', Object.assign(form, JSON.parse(form1)),
                    'json').then(
                    res => {
                        uni.hideLoading()
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -194,7 +194,7 @@
            <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 -->
            <u-button type="primary"
                text="确定称重"
                :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||!mergeState||isExceedOrigin"
                :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||!mergeState"
                :loading="isConfirmWeighLoading"
                loadingText="确认"
                @click="confirmWeigh"
@@ -206,18 +206,10 @@
                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"
@@ -231,7 +223,7 @@
        <view class="">
            <u-modal :show="abnormalModalShow"
                title="异常原因"
                :showCancelButton="true"
                :showCancelButton="false"
                @confirm="abnormalConfirm"
                confirmText="提交">
                <view class="slot-content">
@@ -287,6 +279,9 @@
            this.realTimeWeigh = 0
        },
        onShow() {
            if (this.timer) {
                clearTimeout(this.timer)
            }
            this.timer = setTimeout(() => {
                if (!this.globalweigh) {
                    console.log('称重时自动重连');
@@ -386,7 +381,7 @@
                mergeState: true, //合卡状态 
                mergeStateShow: false, //合卡弹窗
                checkboxValue1: [],
                isExceedOrigin: false, //是否超出原发毛重
                isExceedOrigin: false, //是否超出毛重
                refreshLoading: false,
                timer: null
            };
@@ -454,11 +449,6 @@
                    }
                }
            },
            confirmWeighVisiable(v) {
                if (v) {
                    uni.hideLoading()
                }
            }
        },
        computed: {
            ...mapState(['globalweigh', 'globalinfraredStatus', 'globalisconnect', 'globalisUploadimg', 'globalisLogin',
@@ -496,18 +486,6 @@
            ...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: "加载中"
@@ -586,17 +564,15 @@
                    .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
store/index.js
@@ -295,7 +295,7 @@
            clearInterval(state.reconnectTimeOut)
            state.socketTask = null
            commit('changereconnectState', false)
            if (state.connectNum < 6 || state.connectNum.connectNum < 6 && state.globalisLogin) {
            if ((state.connectNum < 6 || state.connectNum.connectNum < 6) && state.globalisLogin) {
                uni.showToast({
                    title: '连接失败,正在尝试重新连接',
                    icon: 'none'