qingyiay
2023-06-26 029dd92e96bec1ca325e99f154c8a2188919e8d5
增加验质功能
6个文件已修改
121 ■■■■■ 已修改文件
api/globalApi.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar-page/index-tabbar/index-tabbar.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/globalApi.js
@@ -378,5 +378,11 @@
    setUpWxOpenid: {
        url: '/admin/user/setUpWxOpenid',
        method: 'POST'
    },
    /**
     * @@description 根据id更新折扣率  河钢*/
    updateTmTaskCoalItem: {
        url: '/wrzs/tmtaskcoalitem/updateTmTaskCoalItem',
        method: 'POST'
    }
}
pages.json
@@ -211,7 +211,16 @@
            }
        }
    ],
        ,{
            "path" : "pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail",
            "style" :
            {
                "navigationBarTitleText": "",
                "enablePullDownRefresh": false
            }
        }
    ],
    "subPackages": [{
            "root": "pages/register",
            "pages": [{
pages/customer-page/customer-index/customer-index.vue
@@ -20,19 +20,19 @@
                        @click="cardBodyClick(item)">
                        <view class="first-line">
                            <view class="dispatch-receive">
                                <view class="dispatch">{{ item.filedName }}</view>
                                <view class="dispatch">{{ item.filedName||'' }}</view>
                            </view>
                            <view class="point-number">
                                <text class="residue">{{ item.cars2 }}</text>
                                <text>/{{ item.carNum }}</text>
                            </view>
                            <!-- <view class="point-number">
                                <text class="residue">{{ item.cars2||'' }}</text>
                                <text>/{{ item.carNum ||''}}</text>
                            </view> -->
                        </view>
                        <view class="second-line">
                            <view class="coal-name">
                                <view class="">{{ item.coalName }}</view>
                                <view class="">{{ item.coalName ||''}}</view>
                                <view class="black-bar"></view>
                                <view class="coal-type"
                                    v-if="item.orderType">{{ item.orderType }}</view>
                                    v-if="item.orderType">{{ item.orderType||'' }}</view>
                            </view>
                        </view>
                        <view class="third-line">
@@ -44,13 +44,13 @@
                            <view class="send-date">{{ item.sendDate }}</view>
                        </view>
                        <view class="fourth-line">
                            <view class="receive"
                            <!-- <view class="receive"
                                @click.stop="receiveClick(item)">
                                <view class="button-image">领取</view>
                            </view>
                                <view class="button-image">验质</view>
                            </view> -->
                            <view class="forward"
                                @click.stop="forwardClick(item)">
                                <view class="button-image">转发</view>
                                @click.stop="forwardClick(index)">
                                <view class="button-image">验质</view>
                            </view>
                        </view>
                    </view>
@@ -313,7 +313,7 @@
            // 提煤单详情
            cardBodyClick(v) {
                uni
        .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
                    .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
            },
            // 点击历史提煤单获取详情
            faYundetail(v) {
@@ -322,10 +322,9 @@
                });
            },
            // 转发
            forwardClick(obj) {
                if (obj.cars2 == 0) return this.$u.toast('请先领取后再转发');
            forwardClick(index) {
                uni
                    .navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` });
        .navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?index=${index}` });
            }
        }
    };
@@ -574,7 +573,7 @@
                        width: 100%;
                        height: vww(30);
                        @include flex;
                        justify-content: flex-start;
                        justify-content: flex-end;
                        position: relative;
                        bottom: vww(10);
                        left: 25%;
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -18,11 +18,11 @@
            <view class="block-information">
                <view class="block-main">
                    <view class="basic">
                        <view class="coalName">{{ coalDetailsData.coalName }}</view>
                        <view class="coalName">{{ coalDetailsData.coalName||'' }}</view>
                        <view class="status-button"
                            style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/statusbutton.png') no-repeat;
                                        background-size: cover;">
                            {{ coalStatus[coalDetailsData.status] || '' }}
                            {{ coalStatus[coalDetailsData.statusWeigh] || '' }}
                        </view>
                    </view>
                    <view class="time">
@@ -34,24 +34,29 @@
                    <view class="coal-code">提煤单编号:&nbsp;&nbsp;{{ coalDetailsData.code || '' }}</view>
                    <view class="order-code">
                        订单编号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ coalDetailsData.orderCode || '' }}</view>
                    <view class="coal-code"
                        @click="jumpWeighDetail"
                        style="color: rgb(73, 123, 251);">
                        查看明细
                    </view>
                    <view class="weigh-item">
                        <view class="item">
                            <view class="concrete"
                                style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
                                皮</view>
                            <view class="num">{{ coalDetailsData.skin }}</view>
                            <view class="num">{{ showWeigh.skin }}</view>
                        </view>
                        <view class="item">
                            <view class="concrete"
                                style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
                                毛</view>
                            <view class="num">{{ coalDetailsData.hair }}</view>
                            <view class="num">{{ showWeigh.hair }}</view>
                        </view>
                        <view class="item">
                            <view class="concrete"
                                style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
                                净</view>
                            <view class="num">{{ coalDetailsData.clean }}</view>
                            <view class="num">{{ showWeigh.clean }}</view>
                        </view>
                    </view>
                </view>
@@ -174,9 +179,7 @@
                    openId: null,
                    openName: ''
                },
                coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤仓', '出煤仓', '放空', '作废', '入场申请',
                    '进入场院'
                ], // 状态
                coalStatus: ['未称重', '称重中', '验质中', '称重完成'], // 状态
                weighHouseCode: '',
                // 放空弹窗控制变量
                evacuationModalShow: false,
