qingyiay
2023-04-17 169e9b4d59bdd763bb5bd1b5a9b092a1200e327b
增加原发信息,修复bug
4个文件已修改
138 ■■■■ 已修改文件
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/public-page/messageDetails/messageDetails.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar-page/index-tabbar/index-tabbar.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -101,7 +101,11 @@
                gateCameraId: '',
                equipmentCode: '',
                weigh: 0
            }
            },
            // 原发信息
            primarySkin: null,
            primaryHair: null,
            primaryClean: null
        };
    },
    onShow() {
@@ -142,7 +146,8 @@
        getTakeCoal() {
            this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
                if (res.code == 0) {
                    this.coalDetailsData = res.data[0];
                    console.log(res, '提煤单详情');
                    this.coalDetailsData = res.data;
                    // 获取所在磅房参数赋值
                    this.getWeightHouseObj.deptId = this.coalDetailsData.deptId;
                    this.getWeightHouseObj.filedId = this.coalDetailsData.filedId;
@@ -158,6 +163,10 @@
                    this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
                    // 获取提煤单状态
                    this.currentPageCoalStatus = this.coalDetailsData.status;
                    // 获取原发信息
                    this.primarySkin = this.coalDetailsData.skinTwo;
                    this.primaryHair = this.coalDetailsData.hairTwo;
                    this.primaryClean = this.coalDetailsData.cleanTwo;
                }
            });
        },
