qingyiay
2023-09-15 2ea83048e7f11eb9a453da7371f9b3719a323fad
煤炭增加操作指引,增加打印入门证出门证
6个文件已修改
285 ■■■■ 已修改文件
api/globalApi.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/driver-index.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/drvier-my/drvier-my.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/globalApi.js
@@ -423,5 +423,11 @@
    bindUserFleetBatch: {
        url: '/wrzs/wx/bindUserFleetBatch',
        method: 'POST'
    },
    /**
     * @description 打印出入门证*/
    printer: {
        url: '/wrzs/printer/handler',
        method: 'GET'
    }
}
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -103,6 +103,24 @@
            </view>
        </view>
        <view class="weigh-ability">
            <view class="weigh-button"
                v-show='ablePrintInduction'>
                <u-button text="打印入门证"
                    @click="printEntryCertificate"
                    type="primary"
                    shape="circle"
                    :loading="enterLoading"
                    loadingText="打印中,请稍候"></u-button>
            </view>
            <view class="weigh-button"
                v-show="ablePrintOut">
                <u-button text="打印出门证"
                    @click="printExitPermit"
                    type="primary"
                    shape="circle"
                    :loading="outLoading"
                    loadingText="打印中,请稍候"></u-button>
            </view>
            <view class="weigh-button"><u-button text="展示提煤单"
                    @click="showCaolPickUpBill"
                    type="primary"
@@ -153,7 +171,6 @@
        },
        onShow() {
            this.init();
        },
        data() {
            return {
@@ -221,7 +238,11 @@
                completeOutSaleShow: false,
                overTmWaixiao: null,
                list: [{ name: '手机号', subname: '1213456', id: 1 }, { name: '微信语音', id: 2 }], //呼叫客服选项
                servieceShow: false
                servieceShow: false,
                ablePrintInduction: false, //入门证是否显示
                ablePrintOut: false, //出门证是否显示
                enterLoading: false, //入门按钮loading
                outLoading: false, //出门按钮loading
            };
        },
        onHide() {
@@ -329,6 +350,9 @@
                        this.primarySkin = this.coalDetailsData.skinTwo;
                        this.primaryHair = this.coalDetailsData.hairTwo;
                        this.primaryClean = this.coalDetailsData.cleanTwo;
                        // 入门证 和 出门证 是否显示
                        this.ablePrintInduction = this.coalDetailsData.hair || this.coalDetailsData.skin
                        this.ablePrintOut = this.coalDetailsData.hair && this.coalDetailsData.skin
                    } else {
                        this.$u.toast('加载失败');
                    }
@@ -515,6 +539,38 @@
            completeOutSaleCancel() {
                this.completeOutSaleShow = false
            },
            // 打印入门证
            printEntryCertificate() {
                uni.showLoading({
                    title: '正在打印中,请稍后'
                })
                this.enterLoading = true
                this.$reqGet('printer', { type: 2, tmId: this.coalDetailsData.id }).then(res => {
                    uni.hideLoading()
                    this.enterLoading = false
                    if (res.code === 0) {
                        this.$u.toast('打印成功')
                    } else {
                        this.$u.toast(res.msg ? res.msg : '打印失败')
                    }
                })
            },
            // 打印出门证
            printExitPermit() {
                uni.showLoading({
                    title: '正在打印中,请稍后'
                })
                this.outLoading = true
                this.$reqGet('printer', { type: 3, tmId: this.coalDetailsData.id }).then(res => {
                    uni.hideLoading()
                    this.outLoading = false
                    if (res.code === 0) {
                        this.$u.toast('打印成功')
                    } else {
                        this.$u.toast(res.msg ? res.msg : '打印失败')
                    }
                })
            },
        }
    };
