qingyiay
2023-03-27 7986bc00e330411ffc73da24fdd168c6af8cf295
0327测试
9个文件已修改
155 ■■■■ 已修改文件
api/publicInterface.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/request.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/fleet-management/fleet-management.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/driver-index.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/public-page/forward/forward.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar-page/index-tabbar/index-tabbar.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/publicInterface.js
@@ -6,7 +6,8 @@
    BaseUrl as wrBaseUrl
} from '@/api/request.js'
// const BaseUrl = "http://192.168.0.120:9999"
const BaseUrl = "http://192.168.3.109:9999"
const BaseUrl = "http://192.168.0.144:9999"
// const BaseUrl = "http://10.101.33.114:9999"
// 登录
// function apiLogin({
api/request.js
@@ -80,9 +80,12 @@
// const BaseUrl = "http://192.168.0.120:9997"
// const webSocketUrl = "ws://192.168.0.120:9997/wrzs/ws/info"
const BaseUrl = "http://192.168.3.109:9997";
const webSocketUrl = "ws://192.168.3.109:9997/wrzs/ws/info"
// const BaseUrl = "http://192.168.3.109:9997";
const BaseUrl = "http://192.168.0.144:9997";
const webSocketUrl = "ws://192.168.3.109:9997/wrzs/ws/info"
// const webSocketUrl = "ws://10.101.33.114:9997/wrzs/ws/info"
// 请求拦截
const fetch = (url, opt) => {
    // 查找对应地址
pages.json
@@ -25,7 +25,7 @@
            "path": "pages/tabbar-page/index-tabbar/index-tabbar",
            "style": {
                "navigationBarTitleText": "首页",
                "enablePullDownRefresh": false
                "enablePullDownRefresh": true
            }
        }, {
@@ -40,7 +40,7 @@
            "path": "pages/customer-page/customer-index/customer-index",
            "style": {
                "navigationBarTitleText": "首页",
                "enablePullDownRefresh": false
                "enablePullDownRefresh": true
            }
        }, {
@@ -54,7 +54,7 @@
            "path": "pages/driver-page/driver-index/driver-index",
            "style": {
                "navigationBarTitleText": "首页",
                "enablePullDownRefresh": false
                "enablePullDownRefresh": true
            }
        }, {
@@ -68,7 +68,7 @@
            "path": "pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index",
            "style": {
                "navigationBarTitleText": "首页",
                "enablePullDownRefresh": false
                "enablePullDownRefresh": true
            }
        }, {
@@ -204,4 +204,4 @@
            "query": "" //启动参数,在页面的onLoad函数里面得到
        }]
    }
}
}
pages/customer-page/customer-index/customer-index.vue
@@ -48,7 +48,7 @@
        </view>
        <view class="history-numbers">
            <combined-title title="历史提煤单"></combined-title>
            <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y">
            <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="historyScrolltolower">
                <uni-table border stripe emptyText="暂无更多数据" :loading="loading">
                    <uni-tr>
                        <uni-th width="100" align="center">发运日期</uni-th>
@@ -69,8 +69,8 @@
                        <uni-td align="center">{{ item.tmCount }}</uni-td>
                    </uni-tr>
                </uni-table>
                <view class="more_text" v-if="showMoreData">没有数据了...</view>
            </scroll-view>
            <view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change2" /></view>
        </view>
        <!-- 领取弹出框 -->
        <u-popup :show="show" @close="close" @open="open" mode="center" round="10">
