qingyiay
2023-04-08 237a32aadb51f4c7f51d4734f6e62663f8acde36
修复多个bug
9个文件已修改
212 ■■■■ 已修改文件
api/publicInterface.js 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/request.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/appointment/appointment.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/driver-index.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar-page/index-tabbar/index-tabbar.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/publicInterface.js
@@ -2,13 +2,11 @@
// import login from "../pages/login/login";
import {
    BaseUrl as wrBaseUrl
} from '@/api/request.js'
const BaseUrl = "http://192.168.0.110:9999";
import { BaseUrl as wrBaseUrl } from '@/api/request.js'
const BaseUrl = 'http://192.168.31.14:9999'
// const BaseUrl = "http://hesuancj.cn:9999"
// const BaseUrl = "https://hesuancj.cn:9095"
// const BaseUrl = "http://192.168.3.119:9999"
// const BaseUrl = 'https://mx.jzeg.cn:9095'
// const BaseUrl = 'http://192.168.31.18:9999'
// 登录
// function apiLogin({
@@ -63,9 +61,7 @@
    carImg,
    drivingImg
}) {
    uni.showLoading({
        title: "加载中..."
    })
    uni.showLoading({ title: '加载中...' })
    return new Promise((resolve, reject) => {
        uni.request({
            url: wrBaseUrl + '/wrzs/wx/bindWx',
@@ -83,18 +79,18 @@
                drivingImg
            },
            header: {
                "Authorization": 'Basic c29jaWFsOnNvY2lhbA==', //app:app
                'Authorization': 'Basic c29jaWFsOnNvY2lhbA==', //app:app
                'content-type': 'application/json',
                "CLIENT_TOC": "Y",
                "isToken": "false"
                'CLIENT_TOC': 'Y',
                'isToken': 'false'
            },
            success: (res) => {
                uni.hideLoading();
            success: res => {
                uni.hideLoading()
                resolve(res)
            },
            fail: (err) => {
                console.log('错误', err);
                uni.hideLoading();
            fail: err => {
                console.log('错误', err)
                uni.hideLoading()
                uni.showModal({
                    title: '服务器错误',
                    icon: null
@@ -114,8 +110,8 @@
}) {
    return new Promise((resolve, reject) => {
        uni.request({
            url: BaseUrl + "/admin/oauth2/token",
            method: "POST",
            url: BaseUrl + '/admin/oauth2/token',
            method: 'POST',
            data: {
                username,
                password,
@@ -123,18 +119,18 @@
                scope
            },
            header: {
                "Authorization": 'Basic c29jaWFsOnNvY2lhbA==', //app:app
                'Authorization': 'Basic c29jaWFsOnNvY2lhbA==', //app:app
                'content-type': 'application/x-www-form-urlencoded',
                "CLIENT_TOC": "Y",
                "isToken": "false"
                'CLIENT_TOC': 'Y',
                'isToken': 'false'
            },
            success: (res) => {
                uni.hideLoading();
                resolve(res.data);
            success: res => {
                uni.hideLoading()
                resolve(res.data)
            },
            fail: (err) => {
                console.log('错误', err);
                uni.hideLoading();
            fail: err => {
                console.log('错误', err)
                uni.hideLoading()
                uni.showToast({
                    icon: 'none',
                    title: '服务器错误'
@@ -146,34 +142,30 @@
// 微信小程序一键登录
function apiLoginWx({
    code
}) {
    uni.showLoading({
        title: '加载中...'
    })
function apiLoginWx({ code }) {
    uni.showLoading({ title: '加载中...' })
    return new Promise((resolve, reject) => {
        uni.request({
            url: BaseUrl + '/admin/oauth2/token',
            method: "POST",
            method: 'POST',
            data: {
                grant_type: 'mobile',
                mobile: `MINI@${code}`,
                code
            },
            header: {
                "Authorization": 'Basic c29jaWFsOnNvY2lhbA==', //app:app
                'Authorization': 'Basic c29jaWFsOnNvY2lhbA==', //app:app
                'content-type': 'application/x-www-form-urlencoded',
                "CLIENT_TOC": "Y",
                "isToken": "false"
                'CLIENT_TOC': 'Y',
                'isToken': 'false'
            },
            success: (res) => {
                uni.hideLoading();
            success: res => {
                uni.hideLoading()
                resolve(res.data)
            },
            fail: (err) => {
                console.log('错误', err);
                uni.hideLoading();
            fail: err => {
                console.log('错误', err)
                uni.hideLoading()
                uni.showToast({
                    icon: 'none',
                    title: '服务器错误'
api/request.js
@@ -78,18 +78,19 @@
    500: responseError
}
// const BaseUrl = "http://192.168.0.120:9997"
// const webSocketUrl = "ws://192.168.3.119:9997/wrzs/ws/info"
// const BaseUrl = "http://192.168.31.18:9997"
// const webSocketUrl = "ws://192.168.31.18:9997/wrzs/ws/info"
// const BaseUrl = "http://192.168.3.119:9997";
const BaseUrl = "http://192.168.0.110:9997";
const webSocketUrl = "ws://192.168.0.110:9997/wrzs/ws/info"
const BaseUrl = "http://192.168.31.14:9997";
const webSocketUrl = "ws://192.168.31.14:9997/wrzs/ws/info"
// // 线上开发
// const BaseUrl = "http://hesuancj.cn:9997";
// 线上
// const BaseUrl = "https://hesuancj.cn:9095";
// const webSocketUrl = "wss://hesuancj.cn:9095/wrzs/ws/info"
// const webSocketUrl = "ws://hesuancj.cn:9997/wrzs/ws/info"
// // 线上生产
// const BaseUrl = "https://mx.jzeg.cn:9095";
// const webSocketUrl = "wss://mx.jzeg.cn:9095/wrzs/ws/info"
// 请求拦截
const fetch = (url, opt) => {
    // 查找对应地址
pages/customer-page/customer-index/customer-index.vue
@@ -9,8 +9,8 @@
                        张
                    </view>
                    <view class="card-left__utils">
                        <u-button @tap.stop="receiveClick(item)" text="领取" type="primary" v-if="item.carNumSurplus != 0" shape="circle"></u-button>
                        <u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplus1 != 0"></u-button>
                        <u-button @tap.stop="receiveClick(item)" text="领取" type="primary" v-if="item.carNum != 0" shape="circle"></u-button>
                        <u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.cars2 != 0"></u-button>
                    </view>
                </template>
                <template v-slot:right-top>
@@ -141,9 +141,7 @@
        },
        // 获取发运计划列表
        GetOrderPlan() {
            uni.showLoading({
                title: '加载中...'
            });
            uni.showLoading({ title: '加载中...' });
            this.$reqGet('GetOrderPlan').then(res => {
                if (res.data) {
                    this.orderPlanData = res.data;
@@ -178,9 +176,7 @@
        popupDetermineClick() {
            if (this.receiveNum) {
                this.getOrderNum.num = this.receiveNum;
                uni.showLoading({
                    title: '加载中...'
                });
                uni.showLoading({ title: '加载中...' });
                this.$reqPost('customerGet', this.getOrderNum, 'params').then(res => {
                    uni.hideLoading();
                    if (res.code == 0) {
@@ -230,21 +226,15 @@
                    cars2 = item.cars2;
                }
            });
            uni.navigateTo({
                url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${name}&code=${code}&cars2=${cars2}`
            });
            uni.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${name}&code=${code}&cars2=${cars2}` });
        },
        // 点击历史提煤单一行获取详情
        faYundetail(v) {
            uni.navigateTo({
                url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}`
            });
            uni.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}` });
        },
        // 转发
        forwardClick(obj) {
            uni.navigateTo({
                url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}`
            });
            uni.navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` });
        }
    }
};
@@ -253,6 +243,7 @@
<style lang="scss" scoped>
.scroll-Y {
    height: 600rpx;
    margin-bottom: vww(50);
    .more_text {
        color: #999;
        font-size: 24rpx;
@@ -264,7 +255,7 @@
    margin: 0 auto;
    // 主体
    .customer-index-body {
        margin-bottom: vww(56);
        margin-bottom: vww(10);
        .card-left__top {
            margin-top: vww(26);
            text-align: center;
pages/driver-page/appointment/appointment.vue
@@ -96,9 +96,11 @@
            this.$reqPost('yuYue', { takeCoalId: this.yuYuePostParams.takeCoalId, yuYueId: this.yuYuePostParams.yuYueId }, 'params').then(res => {
                if (res.code == 0) {
                    this.$u.toast('预约成功!');
                    uni.navigateBack({
                        delta: 1
                    });
                    let timer = setTimeout(() => {
                        uni.navigateBack({
                            delta: 1
                        });
                    }, 1000);
                } else {
                    this.$u.toast(res.msg ? res.msg : '预约失败');
                }
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -248,9 +248,7 @@
                    uni.navigateTo({
                        url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${
                            res.data.id
                        }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&getWeightHouseObj=${JSON.stringify(
                            this.getWeightHouseObj
                        )}`
                        }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}`
                    });
                } else {
                    this.$u.toast('未在磅房,请前往磅房后再试!!');
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -76,8 +76,6 @@
    },
    data() {
        return {
            // 是否可点击放空
            isEvacuation: false,
            weighData: {
                //确认称重接口参数
                deptId: '',
@@ -188,7 +186,7 @@
                        if (this.weighList.skin ? (this.weighList.skin < this.realTimeWeigh ? true : false) : true) {
                            this.saveWeigh();
                        } else {
                            this.$u.toast('毛重不q能小于皮重');
                            this.$u.toast('毛重不能小于皮重');
                            this.isConfirmWeighLoading = false;
                        }
                    } else {
pages/driver-page/driver-index/driver-index.vue
@@ -67,7 +67,7 @@
                <!-- 待预约提煤单 -->
                <view class="daiYuYue" v-for="(item, index) in driverBillOfLoadingData.list3" :key="index">
                    <view class="daiYuYueTop">
                        <text class="tmcode">提煤单编号:{{ item.code }}</text>
                        <view class="tmcode">提煤单编号:{{ item.code }}</view>
                    </view>
                    <view class="daiYuYueTable">
                        <!-- <view>{{ item.deptName }}</view>
@@ -141,7 +141,6 @@
    watch: {
        indexdriverBillOfLoadingData: {
            handler(v) {
                console.log(v, '刷新之后的司机首页');
                this.driverBillOfLoadingData = v;
            },
            deep: true,
@@ -174,7 +173,6 @@
                title: '加载中...'
            });
            this.$reqGet('qiangDanList').then(res => {
                console.log(res, '司机首页');
                uni.hideLoading();
                this.driverBillOfLoadingData = res.data;
            });
@@ -292,15 +290,13 @@
                background-color: #f5f5f5;
                height: vww(60);
                padding-left: vww(12);
                line-height: vww(40);
                line-height: vww(31);
                border: vww(1) solid #eeeeee;
                font-weight: 400;
                // .tmcode {
                //     overflow: hidden;
                //     text-overflow: ellipsis;
                //     white-space: nowrap;
                //     width: 100%;
                // }
                .tmcode {
                    word-break: break-all;
                    width: 100%;
                }
            }
            &Table {
                .uni-table {
@@ -334,15 +330,13 @@
                background-color: #f5f5f5;
                height: vww(60);
                padding-left: vww(12);
                line-height: vww(40);
                line-height: vww(31);
                border: vww(1) solid #eeeeee;
                font-weight: 400;
                // .tmcode {
                //     overflow: hidden;
                //     text-overflow: ellipsis;
                //     white-space: nowrap;
                //     width: 100%;
                // }
                .tmcode {
                    word-break: break-all;
                    width: 100%;
                }
            }
            &Center {
                border: vww(1) solid #eeeeee;
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -179,6 +179,7 @@
<style lang="scss" scoped>
.scroll-Y {
    height: 600rpx;
    margin-bottom: vww(50);
    .more_text {
        color: #999;
        font-size: 24rpx;
@@ -190,7 +191,7 @@
    margin: 0 auto;
    // 主体
    .freightForwarder-index-body {
        margin-bottom: vww(56);
        margin-bottom: vww(10);
        // 卡片样式
        .card-left__top {
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -25,8 +25,16 @@
    },
    //首页下拉刷新
    onPullDownRefresh() {
        uni.showLoading({
            title: '加载中...'
        uni.showLoading({ title: '加载中...' });
        // 获取历史提煤单
        this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
            if (res.data.records) {
                this.indexHistoryCoalData = res.data.records;
                uni.hideLoading();
                uni.stopPullDownRefresh();
            } else {
                this.$u.toast('加载失败');
            }
        });
        // 客户获取日计划
        if (this.roleType == 1) {
@@ -35,28 +43,31 @@
                    this.orderPlanDataStore = res.data;
                    uni.hideLoading();
                    uni.stopPullDownRefresh();
                } else {
                    this.$u.toast('加载失败');
                }
            });
        } else if (this.roleType == 2) {
            this.$reqGet('huoDaiList').then(res => {
                this.indexHuoDaiOrderPlanData = res.data;
                uni.hideLoading();
                uni.stopPullDownRefresh();
            });
            // 获取历史提煤单
            this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
                if (res.data.records) {
                    this.indexHistoryCoalData = res.data.records;
                if (res.data) {
                    this.indexHuoDaiOrderPlanData = res.data;
                    uni.hideLoading();
                    uni.stopPullDownRefresh();
                } else {
                    this.$u.toast('加载失败');
                }
            });
        } else if (this.roleType == 3) {
            this.$reqGet('qiangDanList').then(res => {
                this.indexdriverBillOfLoadingData = res.data;
                uni.hideLoading();
                uni.stopPullDownRefresh();
            });
            if (res.data) {
                this.$reqGet('qiangDanList').then(res => {
                    this.indexdriverBillOfLoadingData = res.data;
                    uni.hideLoading();
                    uni.stopPullDownRefresh();
                });
            } else {
                this.$u.toast('加载失败');
            }
            s;
        }
    },
    onLoad() {