qingyiay
2023-07-11 0c3e40c399a00fe6405f7b9a79eb1c93b7cc660e
更改字眼,增加非稳定态下不可称重,增加验质字段
21个文件已修改
1031 ■■■■■ 已修改文件
api/globalApi.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/combined-title/combined-title.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-my/customer-my.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/driver-index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/public-page/forward/forward.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/register/register.vue 844 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar-page/index-tabbar/index-tabbar.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/globalApi.js
@@ -5,7 +5,7 @@
        method: 'POST'
    },
    //    提煤单
    //    通知单
    //    获取发运计划列表
    GetOrderPlan: {
        url: '/wrzs/wx/getOrderPlan',
@@ -57,7 +57,7 @@
        method: 'POST'
    },
    /**
     * @description 获取历史提煤单
     * @description 获取历史通知单
     */
    getJhOrderPlanDataPage: {
        url: '/wrzs/userOperation/getJhOrderPlanDataPage',
@@ -127,7 +127,7 @@
        method: 'POST'
    },
    /**
     * @description 获取提煤单详情  河钢
     * @description 获取通知单详情  河钢
     */
    getTakeCoal: {
        url: '/wrzs/userOperation/getTakeCoal',
@@ -150,6 +150,11 @@
     * @description 验质产品历史 河钢     */
    qualityInspectionHistory: {
        url: '/wrzs/userOperation/qualityInspectionHistory',
        method: 'GET'
    },
    // 获取appid和secret
    getAppidAndSercet: {
        url: '/wrzs/wx/getAppidAndSercet',
        method: 'GET'
    },
    getMaterialDetailByOrderCode: {
@@ -303,7 +308,7 @@
        method: 'GET'
    },
    // 提煤单日志查询
    // 通知单日志查询
    coalDayPage: {
        url: '/wrzs/tmtaskcoallog/getTmId',
        method: 'GET'
@@ -380,14 +385,14 @@
        method: 'GET'
    },
    /**
     @description 判断是否要完成外销提煤单
     @description 判断是否要完成外销通知单
     */
    getTmTaskCoalOrderType: {
        url: '/wrzs/tmtaskcoal/getTmTaskCoalOrderType',
        method: 'GET'
    },
    /**
     @description 更新提煤单状态
     @description 更新通知单状态
     */
    updateTmTaskCoalState: {
        url: '/wrzs/tmtaskcoal/updateTmTaskCoalState',
components/combined-title/combined-title.vue
@@ -29,7 +29,7 @@
        name: 'combined-title',
        data() {
            return {
                onlineurl: null
                onlineurl,
            };
        },
        props: {
pages.json
@@ -93,7 +93,7 @@
        {
            "path": "pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details",
            "style": {
                "navigationBarTitleText": "提煤单详情",
                "navigationBarTitleText": "通知单详情",
                "enablePullDownRefresh": false
            }
        },
@@ -138,7 +138,7 @@
        {
            "path": "pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill",
            "style": {
                "navigationBarTitleText": "提煤单",
                "navigationBarTitleText": "通知单",
                "enablePullDownRefresh": false
            }
@@ -169,7 +169,7 @@
        {
            "path": "pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore",
            "style": {
                "navigationBarTitleText": "提煤单详情",
                "navigationBarTitleText": "通知单详情",
                "enablePullDownRefresh": false
            }
pages/customer-page/customer-index/customer-index.vue
@@ -2,7 +2,7 @@
    <view class="">
        <view class="customer-index">
            <view class="customer-index-body">
                <!-- 待领取和转发提煤单 -->
                <!-- 待领取和转发通知单 -->
                <view class="wait-collection"
                    :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/customerbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }">
                </view>
@@ -72,9 +72,9 @@
                    </view>
                </view>
                <!-- 历史提煤单 -->
                <!-- 历史通知单 -->
                <view class="history-numbers">
                    <combined-title title="历史提煤单"></combined-title>
                    <combined-title title="历史通知单"></combined-title>
                    <scroll-view :scroll-top="scrollTop"
                        scroll-y="true"
                        class="scroll-Y"
@@ -111,7 +111,7 @@
                                        v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
                                </view>
                                <view class="third-line">
                                    <view class="third-line_text">提煤单个数:</view>
                                    <view class="third-line_text">通知单个数:</view>
                                    <view class="third-line_num">{{ item.tmCount }}</view>
                                </view>
                            </view>
@@ -192,7 +192,7 @@
        data() {
            return {
                orderPlanData: [],
                show: false, // 领取提煤单弹出框
                show: false, // 领取通知单弹出框
                receiveNum: null,
                getOrderNum: {
                    num: '',
@@ -212,7 +212,7 @@
                showMoreData: false,
                cars2: "",
                carNum: "",
                // 剩余的提煤单数量
                // 剩余的通知单数量
                carNumSurplus: '',
                canClick: false,
                onlineurl: ''
@@ -238,7 +238,7 @@
                    }
                });
            },
            // 获取历史提煤单
            // 获取历史通知单
            getJhOrderPlanDataPage() {
                uni.showLoading({
                    title: '加载中'
@@ -263,7 +263,7 @@
                this.pageCurrent++;
                this.getJhOrderPlanDataPage();
            },
            //fix 点击提煤单返回会增加重复数据
            //fix 点击通知单返回会增加重复数据
            ArrSet(Arr, id) {
                var obj = {};
                const arrays = Arr.reduce((setArr, item) => {
@@ -311,7 +311,7 @@
             */
            receiveClick(item) {
                this.show = true;
                this.getOrderNum.id = item.id; // 获取领取提煤单的id
                this.getOrderNum.id = item.id; // 获取领取通知单的id
                this.cars2 = item.cars2
                this.carNum = item.carNum
            },
@@ -324,15 +324,15 @@
                console.log('输入框', e);
                this.canClick = e > (this.carNum - this.cars2)
                if (this.canClick) {
                    this.$u.toast('已超过当前日计划提煤单数量,请重新输入')
                    this.$u.toast('已超过当前日计划通知单数量,请重新输入')
                }
            },
            // 提煤单详情
            // 通知单详情
            cardBodyClick(v) {
                uni
                    .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2?v.cars2:""}` });
            },
            // 点击历史提煤单获取详情
            // 点击历史通知单获取详情
            faYundetail(v) {
                uni.navigateTo({
                    url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}&coalName=${v.coalName}&deptName=${v.deptName}`
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
@@ -60,7 +60,7 @@
                </view>
            </view>
            <view class="block-top">
                <combined-title title="提煤单历史"></combined-title>
                <combined-title title="通知单历史"></combined-title>
                <view class="total">
                    总净重
                    <text>{{ total.toFixed(2) || 0 }}</text>
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
@@ -10,7 +10,7 @@
                </view>
                <view class="body-container">
                    <view class="container-block">
                        <view class="">提煤单状态</view>
                        <view class="">通知单状态</view>
                        <view class="">{{ coalStatus[yyDailyList.statusWeigh]||'' }}</view>
                    </view>
                </view>
@@ -46,7 +46,7 @@
                </view>
                <view class="body-container">
                    <view class="container-block">
                        <view class="">提煤单编号</view>
                        <view class="">通知单编号</view>
                        <view class="">{{ yyDailyList.code || '' }}</view>
                    </view>
                </view>
pages/customer-page/customer-my/customer-my.vue
@@ -360,11 +360,11 @@
            },
            logoutConfirm() {
                redirectLogin();
                this.$store.commit('changeisLogin', false)
                this.$store.dispatch('websocketOnClose')
            },
            logoutCancel() {
                this.logoutShow = false;
                this.$store.commit('changeisLogin', false)
                this.$store.dispatch('websocketOnClose')
            },
            // 跳转用户管理页面
            userManage() {
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -31,7 +31,7 @@
                            size="40"></u-icon></view>
                    <view class="send-date">{{ coalDetailsData.sendDate }}</view>
                </view>
                <view class="coal-code">提煤单编号:&nbsp;&nbsp;{{ coalDetailsData.code || '' }}</view>
                <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"
@@ -91,7 +91,7 @@
            </view>
        </view>
        <view class="weigh-ability">
            <view class="weigh-button"><u-button text="展示提煤单"
            <view class="weigh-button"><u-button text="展示通知单"
                    @click="showCaolPickUpBill"
                    type="primary"
                    shape="circle"></u-button></view>
@@ -111,7 +111,7 @@
        <view class="completeOutSale">
            <u-modal :show="completeOutSaleShow"
                title="确认"
                content="是否完成外销提煤单"
                content="是否完成外销通知单"
                :showCancelButton="true"
                @confirm="completeOutSaleConfirm"
                @cancel="completeOutSaleCancel"></u-modal>
@@ -141,8 +141,8 @@
                orderPlanId: null,
                yyId: null,
                dayRZ: [],
                coalDetailsData: {}, // 提煤单详情
                currentPageCoalStatus: 0, // 当前页面提煤单状态
                coalDetailsData: {}, // 通知单详情
                currentPageCoalStatus: 0, // 当前页面通知单状态
                // 获取所在磅房参数
                getWeightHouseObj: {
                    deptId: '',
@@ -260,7 +260,7 @@
                    }
                });
                this.coalDayPage(); //获取日志
                this.getTakeCoal(); //获取提煤单详情
                this.getTakeCoal(); //获取通知单详情
                this.getgetService(); //获取客服
            },
            // 获取客服openid
@@ -277,7 +277,7 @@
                    }
                });
            },
            // 获取提煤单详情
            // 获取通知单详情
            getTakeCoal() {
                uni.showLoading({
                    title: '加载中'
@@ -285,7 +285,7 @@
                this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
                    uni.hideLoading();
                    if (res.code == 0) {
                        console.log(res, '提煤单详情');
                        console.log(res, '通知单详情');
                        this.coalDetailsData = res.data;
                        this.orderType = this.coalDetailsData.orderType;
                        // 判断是否完成外销订单
@@ -306,7 +306,7 @@
                        // 获取客服openId参数赋值
                        this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
                        this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
                        // 获取提煤单状态
                        // 获取通知单状态
                        this.currentPageCoalStatus = this.coalDetailsData.statusWeigh;
                        // 获取原发信息
                        this.primarySkin = this.coalDetailsData.skinTwo;
@@ -361,7 +361,7 @@
                    this.$u.toast('服务器错误,请稍后重试')
                }
            },
            // 展示提煤单详情
            // 展示通知单详情
            showCaolPickUpBill() {
                uni.navigateTo({
                    url: `/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill?orderPlanId=${this.orderPlanId}`
@@ -428,14 +428,6 @@
                        console.log('获取失败');
                    }
                });
            },
            calling() {
                // wx.join1v1Chat({
                //     caller: { nickname: this.name, openid: this.openid }, //oZjXk5RRmbroAfl1m5aZ6hRNvqh4
                //     listener: { nickname: this.serviceInfoObj.openName, openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 这里的openid是fyy的,充当固定的客服openid
                //     backgroundType: 2,
                //     roomType: 'voice'
                // });
            },
            // 称重
            cengZhongClick() {
pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
@@ -2,7 +2,7 @@
    <view class="coal-pick-up-bill">
        <view class="driver"
            :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/coal-background.png)`, backgroundSize: '100% 100%', }">
            <view class="driver-coalOne">电子提煤单</view>
            <view class="driver-coalOne">电子通知单</view>
            <view class="driver-coalTwo">
                <view>{{ coalData.code || '暂无订单编号' }}</view>
                <view>{{ coalData.orderType || '暂无订单类型' }}</view>
@@ -47,10 +47,10 @@
            init() {
                this.getTakeCoal();
            },
            // 获取提煤单详情
            // 获取通知单详情
            getTakeCoal() {
                this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
                    console.log('获取提煤单详情', res);
                    console.log('获取通知单详情', res);
                    if (res.code == 0) {
                        this.coalData = res.data;
                    } else {
pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale.vue
@@ -13,7 +13,7 @@
                    煤种名称:{{item.coalName}}
                </view>
                <view class="code">
                    提煤单编号:{{item.code}}
                    通知单编号:{{item.code}}
                </view>
                <view class="reservationTime">
                    预约时间:{{item.yuYueTime||''}}
pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue
@@ -182,7 +182,7 @@
                this.pageCurrent++;
                this.qualityInspectionHistory();
            },
            //fix 点击提煤单返回会增加重复数据
            //fix 点击通知单返回会增加重复数据
            ArrSet(Arr, id) {
                var obj = {};
                const arrays = Arr.reduce((setArr, item) => {
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -82,12 +82,13 @@
            </view>
            <view class="level"
                v-if='item.modifygoodsName||flag'>
                <view style="width: 140rpx;">
                    <u--text text="产品名称"
                <view style="width: 220rpx;">
                    <u--text text="品名与规格修改"
                        size='32'></u--text>
                </view>
                <view v-if="showWeighCopy[i].modifyProductName||item.breed&&item.spec">
                    <u-tag :text="!flag?showWeighCopy[i].modifyProductName:item.breed+item.spec"
                        v-if="showWeighCopy[i].modifyProductName"
                        plain
                        @click="productNamePopoverShow(i)"></u-tag>
                </view>
@@ -274,6 +275,7 @@
                this.showWeigh[this.goodsIndex].remark = val.remark
                this.showWeigh[this.goodsIndex].breed = val.breed
                this.showWeigh[this.goodsIndex].spec = val.spec
                this.showWeigh[this.goodsIndex].weightUnit = val.weightUnit
            },
            // 产品列表
            productNamePopoverShow(index) {
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -51,18 +51,18 @@
                </view>
                <view class="main-information"
                    v-if="weighList.orderType!=='转入'||weighList.orderType!=='转出'">
                    <view class="prefix">矿场:</view>
                    <view class="prefix">仓库:</view>
                    <view class="suffix">{{ weighList.deptName || '' }}</view>
                </view>
                <view class="main-information"
                    v-if="weighList.orderType!=='转入'||weighList.orderType!=='转出'">
                    <view class="prefix">煤场:</view>
                    <view class="prefix">基地:</view>
                    <view class="suffix">{{ weighList.filedName || '' }}</view>
                </view>
                <view class="main-information">
                <!-- <view class="main-information">
                    <view class="prefix">煤种名称:</view>
                    <view class="suffix">{{ weighList.coalName || '' }}</view>
                </view>
                </view> -->
                <view class="main-information">
                    <view class="prefix">订单类型:</view>
                    <view class="suffix">{{ weighList.orderType || '' }}</view>
@@ -104,7 +104,7 @@
            <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 -->
            <u-button type="primary"
                text="确定称重"
                :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh "
                :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||globalWarning"
                :loading="isConfirmWeighLoading"
                loadingText="确认"
                @click="confirmWeigh"></u-button>
@@ -255,7 +255,7 @@
            // this.realTimeWeigh = 0
        },
        computed: {
            ...mapState(['globalweigh', 'globalinfraredStatus']),
            ...mapState(['globalweigh', 'globalinfraredStatus', 'globalWarning']),
            token() {
                return uni.getStorageSync('token');
            },
pages/driver-page/driver-index/driver-index.vue
@@ -2,7 +2,7 @@
    <view class="">
        <view class="driver-index">
            <view class="driver-index-body">
                <!-- 待领取提煤单 -->
                <!-- 待领取通知单 -->
                <view class="wait-collection"
                    :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/diverbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }">
                </view>
@@ -71,9 +71,9 @@
                        @cancel="qiangDanCancel"></u-modal>
                </view>
                <!-- 待预约提煤单 -->
                <!-- 待预约通知单 -->
                <view class="wait-appointment">
                    <combined-title title="待预约提煤单"></combined-title>
                    <combined-title title="待预约通知单"></combined-title>
                    <u-empty mode="data"
                        icon="http://cdn.uviewui.com/uview/empty/data.png"
                        textSize="30"
@@ -149,9 +149,9 @@
                    </view>
                </view>
                <!-- 已预约提煤单 -->
                <!-- 已预约通知单 -->
                <view class="Reserved">
                    <combined-title title="已预约提煤单"></combined-title>
                    <combined-title title="已预约通知单"></combined-title>
                    <u-empty mode="data"
                        icon="http://cdn.uviewui.com/uview/empty/data.png"
                        textSize="30"
@@ -347,7 +347,7 @@
                    url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}`
                });
            },
            // 提煤单详情
            // 通知单详情
            cardBodyClick(name) {
                uni.navigateTo({
                    url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${name}`
@@ -456,7 +456,7 @@
        .driver-index-body {
            // margin-bottom: vww(56);
            // 待领取提煤单
            // 待领取通知单
            .wait-collection {
                width: 100%;
                height: 600rpx;
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -71,7 +71,7 @@
                <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="orderPlanData.length == 0"></u-empty>
            </view> -->
            <view class="history-numbers">
                <combined-title title="历史提煤单"></combined-title>
                <combined-title title="历史通知单"></combined-title>
                <scroll-view :scroll-top="scrollTop"
                    scroll-y="true"
                    class="scroll-Y"
@@ -106,7 +106,7 @@
                                <view class="third-line_num">{{ item.carNumSurplus }}</view>
                            </view>
                            <view class="third-line">
                                <view class="third-line_text">提煤单个数:</view>
                                <view class="third-line_text">通知单个数:</view>
                                <view class="third-line_num">{{ item.tmCount }}</view>
                            </view>
                        </view>
@@ -196,7 +196,7 @@
            }
        },
        methods: {
            // 获取历史提煤单
            // 获取历史通知单
            getJhOrderPlanDataPage() {
                uni.showLoading({
                    title: '加载中'
@@ -220,7 +220,7 @@
                this.pageCurrent++;
                this.getJhOrderPlanDataPage();
            },
            //fix 点击提煤单返回会增加重复数据
            //fix 点击通知单返回会增加重复数据
            ArrSet(Arr, id) {
                var obj = {};
                const arrays = Arr.reduce((setArr, item) => {
@@ -256,7 +256,7 @@
                    url: `/pages/public-page/forward/forward?orderPlanId=${value.orderPlanId}&carNumSurplusHuodai=${value.carNumSurplusHuodai}&carNum=${value.carNum}`
                });
            },
            // 点击历史提煤单一行获取详情
            // 点击历史通知单一行获取详情
            faYundetail(v) {
                uni.navigateTo({
                    url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}`
pages/login/login.vue
@@ -73,7 +73,9 @@
                // 绑定微信模态框
                bindWxModelShow: false,
                bindWxModelTitle: '提示',
                bindWxContent: '如果已拥有系统账号,可以直接跳转绑定微信页面'
                bindWxContent: '如果已拥有系统账号,可以直接跳转绑定微信页面',
                appid: "",
                secret: ""
            };
        },
        components: {
@@ -81,9 +83,16 @@
        },
        methods: {
            ...mapMutations(['setUserTabbar', 'changeisLogin']),
            getAppidAndSercet() {
                this.$reqGet('getAppidAndSercet').then(res => {
                    this.appid = res.data.appid;
                    this.secret = res.data.secret
                })
            },
            // 访问wx.login,获取code
            beforeLoginEvent() {
                this.loginPopupShow = true;
                this.getAppidAndSercet();
            },
            wxLogin() {
                // 获取登录用户code
@@ -108,7 +117,7 @@
                    title: '加载中...'
                });
                wx.request({
                    url: `https://api.weixin.qq.com/sns/jscode2session?appid=wx4a62fc1684c429a9&secret=ee90afe376cdcec2fdd947c0a4db961a&js_code=${code}&grant_type=authorization_code`,
                    url: `https://api.weixin.qq.com/sns/jscode2session?appid=${this.appid}&secret=${this.secret}&js_code=${code}&grant_type=authorization_code`,
                    success(res) {
                        uni.setStorageSync('openid', res.data.openid);
                        // uni.showToast({
pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails.vue
@@ -10,7 +10,7 @@
                </view>
                <view class="body-container">
                    <view class="container-block">
                        <view class="">提煤单状态</view>
                        <view class="">通知单状态</view>
                        <view class="">{{ coalStatus[faYunDetailobj.statusWeigh]||''}}</view>
                    </view>
                </view>
@@ -46,7 +46,7 @@
                </view>
                <view class="body-container">
                    <view class="container-block">
                        <view class="">提煤单编号</view>
                        <view class="">通知单编号</view>
                        <view class="">{{ faYunDetailobj.code || '' }}</view>
                    </view>
                </view>
pages/public-page/forward/forward.vue
@@ -247,10 +247,10 @@
                return uni.getStorageSync('roleType');
            },
            text() {
                return `已领取${this.cars2}张提煤单,剩余${this.carNumSurplus1}张提煤单`;
                return `已领取${this.cars2}张通知单,剩余${this.carNumSurplus1}张通知单`;
            },
            text1() {
                return `已拥有${this.carNum}张提煤单,剩余${this.carNumSurplusHuodai}张提煤单`;
                return `已拥有${this.carNum}张通知单,剩余${this.carNumSurplusHuodai}张通知单`;
            }
        },
        methods: {
@@ -372,12 +372,12 @@
                    }
                });
            },
            // 计算提煤单数量,添加或删除时调用
            // 计算通知单数量,添加或删除时调用
            calculate(arr) {
                let total = arr.reduce((prev, cur) => {
                    return cur.carNum + prev;
                }, 0);
                console.log(total, '提煤单一共的数据');
                console.log(total, '通知单一共的数据');
                if (this.roleType == 1) {
                    if (Number(this.cars2) >= total) {
                        this.carNumSurplus1 = Number(this.cars2) - total;
@@ -385,7 +385,7 @@
                        this.whetherClick1 = false;
                    } else {
                        this.carNumSurplus1 = 0;
                        this.$u.toast('剩余提煤单数量不足');
                        this.$u.toast('剩余通知单数量不足');
                        this.whetherClick = true;
                        this.whetherClick1 = true;
                    }
@@ -397,7 +397,7 @@
                        this.whetherClick1 = false;
                    } else {
                        this.carNumSurplusHuodai = 0;
                        this.$u.toast('剩余提煤单数量不足');
                        this.$u.toast('剩余通知单数量不足');
                        this.whetherClick = true;
                        this.whetherClick1 = true;
                    }
pages/register/register.vue
@@ -1,42 +1,116 @@
<template>
    <view class="register">
        <view class="registerForm">
            <u--form :rules="rules" :model="registerFormModel" ref="regesterFormRef">
                <u-form-item labelWidth="20%" label="选择身份" borderBottom ref="roleRef" required>
                    <u-radio-group v-model="radiovalue1" placement="row" @change="groupChange" size="30" shape="circle" iconSize="20">
                        <u-radio
                            labelSize="14px"
            <u--form :rules="rules"
                :model="registerFormModel"
                ref="regesterFormRef">
                <u-form-item labelWidth="20%"
                    label="选择身份"
                    borderBottom
                    ref="roleRef"
                    required>
                    <u-radio-group v-model="radiovalue1"
                        placement="row"
                        @change="groupChange"
                        size="30"
                        shape="circle"
                        iconSize="20">
                        <u-radio labelSize="14px"
                            size="20px"
                            :customStyle="{ marginBottom: '8px' }"
                            v-for="(item, index) in radiolist1"
                            :key="index"
                            :label="item.name"
                            :name="item.name"
                            @change="radioChange"
                        ></u-radio>
                            @change="radioChange"></u-radio>
                    </u-radio-group>
                </u-form-item>
                <u-form-item prop="name" label="姓名" labelWidth="20%" borderBottom required>
                    <u--input v-model="registerFormModel.name" placeholder="请输入内容" clearable></u--input>
                <u-form-item prop="name"
                    label="姓名"
                    labelWidth="20%"
                    borderBottom
                    required>
                    <u--input v-model="registerFormModel.name"
                        placeholder="请输入内容"
                        clearable></u--input>
                </u-form-item>
                <u-form-item prop="idCard" label="身份证" labelWidth="20%" borderBottom required>
                    <u--input v-model="registerFormModel.idCard" placeholder="请输入内容" clearable></u--input>
                <u-form-item prop="idCard"
                    label="身份证"
                    labelWidth="20%"
                    borderBottom
                    required>
                    <u--input v-model="registerFormModel.idCard"
                        placeholder="请输入内容"
                        clearable></u--input>
                </u-form-item>
                <u-form-item prop="phone" label="手机号" labelWidth="20%" borderBottom required>
                    <u--input v-model="registerFormModel.phone" placeholder="请输入内容" clearable></u--input>
                <u-form-item prop="phone"
                    label="手机号"
                    labelWidth="20%"
                    borderBottom
                    required>
                    <u--input v-model="registerFormModel.phone"
                        placeholder="请输入内容"
                        clearable></u--input>
                </u-form-item>
                <u-form-item prop="password" label="密码" labelWidth="20%" borderBottom required>
                    <u--input v-model="registerFormModel.password" placeholder="请输入内容" password clearable></u--input>
                <u-form-item prop="password"
                    label="密码"
                    labelWidth="20%"
                    borderBottom
                    required>
                    <u--input v-model="registerFormModel.password"
                        placeholder="请输入内容"
                        password
                        clearable></u--input>
                </u-form-item>
                <u-form-item prop="confirmPassword" label="确认密码" labelWidth="20%" borderBottom required>
                    <u--input v-model="registerFormModel.confirmPassword" placeholder="请输入内容" password clearable @blur="jiaoYanPassword"></u--input>
                <u-form-item prop="confirmPassword"
                    label="确认密码"
                    labelWidth="20%"
                    borderBottom
                    required>
                    <u--input v-model="registerFormModel.confirmPassword"
                        placeholder="请输入内容"
                        password
                        clearable
                        @blur="jiaoYanPassword"></u--input>
                </u-form-item>
                <u-form-item prop="carNo" label="车牌号" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required>
                    <u--input v-model="registerFormModel.carNo" placeholder="请输入内容" clearable></u--input>
                <u-form-item prop="carNo"
                    label="车牌号"
                    labelWidth="20%"
                    borderBottom
                    v-if="radiovalue1 == '司机'"
                    required>
                    <u--input v-model="registerFormModel.carNo"
                        placeholder="请输入内容"
                        clearable></u--input>
                </u-form-item>
                <u-form-item prop="carImg" label="车辆照片" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required @click="beforeRead">
                    <u-upload
                        :fileList="fileList1"
                <u-form-item labelWidth="20%"
                    label="车牌颜色"
                    borderBottom
                    v-if="radiovalue1 == '司机'"
                    required
                    prop="vehicleColour">
                    <u-radio-group v-model="registerFormModel.vehicleColour"
                        placement="row"
                        size="30"
                        shape="circle"
                        iconSize="20">
                        <u-radio labelSize="14px"
                            size="20px"
                            :customStyle="{ marginBottom: '8px' }"
                            v-for="(item, index) in radiolist2"
                            :key="index"
                            :label="item.name"
                            :name="item.value"></u-radio>
                    </u-radio-group>
                </u-form-item>
                <u-form-item prop="carImg"
                    label="车辆照片"
                    labelWidth="20%"
                    borderBottom
                    v-if="radiovalue1 == '司机'"
                    required
                    @click="beforeRead">
                    <u-upload :fileList="fileList1"
                        deletable
                        @afterRead="afterRead"
                        @delete="deletePic"
@@ -45,15 +119,19 @@
                        :maxCount="1"
                        width="250"
                        height="150"
                        :previewFullImage="true"
                    >
                        :previewFullImage="true">
                        <!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
                        mode="widthFix" style="width: 250px;height: 150px;"></image> -->
                    </u-upload>
                </u-form-item>
                <u-form-item prop="drivingImg" label="行驶证" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required @click="beforeRead">
                    <u-upload
                        :fileList="fileList2"
                <u-form-item prop="drivingImg"
                    label="行驶证"
                    labelWidth="20%"
                    borderBottom
                    v-if="radiovalue1 == '司机'"
                    required
                    @click="beforeRead">
                    <u-upload :fileList="fileList2"
                        deletable
                        @afterRead="afterRead"
                        @delete="deletePic"
@@ -62,21 +140,31 @@
                        :maxCount="1"
                        width="250"
                        height="150"
                        :previewFullImage="true"
                    >
                        :previewFullImage="true">
                        <!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
                        mode="widthFix" style="width: 250px;height: 150px;"></image> -->
                    </u-upload>
                </u-form-item>
                <u-form-item label="推荐人账号" labelWidth="25%" borderBottom>
                    <u--input v-model="registerFormModel.tuiJianMa" placeholder="请输入内容" clearable></u--input>
                <u-form-item label="推荐人账号"
                    labelWidth="25%"
                    borderBottom>
                    <u--input v-model="registerFormModel.tuiJianMa"
                        placeholder="请输入内容"
                        clearable></u--input>
                </u-form-item>
            </u--form>
        </view>
        <view class="roleModel">
            <u-modal :show="editRoleModelShow" :title="title" :content="content" :showCancelButton="true" @confirm="roleConfirm" @cancel="roleCancel"></u-modal>
            <u-modal :show="editRoleModelShow"
                :title="title"
                :content="content"
                :showCancelButton="true"
                @confirm="roleConfirm"
                @cancel="roleCancel"></u-modal>
        </view>
        <view class="registerBtn"><u-button text="注册" type="primary" @click="registerClick"></u-button></view>
        <view class="registerBtn"><u-button text="注册"
                type="primary"
                @click="registerClick"></u-button></view>
        <!-- 图片预览弹出框 -->
        <!-- <view class="previewImage-container">
            <u-popup :show="previewImageShow" mode="center" @close="previewImageClose" @open="previewImageOpen">
@@ -87,358 +175,374 @@
</template>
<script>
import { apiRegister } from '@/api/publicInterface.js';
import { BaseUrl } from '@/api/publicInterface.js';
import { mapMutations } from 'vuex';
export default {
    // onLoad: function() {
    //   // 查看是否授权
    //   wx.getSetting({
    //     success (res){
    //       if (res.authSetting['scope.userInfo']) {
    //         // 已经授权,可以直接调用 getUserInfo 获取头像昵称
    //         wx.getUserInfo({
    //           success: function(res) {
    //             console.log('res.userInfo',res.userInfo)
    //           }
    //         })
    //       }
    //     }
    //   })
    // },
    // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
    onReady() {
        this.$refs.regesterFormRef.setRules(this.rules);
        // this.$refs.regesterFormRef.validate().then(res => {}).catch(err => {
        //   console.log(err);
        // })
    },
    onLoad(params) {
        if (params) {
            this.registerFormModel.openId = params.code;
            console.log('页面加载', this.registerFormModel.openId);
        }
    },
    data() {
        return {
            // 车牌号键盘控制
            carNumShow: false,
            keyValue: '',
            registerFormModel: {
                phone: '',
                password: '',
                name: '',
                username: '',
                openId: '',
                type: 2,
                idCard: '',
                carNo: '',
                carImg: '',
                drivingImg: '',
                tuiJianMa: '',
                confirmPassword: ''
            },
            fileList1: [],
            fileList2: [],
            rules: {
                name: {
                    type: 'string',
                    required: true,
                    message: '请填写姓名',
                    trigger: ['blur', 'change']
    import { apiRegister } from '@/api/publicInterface.js';
    import { BaseUrl } from '@/api/publicInterface.js';
    import { mapMutations } from 'vuex';
    export default {
        // onLoad: function() {
        //   // 查看是否授权
        //   wx.getSetting({
        //     success (res){
        //       if (res.authSetting['scope.userInfo']) {
        //         // 已经授权,可以直接调用 getUserInfo 获取头像昵称
        //         wx.getUserInfo({
        //           success: function(res) {
        //             console.log('res.userInfo',res.userInfo)
        //           }
        //         })
        //       }
        //     }
        //   })
        // },
        // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
        onReady() {
            this.$refs.regesterFormRef.setRules(this.rules);
            // this.$refs.regesterFormRef.validate().then(res => {}).catch(err => {
            //   console.log(err);
            // })
        },
        onLoad(params) {
            if (params) {
                this.registerFormModel.openId = params.code;
                console.log('页面加载', this.registerFormModel.openId);
            }
        },
        data() {
            return {
                // 车牌号键盘控制
                carNumShow: false,
                keyValue: '',
                registerFormModel: {
                    phone: '',
                    password: '',
                    name: '',
                    username: '',
                    openId: '',
                    type: 2,
                    idCard: '',
                    carNo: '',
                    carImg: '',
                    drivingImg: '',
                    tuiJianMa: '',
                    confirmPassword: '',
                    vehicleColour: ''
                },
                idCard: [
                    {
                fileList1: [],
                fileList2: [],
                rules: {
                    name: {
                        type: 'string',
                        required: true,
                        message: '请输入身份证号',
                        message: '请填写姓名',
                        trigger: ['blur', 'change']
                    },
                    {
                        pattern: /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
                        message: '身份证号格式不正确'
                    }
                ],
                phone: [
                    {
                        required: true,
                        message: '此项为必填项',
                        // blur和change事件触发检验
                        trigger: ['blur', 'change']
                    },
                    {
                        min: 11,
                        max: 11,
                        message: '请输入合法手机号'
                    },
                    {
                        validator: (rule, value, callback) => {
                            return uni.$u.test.mobile(value);
                    idCard: [{
                            type: 'string',
                            required: true,
                            message: '请输入身份证号',
                            trigger: ['blur', 'change']
                        },
                        message: '手机号码不正确',
                        trigger: ['change', 'blur']
                    }
                ],
                password: [
                    {
                        required: true,
                        message: '请设置初始密码',
                        trigger: ['blur', 'change']
                    },
                    {
                        min: 6,
                        max: 12,
                        message: '长度在6-12个字符之间'
                    }
                ],
                confirmPassword: [
                    {
                        required: true,
                        message: '请设置初始密码',
                        trigger: ['blur', 'change']
                    },
                    {
                        min: 6,
                        max: 12,
                        message: '长度在6-12个字符之间'
                    }
                ],
                carNo: [
                    {
                        type: 'string',
                        required: true,
                        message: '请输入车牌号',
                        trigger: ['blur', 'change']
                    },
                    {
                        transform(value) {
                            return String(value);
                        },
                        validator: (rule, value, callback) => {
                            return uni.$u.test.carNo(value);
                        },
                        message: '请输入正确的车牌号',
                        trigger: ['change', 'blur']
                    }
                ],
                carImg: {
                    type: 'string',
                    required: true,
                    message: '请上传车辆图片',
                    trigger: ['blur', 'change']
                },
                drivingImg: {
                    type: 'string',
                    required: true,
                    message: '请上传行驶证照片',
                    trigger: ['blur', 'change']
                }
            },
            // 基本案列数据
            radiolist1: [
                {
                    name: '货代',
                    disabled: false
                },
                {
                    name: '司机',
                    disabled: false
                }
            ],
            // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
            radiovalue1: '货代',
            beforeChangeValue: '',
            // 更换角色弹框
            editRoleModelShow: false,
            title: '提示',
            content: '当前填入信息,切换角色后,即清除,是否切换?',
            wxcode: '',
            openid: ''
        };
    },
    watch: {
        radiovalue1(newV) {
            if (this.registerFormModel.name || this.registerFormModel.idCard || this.registerFormModel.phone || this.registerFormModel.carNo || this.registerFormModel.password) {
                if (this.editRoleModelShow == true) {
                    this.editRoleModelShow = false;
                } else {
                    this.editRoleModelShow = true;
                }
            }
            switch (newV) {
                case '货代':
                    this.registerFormModel.type = 2;
                    break;
                case '司机':
                    this.registerFormModel.type = 3;
                    break;
                default:
                    break;
            }
            return;
        }
    },
    methods: {
        ...mapMutations(['changeisUploadimg']),
        registerClick() {
            if (this.registerFormModel.password == this.registerFormModel.confirmPassword) {
                this.$refs.regesterFormRef
                    .validate()
                    .then(res => {
                        console.log(this.registerFormModel);
                        this.registerFormModel.username = this.registerFormModel.phone;
                        apiRegister(this.registerFormModel)
                            .then(res => {
                                if (res.data.code == 0) {
                                    uni.showToast({
                                        title: '注册成功,即将返回登录页',
                                        icon: 'none',
                                        duration: 1000
                                    });
                                    setTimeout(() => {
                                        uni.redirectTo({ url: '/pages/login/login' });
                                    }, 1000);
                                } else {
                                    this.$u.toast(res.msg ? res.msg : '添加失败');
                                }
                            })
                            .catch(err => {
                                console.log('错误', err);
                            });
                    })
                    .catch(err => {
                        console.log('err', err);
                        this.$u.toast('请规范输入内容');
                    });
            } else {
                this.$u.toast('两次密码不一致');
            }
        },
        // 单选框事件
        groupChange(e) {},
        radioChange(e) {
            if (
                this.registerFormModel.name == '' &&
                this.registerFormModel.idCard == '' &&
                this.registerFormModel.phone == '' &&
                this.registerFormModel.carNo == '' &&
                this.registerFormModel.password == ''
            ) {
                this.$refs.regesterFormRef.clearValidate();
                this.beforeChangeValue = e;
            }
        },
        jiaoYanPassword() {
            if (this.registerFormModel.password != this.registerFormModel.confirmPassword) {
                this.$u.toast('两次密码不一致');
            }
        },
        // 上传图片方法
        beforeRead() {
            this.changeisUploadimg(true);
        },
        // 删除图片
        deletePic(event) {
            this.changeisUploadimg(true);
            this[`fileList${event.name}`].splice(event.index, 1);
        },
        // 新增图片
        async afterRead(event) {
            // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
            let lists = [].concat(event.file);
            let fileListLen = this[`fileList${event.name}`].length;
            lists.map(item => {
                this[`fileList${event.name}`].push({
                    ...item,
                    status: 'uploading',
                    message: '上传中'
                });
            });
            for (let i = 0; i < lists.length; i++) {
                const result = await this.uploadFilePromise(lists[i].url, event.name);
                let item = this[`fileList${event.name}`][fileListLen];
                this[`fileList${event.name}`].splice(
                    fileListLen,
                    1,
                    Object.assign(item, {
                        status: 'success',
                        message: '上传成功',
                        url: result
                    })
                );
                fileListLen++;
            }
        },
        uploadFilePromise(url, num) {
            return new Promise((resolve, reject) => {
                let a = uni.uploadFile({
                    url: BaseUrl + '/admin/sys-file/uploadUnToken',
                    filePath: url,
                    name: 'file',
                    formData: {
                        // user: ''
                    },
                    success: res => {
                        if (num == 1) {
                            this.registerFormModel.carImg = JSON.parse(res.data).data.url;
                            resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                        } else if (num == 2) {
                            this.registerFormModel.drivingImg = JSON.parse(res.data).data.url;
                            resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                        {
                            pattern: /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
                            message: '身份证号格式不正确'
                        }
                    ],
                    phone: [{
                            required: true,
                            message: '此项为必填项',
                            // blur和change事件触发检验
                            trigger: ['blur', 'change']
                        },
                        {
                            min: 11,
                            max: 11,
                            message: '请输入合法手机号'
                        },
                        {
                            validator: (rule, value, callback) => {
                                return uni.$u.test.mobile(value);
                            },
                            message: '手机号码不正确',
                            trigger: ['change', 'blur']
                        }
                    ],
                    password: [{
                            required: true,
                            message: '请设置初始密码',
                            trigger: ['blur', 'change']
                        },
                        {
                            min: 6,
                            max: 12,
                            message: '长度在6-12个字符之间'
                        }
                    ],
                    confirmPassword: [{
                            required: true,
                            message: '请设置初始密码',
                            trigger: ['blur', 'change']
                        },
                        {
                            min: 6,
                            max: 12,
                            message: '长度在6-12个字符之间'
                        }
                    ],
                    carNo: [{
                            type: 'string',
                            required: true,
                            message: '请输入车牌号',
                            trigger: ['blur', 'change']
                        },
                        {
                            transform(value) {
                                return String(value);
                            },
                            validator: (rule, value, callback) => {
                                return uni.$u.test.carNo(value);
                            },
                            message: '请输入正确的车牌号',
                            trigger: ['change', 'blur']
                        }
                    ],
                    vehicleColour: {
                        type: 'string',
                        required: true,
                        message: '请选择车牌颜色',
                        trigger: ['blur', 'change']
                    },
                    carImg: {
                        type: 'string',
                        required: true,
                        message: '请上传车辆图片',
                        trigger: ['blur', 'change']
                    },
                    drivingImg: {
                        type: 'string',
                        required: true,
                        message: '请上传行驶证照片',
                        trigger: ['blur', 'change']
                    }
                },
                radiolist1: [{
                        name: '货代',
                        disabled: false
                    },
                    {
                        name: '司机',
                        disabled: false
                    }
                ],
                radiovalue1: '货代',
                radiolist2: [{
                        name: '黄色',
                        value: 'huangse'
                    },
                    {
                        name: '绿色',
                        disabled: 'lvse'
                    }
                ],
                radiovalue2: '黄色',
                beforeChangeValue: '',
                // 更换角色弹框
                editRoleModelShow: false,
                title: '提示',
                content: '当前填入信息,切换角色后,即清除,是否切换?',
                wxcode: '',
                openid: ''
            };
        },
        watch: {
            radiovalue1(newV) {
                if (this.registerFormModel.name || this.registerFormModel.idCard || this.registerFormModel.phone || this
                    .registerFormModel.carNo || this.registerFormModel.password) {
                    if (this.editRoleModelShow == true) {
                        this.editRoleModelShow = false;
                    } else {
                        this.editRoleModelShow = true;
                    }
                }
                switch (newV) {
                    case '货代':
                        this.registerFormModel.type = 2;
                        break;
                    case '司机':
                        this.registerFormModel.type = 3;
                        break;
                    default:
                        break;
                }
                return;
            }
        },
        methods: {
            ...mapMutations(['changeisUploadimg']),
            registerClick() {
                if (this.registerFormModel.password == this.registerFormModel.confirmPassword) {
                    this.$refs.regesterFormRef
                        .validate()
                        .then(res => {
                            console.log(this.registerFormModel);
                            this.registerFormModel.username = this.registerFormModel.phone;
                            apiRegister(this.registerFormModel)
                                .then(res => {
                                    if (res.data.code == 0) {
                                        uni.showToast({
                                            title: '注册成功,即将返回登录页',
                                            icon: 'none',
                                            duration: 1000
                                        });
                                        setTimeout(() => {
                                            uni.redirectTo({ url: '/pages/login/login' });
                                        }, 1000);
                                    } else {
                                        this.$u.toast(res.data.msg ? res.data.msg : '添加失败');
                                    }
                                })
                                .catch(err => {
                                    console.log('错误', err);
                                });
                        })
                        .catch(err => {
                            console.log('err', err);
                            this.$u.toast('请规范输入内容');
                        });
                } else {
                    this.$u.toast('两次密码不一致');
                }
            },
            // 单选框事件
            groupChange(e) {},
            radioChange(e) {
                if (
                    this.registerFormModel.name == '' &&
                    this.registerFormModel.idCard == '' &&
                    this.registerFormModel.phone == '' &&
                    this.registerFormModel.carNo == '' &&
                    this.registerFormModel.password == ''
                ) {
                    this.$refs.regesterFormRef.clearValidate();
                    this.beforeChangeValue = e;
                }
            },
            jiaoYanPassword() {
                if (this.registerFormModel.password != this.registerFormModel.confirmPassword) {
                    this.$u.toast('两次密码不一致');
                }
            },
            // 上传图片方法
            beforeRead() {
                this.changeisUploadimg(true);
            },
            // 删除图片
            deletePic(event) {
                this.changeisUploadimg(true);
                this[`fileList${event.name}`].splice(event.index, 1);
            },
            // 新增图片
            async afterRead(event) {
                // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
                let lists = [].concat(event.file);
                let fileListLen = this[`fileList${event.name}`].length;
                lists.map(item => {
                    this[`fileList${event.name}`].push({
                        ...item,
                        status: 'uploading',
                        message: '上传中'
                    });
                });
                for (let i = 0; i < lists.length; i++) {
                    const result = await this.uploadFilePromise(lists[i].url, event.name);
                    let item = this[`fileList${event.name}`][fileListLen];
                    this[`fileList${event.name}`].splice(
                        fileListLen,
                        1,
                        Object.assign(item, {
                            status: 'success',
                            message: '上传成功',
                            url: result
                        })
                    );
                    fileListLen++;
                }
            },
            uploadFilePromise(url, num) {
                return new Promise((resolve, reject) => {
                    let a = uni.uploadFile({
                        url: BaseUrl + '/admin/sys-file/uploadUnToken',
                        filePath: url,
                        name: 'file',
                        formData: {
                            // user: ''
                        },
                        success: res => {
                            if (num == 1) {
                                this.registerFormModel.carImg = JSON.parse(res.data).data.url;
                                resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                            } else if (num == 2) {
                                this.registerFormModel.drivingImg = JSON.parse(res.data).data.url;
                                resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                            }
                        }
                    });
                });
            },
            // 更换角色弹出框
            roleConfirm() {
                console.log('遍历对象', Object.keys(this.registerFormModel));
                Object.keys(this.registerFormModel).forEach(item => {
                    if (item !== 'type') {
                        if (this.registerFormModel[item]) this.registerFormModel[item] = '';
                    }
                });
            });
        },
        // 更换角色弹出框
        roleConfirm() {
            console.log('遍历对象', Object.keys(this.registerFormModel));
            Object.keys(this.registerFormModel).forEach(item => {
                if (item !== 'type') {
                    if (this.registerFormModel[item]) this.registerFormModel[item] = '';
                }
            });
            /**
             * @resetFields 不管用时候用上边的代替
             */
            this.$refs.regesterFormRef.resetFields();
            this.editRoleModelShow = false;
        },
        roleCancel() {
            this.radiovalue1 = this.beforeChangeValue;
            this.$nextTick(() => {
                /**
                 * @resetFields 不管用时候用上边的代替
                 */
                this.$refs.regesterFormRef.resetFields();
                this.editRoleModelShow = false;
            });
            },
            roleCancel() {
                this.radiovalue1 = this.beforeChangeValue;
                this.$nextTick(() => {
                    this.editRoleModelShow = false;
                });
            }
        }
    }
};
    };
</script>
<style lang="scss" scoped>
::v-deep.register {
    width: 94%;
    padding: 0 0 vww(20) 0;
    margin: 0 auto;
    .registerForm {
<style lang="scss"
    scoped>
    ::v-deep.register {
        width: 94%;
        padding: 0 0 vww(20) 0;
        margin: 0 auto;
        font-size: 16px !important;
        .u-form {
            .u-radio {
                width: 33%;
        .registerForm {
            width: 94%;
            margin: 0 auto;
            font-size: 16px !important;
            .u-form {
                .u-radio {
                    width: 33%;
                }
            }
        }
        .registerBtn {
            width: 94%;
            margin: vww(50) auto 0;
        }
        .utils {
            line-height: vww(30);
            text-align: center;
            text:nth-of-type(1) {
                margin-right: vww(10);
            }
        }
    }
    .registerBtn {
        width: 94%;
        margin: vww(50) auto 0;
    }
    .utils {
        line-height: vww(30);
        text-align: center;
        text:nth-of-type(1) {
            margin-right: vww(10);
        }
    }
}
</style>
</style>
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -57,7 +57,7 @@
        //首页下拉刷新
        onPullDownRefresh() {
            uni.showLoading({ title: '加载中...' });
            // 获取历史提煤单
            // 获取历史通知单
            if (this.roleType == 1 || this.roleType == 2) {
                this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
                    if (res.data.records) {
@@ -150,9 +150,12 @@
                        if (nowWeighObj.eqInfraredStatus) {
                            this.changeinfraredStatus(true);
                            this.changeWeigh(nowWeighObj.weigh);
                            let warningState = nowWeighObj.warning == 1
                            this.changeWarning(warningState)
                        } else {
                            this.changeinfraredStatus(false);
                            this.changeWeigh(nowWeighObj.weigh);
                            this.changeWarning(warningState)
                        }
                    }
                } else if (v.startsWith('msg')) {
@@ -188,7 +191,7 @@
        },
        methods: {
            ...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus', 'changeisconnect', 'websocketInit',
                'changeisLogin'
                'changeisLogin', 'changeWarning'
            ]),
            messagePage() {
                uni.navigateTo({
store/index.js
@@ -105,7 +105,9 @@
        globalIntervalId: null,
        is_open_socket: false, //避免重复连接
        connectNum: 1, //重连次数,
        reconnectTimeOut: null
        reconnectTimeOut: null,
        // 称重稳定态  0/稳定 1/非稳定  非稳定态不能点称重
        globalWarning: false
    },
    mutations: {
        lengthchange(state, payload) {
@@ -169,12 +171,16 @@
        },
        // 改变重连次数
        changereconnectNum(state, payload) {
            if (state.connectNum < 6) {
            if (state.connectNum <= 6) {
                state.connectNum += payload
            } else {
                state.connectNum = payload
            }
        },
        // 改变稳定态
        changeWarning(state, payload) {
            state.globalWarning = payload
        }
    },
    actions: {
        websocketInit({ state, dispatch, commit }) {
@@ -225,7 +231,7 @@
            clearInterval(state.reconnectTimeOut)
            state.socketTast = null
            commit('changereconnectState', false)
            if (state.connectNum < 6 && state.globalisLogin) {
            if (state.connectNum <= 6 && state.globalisLogin) {
                uni.showToast({
                    title: `连接失败,正在尝试第${state.connectNum}次连接`,
                    icon: 'none'