@@ -88,9 +88,23 @@
import combinedTitle from '@/components/combined-title/combined-title.vue';
import { customerId } from '@/utils/status';
export default {
    props: {
        orderPlanDataStore: {
            type: Array,
            default: []
        }
    },
    components: {
        card,
        combinedTitle
    },
    watch: {
        orderPlanDataStore(v) {
            if (v.length > 0) {
                console.log(v, 'props');
                this.orderPlanData = v;
            }
        }
    },
    data() {
        return {
@@ -110,7 +124,9 @@
            // 当前页
            pageCurrent: 1,
            // 数据总量
            total: 0
            total: 0,
            // 是否显示更多数据
            showMoreData: false
        };
    },
    onLoad() {},
@@ -121,6 +137,7 @@
        init() {
            this.GetOrderPlan();
            this.getJhOrderPlanDataPage();
            if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
        },
        // 获取发运计划列表
        GetOrderPlan() {
@@ -128,22 +145,31 @@
                title: '加载中...'
            });
            this.$reqGet('GetOrderPlan').then(res => {
                this.orderPlanData = res.data;
                uni.hideLoading();
                if (res.data) {
                    this.orderPlanData = res.data;
                    uni.hideLoading();
                }
            });
        },
        // 获取历史提煤单
        getJhOrderPlanDataPage() {
            this.loading = true;
            this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
                this.historyCoalData = res.data.records;
                this.total = res.data.total;
                this.loading = false;
                if (res.data.records) {
                    this.historyCoalData = [...this.historyCoalData, ...res.data.records];
                    this.total = res.data.total;
                    this.loading = false;
                }
            });
        },
        change2(e) {
            console.log(e, '页码改变');
            this.pageCurrent = e.current;
            this.getJhOrderPlanDataPage();
        },
        // 上拉加载
        historyScrolltolower() {
            if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
            this.pageCurrent++;
            this.getJhOrderPlanDataPage();
        },
        popupDetermineClick() {
@@ -217,7 +243,12 @@
    height: 60rpx;
}
.scroll-Y {
    height: 600rpx;
    height: 300rpx;
    .more_text {
        color: #999;
        font-size: 24rpx;
        text-align: center;
    }
}
::v-deep.customer-index {
    width: 94%;
pages/customer-page/fleet-management/fleet-management.vue
@@ -2,13 +2,20 @@
    <view class="fleet-management">
        <view><u-notice-bar mode="closable" fontSize="25" :text="text1"></u-notice-bar></view>
        <view class="groupCars" v-if="groupCarsShow">
            <u-collapse @change="change" @close="close" @open="open" accordion :border="false">
            <u-collapse @change="change" @close="close" @open="open" :border="false" :value="['0']">
                <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="fleetDriverData.length == 0" width="400" height="400" textSize="18"></u-empty>
                <u-collapse-item :title="fleetDriverData[0].fleetName" name="车队" v-if="fleetDriverData.length != 0">
                <u-collapse-item :title="fleetDriverData[0].fleetName" v-if="fleetDriverData.length != 0" name="0">
                    <view class="myCarContainer">
                        <u-swipe-action>
                            <u-cell-group>
                                <u-swipe-action-item :options="options1" v-for="(item, index) in fleetDriverData" :key="index" :index="item.id" :name="item.userId" @click="deleteGroupClick">
                                <u-swipe-action-item
                                    :options="options1"
                                    v-for="(item, index) in fleetDriverData"
                                    :key="index"
                                    :index="item.id"
                                    :name="item.userId"
                                    @click="deleteGroupClick"
                                >
                                    <u-cell icon="car" iconStyle="font-size:20px;" :title="item.carNo" :value="item.name"></u-cell>
                                </u-swipe-action-item>
                            </u-cell-group>
@@ -59,7 +66,8 @@
            // 删除小组模态框
            title: '提示',
            content: '',
            deleteGroupShow: false // 删除小组模态框,
            deleteGroupShow: false, // 删除小组模态框,
            value: ['0']
        };
    },
    onShow() {
pages/driver-page/driver-index/driver-index.vue
@@ -22,10 +22,10 @@
                    <view class="right-top">
                        <view class="card-right-top-row">
                            <view>
                                <text>{{ item.deptName ||''}}</text>
                                <text>{{ item.deptName || '' }}</text>
                            </view>
                            <view>
                                <text>{{ item.coalName ||''}}</text>
                                <text>{{ item.coalName || '' }}</text>
                            </view>
                        </view>
                        <view class="card-right-top-row">
@@ -35,12 +35,12 @@
                        </view>
                        <view class="card-right-top-row">
                            <view>
                                <text>{{item.filedName||''}}</text>
                                <text>{{ item.filedName || '' }}</text>
                            </view>
                        </view>
                        <view class="card-right-top-row">
                            <view>
                                <text>{{item.orderCode||''}}</text>
                                <text>{{ item.orderCode || '' }}</text>
                            </view>
                        </view>
                    </view>
@@ -137,7 +137,8 @@
            qiangDanShow: false,
            qiangDanTitle: '抢单提示',
            qiangDanContent: '',
            qiangDanOrderPlanId: null
            qiangDanOrderPlanId: null,
            fleetId: ''
        };
    },
    onShow() {
@@ -160,9 +161,10 @@
        // 抢单按钮
        qiangDanBtn(value) {
            if (value.tmcCount == '0') {
                this.qiangDan(value.orderPlanId);
                this.qiangDan(value.orderPlanId, value.fleetId);
            } else {
                this.qiangDanOrderPlanId = value.orderPlanId;
                this.fleetId = value.fleetId;
                this.qiangDanShow = true;
                this.qiangDanContent = `已抢${value.tmcCount}单,确定抢单?`;
            }
@@ -170,20 +172,22 @@
        // 抢单模态框
        qiangDanConfirm() {
            this.qiangDanContent = '';
            this.qiangDan(this.qiangDanOrderPlanId);
            this.qiangDan(this.qiangDanOrderPlanId, this.fleetId);
        },
        qiangDanCancel() {
            this.qiangDanShow = false;
        },
        // 抢单请求
        qiangDan(id) {
            this.$reqPost('qiangDan', { orderPlanId: id }, 'params').then(res => {
        qiangDan(id, fleetId) {
            this.$reqPost('qiangDan', { orderPlanId: id, fleetId: fleetId }, 'params').then(res => {
                if (res.code == 0) {
                    this.$u.toast('抢单成功');
                    this.qiangDanShow = false;
                    this.qiangDanList();
                } else {
                    this.$u.toast(res.data ? res.data : '抢单失败');
                    this.qiangDanShow = false;
                }
                this.qiangDanList();
            });
        },
        list3CardIconClick(value) {
@@ -267,11 +271,11 @@
            }
            &Table {
                .uni-table {
                    min-width: 94%!important;
                    min-width: 94% !important;
                    .uni-table-tr {
                        padding: 0;
                        .uni-table-th {
                            width:33.3%;
                            width: 33.3%;
                            line-height: 58rpx;
                            padding: vww(5) vww(10);
                            color: #111111;
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -14,7 +14,7 @@
                    <view class="right-top">
                        <view class="card-right-top-row">
                            <view>
                                <text>转发剩余:{{ item.carNumSurplusHuodai || '' }}</text>
                                <text>转发剩余:{{ item.carNumSurplusHuodai || 0 }}</text>
                            </view>
                            <view>
                                <text>{{ item.coalName || '' }}</text>
@@ -70,7 +70,7 @@
        // 转发
        forwardClick(value) {
            uni.navigateTo({
                url: `/pages/public-page/forward/forward?orderPlanId=${value.orderPlanId}&carNumSurplusHuodai=${value.carNumSurplusHuodai}`
                url: `/pages/public-page/forward/forward?orderPlanId=${value.orderPlanId}&carNumSurplusHuodai=${value.carNumSurplusHuodai}&carNum=${value.carNum}`
            });
        }
    }
pages/public-page/forward/forward.vue
@@ -1,7 +1,8 @@
<template>
    <!-- 转发 -->
    <view class="forward">
        <view><u-notice-bar :text="text" :fontSize="30" mode="link"></u-notice-bar></view>
        <view v-if="roleType == 1"><u-notice-bar :text="text" :fontSize="30" mode="link"></u-notice-bar></view>
        <view v-else-if="roleType == 2"><u-notice-bar :text="text1" :fontSize="30" mode="link"></u-notice-bar></view>
        <view class="forward-card" v-for="(val, index) in jhOrderPlanForwardList">
            <u--form labelPosition="top" :model="forwardForm" ref="form1">
                <u-form-item label="转发对象" labelWidth="20%" ref="item1" @click="forwardObjectClick(index)">
@@ -53,8 +54,12 @@
export default {
    onLoad(params) {
        // 客户
        this.cars2 = Number(params.cars2);
        this.carNumSurplus1 = Number(params.carNumSurplus1);
        // 货代
        this.carNum = Number(params.carNum);
        this.carNumSurplusHuodai = Number(params.carNumSurplusHuodai);
        if (params.carNumSurplus1 || params.carNumSurplusHuodai) {
            if (params.carNumSurplus1 != 0) {
                this.forwardSurplus = params.carNumSurplus1;
@@ -76,7 +81,6 @@
                        checkboxValue1: ''
                    };
                });
                console.log(this.jhOrderPlanForwardList, '列表');
            } else {
                this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map(v => {
                    if (!v.orderPlanId) {
@@ -122,6 +126,8 @@
            tabHuoDai: false,
            carNumSurplus1: '',
            cars2: '',
            carNum: '',
            carNumSurplusHuodai: '',
            formNum: 1
        };
    },
@@ -138,6 +144,9 @@
        },
        text() {
            return `已领取${this.cars2}张日计划单,剩余${this.carNumSurplus1}张日计划单`;
        },
        text1() {
            return `已拥有${this.carNum}张日计划单,剩余${this.carNumSurplusHuodai}张日计划单`;
        }
    },
    methods: {
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -1,6 +1,6 @@
<template>
    <view>
        <customer-index v-if="roleType == 1" ref="customerIndexRef"></customer-index>
        <customer-index v-if="roleType == 1" ref="customerIndexRef" :orderPlanDataStore="orderPlanDataStore"></customer-index>
        <freight-forwarder-index v-if="roleType == 2" ref="freightForwarderIndexRef"></freight-forwarder-index>
        <driver-index v-if="roleType == 3" ref="driverIndexRef"></driver-index>
        <tab-bar :current="0"></tab-bar>
@@ -11,19 +11,31 @@
import customerIndex from '@/pages/customer-page/customer-index/customer-index.vue';
import driverIndex from '@/pages/driver-page/driver-index/driver-index.vue';
import freightForwarderIndex from '@/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue';
import { mapState } from 'vuex';
export default {
    components: {
        customerIndex,
        driverIndex,
        freightForwarderIndex
    },
    onLoad(){
    onPullDownRefresh() {
        uni.showLoading({
            title: '加载中...'
        });
        this.$reqGet('GetOrderPlan').then(res => {
            if (res.data) {
                this.orderPlanDataStore = res.data;
                uni.hideLoading();
                uni.stopPullDownRefresh();
            }
        });
    },
    onLoad() {
        // 开启双人通话
        wx.setEnable1v1Chat({
            enable: true,
            backgroundType: 1,
            minWindowType:2,
            minWindowType: 2,
            success() {
                console.log('开启双人通话成功');
            },
@@ -37,7 +49,8 @@
    },
    data() {
        return {
            roleType: null
            roleType: null,
            orderPlanDataStore: []
        };
    },
    onShow() {