@@ -243,6 +246,11 @@
            },
            isapproach() {
                return this.currentPageCoalStatus !== 3;
            },
            // 展示皮毛净
            showWeigh() {
                return this.coalDetailsData.tmTaskCoalItems ? (this.coalDetailsData.tmTaskCoalItems[0] ? this
                    .coalDetailsData.tmTaskCoalItems[0] : {}) : {}
            }
        },
        methods: {
@@ -287,8 +295,8 @@
                    title: '加载中'
                });
                this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
                    uni.hideLoading();
                    if (res.code == 0) {
                        uni.hideLoading();
                        console.log(res, '提煤单详情');
                        this.coalDetailsData = res.data;
                        this.orderType = this.coalDetailsData.orderType;
@@ -311,7 +319,7 @@
                        this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
                        this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
                        // 获取提煤单状态
                        this.currentPageCoalStatus = this.coalDetailsData.status;
                        this.currentPageCoalStatus = this.coalDetailsData.statusWeigh;
                        // 获取原发信息
                        this.primarySkin = this.coalDetailsData.skinTwo;
                        this.primaryHair = this.coalDetailsData.hairTwo;
@@ -356,7 +364,7 @@
                            });
                        }
                    });
                }, 5000);
                }, 10000);
            },
            // 展示提煤单详情
            showCaolPickUpBill() {
@@ -493,6 +501,12 @@
            completeOutSaleCancel() {
                this.completeOutSaleShow = false
            },
            // 查看质量明细
            jumpWeighDetail() {
                uni.navigateTo({
                    url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${this.orderPlanId}`
                })
            }
        }
    };
</script>
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -142,17 +142,17 @@
                </view>
                <view class="main-information">
                    <view class="prefix">皮重:</view>
                    <view class="suffix">{{ temporaryWeighObj.skin == 0 ? weighList.skin : temporaryWeighObj.skin }}
                    <view class="suffix">{{ showWeigh.skin||"" }}
                    </view>
                </view>
                <view class="main-information">
                    <view class="prefix">毛重:</view>
                    <view class="suffix">{{ temporaryWeighObj.hair == 0 ? weighList.hair : temporaryWeighObj.hair }}
                    <view class="suffix">{{showWeigh.hair||""}}
                    </view>
                </view>
                <view class="main-information">
                    <view class="prefix">净重:</view>
                    <view class="suffix">{{ temporaryWeighObj.clean == 0 ? weighList.clean : temporaryWeighObj.clean }}
                    <view class="suffix">{{ showWeigh.clean||"" }}
                    </view>
                </view>
                <view class="main-information">
@@ -305,13 +305,6 @@
                }
            },
            // 监听重量变化
            // globalweigh: {
            //     handler(v) {
            //         this.weighData.weigh = this.realTimeWeigh = v;
            //         console.log(this.realTimeWeigh, '真实重量改变了');
            //     },
            //     deep: true
            // },
            globalweigh(newV) {
                this.weighData.weigh = this.realTimeWeigh = newV;
                console.log(this.realTimeWeigh, '真实重量改变了');
@@ -336,13 +329,6 @@
            // 加减煤按钮禁用与否
            addAndSubtractCoalDisabled() {
                return this.realTimeWeigh == 0;
                // if (this.weighList.orderType == '外销' || this.weighList.orderType == '内销' || this.weighList.orderType == '转出') {
                //     if (this.weighList.hair == 0) {
                //         return true;
                //     } else if (this.weighList.hair != 0) {
                //         return false;
                //     }
                // }
            },
            // 是否放空按钮禁用
            isEvacuation() {
@@ -350,27 +336,31 @@
                    '转出') {
                    return (this.weighList.skin === 0 ? this.temporaryWeighObj.skin : this.weighList.skin) == this
                        .temporaryWeighObj.hair;
                    // return this.weighList.skin == this.temporaryWeighObj.hair || this.temporaryWeighObj.skin == this
                    //     .temporaryWeighObj.hair;
                }
                if (this.weighList.orderType == '外购' || this.weighList.orderType == '内购' || this.weighList.orderType ==
                    '转入') {
                    return (this.weighList.hair === 0 ? this.temporaryWeighObj.skin : this.weighList.hair) == this
                        .temporaryWeighObj.hair;
                    // return this.weighList.hair == this.temporaryWeighObj.skin || this.temporaryWeighObj.skin == this
                    //     .temporaryWeighObj.hair;
                }
            },
            sideline() {
                return this.weighList.orderType == '内购' || this.weighList.orderType == '转入';
            },
            showWeigh() {
                return this.weighList.tmTaskCoalItems ? (this.weighList.tmTaskCoalItems[0] ? this
                    .weighList.tmTaskCoalItems[0] : {}) : {}
            }
        },
        methods: {
            ...mapMutations(['changeweighHouseCode', 'changeisLogin']),
            init() {
                uni.showLoading({
                    title: '加载中'
                })
                // 获取称重信息
                this.$reqGet('weighList', { id: this.takeCoalId }).then(res => {
                    console.log(res, '获取称重信息');
                    uni.hideLoading()
                    if (res.code == 0) {
                        this.weighList = res.data;
                        this.weighData.deptId = res.data.deptId;
@@ -460,6 +450,8 @@
                            this.isConfirmWeighLoading = false;
                        }, 1000);
                        console.log(res, '加减煤');
                    } else {
                        this.$u.toast('操作失败,请稍候重试');
                    }
                });
            },
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -187,6 +187,7 @@
            console.log('页面卸载');
            this.$store.dispatch('websocketOnClose')
            clearInterval(this.globalIntervalId);
            this.changeisconnect(true)
        },
        methods: {
            ...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus', 'changeisconnect', 'websocketInit']),