</script>
@@ -543,7 +599,7 @@
    ::v-deep.bill-of-lading-details {
        width: 100%;
        height: 100vh;
        height: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
@@ -702,7 +758,7 @@
        }
        .timeLine {
            height: 40%;
            height: 300rpx;
            margin: vww(20);
            position: relative;
            top: vww(120);
@@ -764,15 +820,18 @@
        .weigh-ability {
            width: 631rpx;
            height: vww(100);
            height: vww(200);
            margin: vww(80) auto;
            margin-bottom: vww(10);
            margin-top: vww(100);
            margin-bottom: vww(20);
            @include flex;
            flex-direction: column;
            justify-content: flex-start;
            .weigh-button {
                width: 631rpx;
                height: vww(89);
                height: vww(40);
                margin: vww(10);
                .u-button {
                    font-size: 28rpx;
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -293,7 +293,6 @@
            this.init();
            this.changeWeigh('')
            this.realTimeWeigh = 0
            console.log(this.abnormalModalShow);
        },
        components: {
            combinedTitle
@@ -364,9 +363,6 @@
            };
        },
        watch: {
            realTimeWeigh(newV, oldV) {
            },
            // 监听重量变化
            globalweigh: {
                deep: true,
@@ -380,9 +376,7 @@
                            this.temporaryWeighObj.skin = newV;
                            let xx = new BigNumber(this.avgSkin)
                            let yy = new BigNumber(newV)
                            if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) {
                                this.errorTipShow = true
                            }
                            this.errorTipShow = xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2
                        } else {
                            this.isSkinWeigh = false;
                            this.temporaryWeighObj.hair = newV;
@@ -402,9 +396,7 @@
                            this.temporaryWeighObj.skin = newV;
                            let xx = new BigNumber(this.avgSkin)
                            let yy = new BigNumber(newV)
                            if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) {
                                this.errorTipShow = true
                            }
                            this.errorTipShow = xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2
                            this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(
                                2);
                            this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
@@ -418,7 +410,9 @@
        computed: {
            ...mapState(['globalweigh', 'globalinfraredStatus']),
            coalContactClean() {
                return (Number(this.weighData.coalContactHair) - Number(this.weighData.coalContactSkin)).toFixed(2);
                let xx = BigNumber(this.weighData.coalContactHair)
                let yy = BigNumber(this.weighData.coalContactSkin)
                return xx.minus(yy).toNumber().toFixed(2)
            },
            token() {
                return uni.getStorageSync('token');
@@ -492,7 +486,7 @@
                    if (this.weighData.weigh != 0) {
                        // 如果正在称皮
                        if (this.isSkinWeigh) {
                            // 如果第一次称重
                            // 如果平均皮重为0
                            if (this.isAbnormalAvgSkin) {
                                this.abnormalModalShow = false
                                this.saveWeigh();
@@ -611,8 +605,9 @@
                        this.tmTaskCoalList = res.data.tmTaskCoalList
                        /**
                         * @description true的话是第一次称, false就不是,没有历史,平均皮重为0是第一次也是正常 */
                        this.isAbnormalAvgSkin = (Array.isArray(this.tmTaskCoalList) && this
                            .tmTaskCoalList.length === 0 || !this.tmTaskCoalList) && this.avgSkin == 0
                        // this.isAbnormalAvgSkin = (Array.isArray(this.tmTaskCoalList) && this
                        //     .tmTaskCoalList.length === 0 || !this.tmTaskCoalList) && this.avgSkin == 0
                        this.isAbnormalAvgSkin = this.avgSkin == 0
                    } else {
                        uni.hideLoading()
                        this.$u.toast('加载失败')
pages/driver-page/driver-index/driver-index.vue
@@ -6,6 +6,25 @@
                <view class="wait-collection"
                    style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain">
                </view>
                <!-- 引导页 -->
                <view class="noob-tour"
                    v-if="roleType===3&&isFirstLogin">
                    <combined-title title="操作指引"></combined-title>
                    <u-cell-group>
                        <u-cell title="新手指引"
                            name='1'
                            :clickable="true"
                            @click="noobTour">
                            <u-badge type="primary"
                                value="01"
                                slot='icon'></u-badge>
                            <u-icon slot="value"
                                name="arrow-right"
                                size="30"
                                color="#b8b8b8"></u-icon>
                        </u-cell>
                    </u-cell-group>
                </view>
                <view class="collection-form">
                    <view class="collection-form-item"
                        v-for="(item, index) in driverBillOfLoadingData.list1"
@@ -220,6 +239,12 @@
                        </view>
                    </view>
                    <view class="white-block"></view>
                    <!-- 图片预览弹出框 -->
                    <view class="previewImage-container">
                        <previewImage ref="previewImage"
                            :imgs="driverTourImgList"
                            :saveBtn='false'></previewImage>
                    </view>
                </view>
            </view>
        </view>
@@ -229,10 +254,12 @@
<script>
    import { customerId } from '@/utils/status';
    import combinedTitle from '@/components/combined-title/combined-title.vue';
    import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
    import { mapState } from 'vuex'
    export default {
        components: {
            combinedTitle
            combinedTitle,
            previewImage
        },
        props: {
            indexdriverBillOfLoadingData: {
@@ -249,6 +276,12 @@
                immediate: true
            }
        },
        computed: {
            ...mapState(['driverTourImgList']),
            roleType() {
                return uni.getStorageSync('roleType');
            },
        },
        data() {
            return {
                driverBillOfLoadingData: {
@@ -263,7 +296,8 @@
                qiangDanOrderPlanId: null,
                fleetId: '',
                xsUserId: '',
                customerId: ''
                customerId: '',
                isFirstLogin: true //是否是第一次登录
            };
        },
        onShow() {
@@ -351,7 +385,10 @@
                uni.navigateTo({
                    url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}`
                });
            }
            },
            noobTour() {
                this.$refs.previewImage.open('https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj1.png')
            },
        }
    };
</script>
@@ -719,11 +756,22 @@
                                color: #ffffff;
                                margin-right: vww(20);
                            }
                            .filedname {
                                width: 80%;
                            }
                        }
                        .map-icon {
                            position: absolute;
                            right: vww(-1);
                            top: vww(2)
                        }
                    }
                    .first-extra {
                        @include firstLine;
                        position: relative;
                        .main-information {
                            width: 100%;
@@ -744,6 +792,16 @@
                                color: #ffffff;
                                margin-right: vww(20);
                            }
                            .filedname {
                                width: 80%;
                            }
                        }
                        .map-icon {
                            position: absolute;
                            right: vww(-1);
                            top: vww(2)
                        }
                    }
@@ -751,6 +809,7 @@
                        @include firstLine;
                        margin: 0;
                        margin-left: vww(16);
                        position: relative;
                        .main-information {
                            width: 100%;
@@ -771,6 +830,16 @@
                                color: #ffffff;
                                margin-right: vww(20);
                            }
                            .filedname {
                                width: 80%;
                            }
                        }
                        .map-icon {
                            position: absolute;
                            right: vww(-1);
                            top: vww(2)
                        }
                    }
@@ -835,6 +904,12 @@
                    margin-top: vww(10);
                }
            }
            .noob-tour {
                margin-bottom: vww(10);
                position: relative;
                top: -240rpx;
            }
        }
    }
</style>
pages/driver-page/drvier-my/drvier-my.vue
@@ -136,7 +136,25 @@
                    shape="circle"
                    plain></u-button></view>
        </view>
        <!-- 引导页 -->
        <view class="noob-tour"
            style="margin-top: 80rpx;">
            <combined-title title="操作指引"></combined-title>
            <u-cell-group>
                <u-cell title="新手指引"
                    name='1'
                    :clickable="true"
                    @click="noobTour">
                    <u-badge type="primary"
                        value="01"
                        slot='icon'></u-badge>
                    <u-icon slot="value"
                        name="arrow-right"
                        size="30"
                        color="#b8b8b8"></u-icon>
                </u-cell>
            </u-cell-group>
        </view>
        <!-- 图片预览弹出框 -->
        <view class="previewImage-container">
            <u-popup :show="previewImageShow"
@@ -148,7 +166,12 @@
                    height="400px"></u--image>
            </u-popup>
        </view>
        <!-- 引导图片弹出 -->
        <view class="previewImage-container">
            <previewImage ref="previewImage"
                :imgs="driverTourImgList"
                :saveBtn='false'></previewImage>
        </view>
        <!-- 修改弹出框 -->
        <view class="editDriverPopup-container">
            <u-popup :show="editDriverPopupShow"
@@ -279,8 +302,16 @@
<script>
    import { redirectLogin } from '@/utils/status';
    import { BaseUrl } from '@/api/publicInterface.js';
    import { mapMutations } from 'vuex';
    import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
    import { mapMutations, mapState } from 'vuex';
    export default {
        components: { previewImage },
        computed: {
            ...mapState(['driverTourImgList']),
            roleType() {
                return uni.getStorageSync('roleType');
            },
        },
        data() {
            return {
                // 获取的司机详情
@@ -617,7 +648,10 @@
                uni.navigateTo({
                    url: '/pages/customer-page/customer-my/faYunstatistics/faYunstatistics'
                });
            }
            },
            noobTour() {
                this.$refs.previewImage.open('https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj1.png')
            },
        }
    };
</script>
store/index.js
@@ -93,7 +93,56 @@
        globalIntervalId: null,
        is_open_socket: false, //避免重复连接
        connectNum: 1, //重连次数,
        reconnectTimeOut: null
        reconnectTimeOut: null,
        // 打印出入门证  一次就可以有打印入门证,  两次可以有入门证 出门证  0次一张都没有
        ablePrintInduction: false, //入门证
        ablePrintOut: false, //出门证
        driverTourImgList: ['https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj1.png',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj2.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj3.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj4.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj5.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj6.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj7.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj8.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj9.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj10.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj11.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj12.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj13.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj14.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj15.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj16.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj17.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj18.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj19.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj20.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj21.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj22.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj23.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj24.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj25.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj26.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj27.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj28.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj29.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj30.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj31.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj32.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj33.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj33-1.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj34.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj35.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj36.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj37.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj38.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj39.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj40.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj41.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj42.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj43.jpg',
            'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj44.jpg',
        ],
    },
    mutations: {
        lengthchange(state, payload) {
@@ -163,6 +212,13 @@
                state.connectNum = payload
            }
        },
        changeablePrintInduction(state, payload) {
            state.ablePrintInduction = payload
        },
        changeablePrintOut(state, payload) {
            state.ablePrintOut = payload
            console.log(state.ablePrintOut, '出门证’');
        }
    },
    actions: {
        websocketInit({ state, dispatch, commit }) {