@@ -249,7 +258,9 @@
                    uni.navigateTo({
                        url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${
                            res.data.id
                        }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}`
                        }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&primarySkin=${
                            this.primarySkin
                        }&primaryHair=${this.primaryHair}&primaryClean=${this.primaryClean}`
                    });
                } else {
                    this.$u.toast('未在磅房,请前往磅房后再试!!');
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -20,6 +20,12 @@
                    </view> -->
                </view>
            </view>
            <view class="bottom" v-if="weighList.orderType == '内购' || weighList.orderType == '转出'">
                <view>
                    <view style="font-weight: 600;">原发信息</view>
                    <text>皮重{{ primarySkin || '' }}毛重{{ primaryHair || '' }}净重{{ primaryClean || '' }}</text>
                </view>
            </view>
            <view class="bottom"><text>TIP:当前状态为正常时可以称重</text></view>
        </view>
        <view class="two">
@@ -74,6 +80,9 @@
        this.weighData.gateCameraId = params.gateCameraId;
        this.weighData.equipmentCode = params.gateCameraCode;
        this.weighHouseCode = params.weighHouseCode;
        this.primarySkin = params.primarySkin;
        this.primaryHair = params.primaryHair;
        this.primaryClean = params.primaryClean;
        this.changeweighHouseCode(params.weighHouseCode);
    },
    data() {
@@ -115,13 +124,16 @@
            // 放空控制
            evacuationModalShow: false,
            evacuationTitle: '放空确认',
            evacuationContent: '是否确认放空'
            evacuationContent: '是否确认放空',
            // 获取原发信息
            primarySkin: null,
            primaryHair: null,
            primaryClean: null
        };
    },
    watch: {
        realTimeWeigh(newV, oldV) {
            console.log(newV);
            if (this.weighList.orderType == '外销' || this.weighList.orderType == '内销') {
            if (this.weighList.orderType == '外销' || this.weighList.orderType == '内销' || this.weighList.orderType == '转出') {
                if (this.weighList.skin == 0) {
                    // this.temporaryWeighObj.skin = this.realTimeWeigh;
                    this.temporaryWeighObj.skin = newV;
@@ -130,7 +142,7 @@
                    this.temporaryWeighObj.hair = newV;
                    this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2);
                }
            } else if (this.weighList.orderType == '外购' || this.weighList.orderType == '转出') {
            } else if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList.orderType == '转入') {
                if (this.weighList.hair == 0) {
                    // this.temporaryWeighObj.hair = this.realTimeWeigh;
                    this.temporaryWeighObj.hair = newV;
@@ -252,44 +264,44 @@
        /**
         * 初始化 weoSocket
         */
        initWebSocket() {
            let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`;
            let socket = uni.connectSocket({
                url: wsUrl,
                header: {
                    CLIENT_TOC: 'Y'
                },
                complete: res => {
                    console.log(res, 'socket结果');
                }
            });
            socket.onOpen(() => {
                console.log('onOpen');
            });
            // 获取服务器传来的数据,做相应处理
            socket.onMessage(res => {
                console.log('socketWeigh', res);
                let nowWeighObj = JSON.parse(res.data.slice(7));
                if (nowWeighObj.eqCode == this.weighHouseCode) {
                    if (nowWeighObj.eqInfraredStatus) {
                        this.infraredStatus = true;
                        this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh;
                    } else {
                        this.infraredStatus = false;
                        this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh;
                    }
                }
            });
            socket.onClose(() => {
                uni.closeSocket();
                console.log('webSocketClose');
                this.$u.toast('磅房已关闭');
            });
            socket.onError(err => {
                console.log('socket报错', err);
                this.$u.toast('磅房暂时不能使用,请重新进入该页面,重试!!');
            });
        },
        // initWebSocket() {
        //     let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`;
        //     let socket = uni.connectSocket({
        //         url: wsUrl,
        //         header: {
        //             CLIENT_TOC: 'Y'
        //         },
        //         complete: res => {
        //             console.log(res, 'socket结果');
        //         }
        //     });
        //     socket.onOpen(() => {
        //         console.log('onOpen');
        //     });
        //     // 获取服务器传来的数据,做相应处理
        //     socket.onMessage(res => {
        //         console.log('socketWeigh', res);
        //         let nowWeighObj = JSON.parse(res.data.slice(7));
        //         if (nowWeighObj.eqCode == this.weighHouseCode) {
        //             if (nowWeighObj.eqInfraredStatus) {
        //                 this.infraredStatus = true;
        //                 this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh;
        //             } else {
        //                 this.infraredStatus = false;
        //                 this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh;
        //             }
        //         }
        //     });
        //     socket.onClose(() => {
        //         uni.closeSocket();
        //         console.log('webSocketClose');
        //         this.$u.toast('磅房已关闭');
        //     });
        //     socket.onError(err => {
        //         console.log('socket报错', err);
        //         this.$u.toast('磅房暂时不能使用,请重新进入该页面,重试!!');
        //     });
        // },
        // 放空
        evacuation() {
            this.evacuationModalShow = true;
@@ -342,6 +354,8 @@
        }
        .bottom {
            text-align: center;
            position: relative;
            top: vww(-30);
        }
    }
    .two {
pages/public-page/messageDetails/messageDetails.vue
@@ -1,22 +1,7 @@
<template>
    <view>
        <combined-title title="消息详情"></combined-title>
        <view class="compDetails">
            <uni-table border stripe emptyText="暂无更多数据">
                <uni-tr>
                    <uni-th align="left">消息标题</uni-th>
                    <uni-td align="left">{{ detail.title || '' }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">消息内容</uni-th>
                    <uni-td align="left">{{ detail.content || '' }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">创建时间</uni-th>
                    <uni-td align="left">{{ detail.createTime || '' }}</uni-td>
                </uni-tr>
            </uni-table>
        </view>
        <u-parse :content="content" :lazyLoad="true" :selectable="true"></u-parse>
    </view>
</template>
@@ -27,7 +12,8 @@
            index: '',
            detail: {},
            messageId: '',
            id: ''
            id: '',
            content: ''
        };
    },
    onLoad(v) {
@@ -41,6 +27,7 @@
        getDetail() {
            this.$reqGet('getMsgDetail', { messageId: this.messageId, id: this.id }).then(res => {
                this.detail = res.data;
                this.content = this.detail.content;
            });
        }
    }
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -230,7 +230,7 @@
            });
            socket.onClose(() => {
                console.log('webSocketClose');
                this.isconnect = true;
                this.isconnect = false;
            });
            socket.onError(err => {
                console.log('socket报错', err);