qingyiay
2023-03-28 e7b0b34176549cfec809c6b89c4cab0999e488b9
修改大部分问题
17个文件已修改
1个文件已添加
638 ■■■■■ 已修改文件
api/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/publicInterface.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/request.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/driver-index.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/userPassword.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/public-page/forward/forward.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/register/register.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uni_modules/uni-table/components/uni-td/uni-td.vue 138 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/util.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/index.js
@@ -11,6 +11,9 @@
    },
    jsonPOST: {
        "Content-type": 'application/json'
    },
    utfPOSt: {
        'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
    }
}
@@ -46,6 +49,9 @@
    } else if (urlType == 'json') {
        opt.header = typeObj['jsonPOST'];
        opt.data = params;
    } else if (urlType == 'utf8') {
        opt.header = typeObj['utfPOSt'];
        opt.data = params;
    } else {
        opt.data = params;
        opt.header = typeObj['headerPOST'];
api/publicInterface.js
@@ -5,8 +5,8 @@
import {
    BaseUrl as wrBaseUrl
} from '@/api/request.js'
// const BaseUrl = "http://192.168.0.120:9999"
const BaseUrl = "http://192.168.0.144:9999"
const BaseUrl = "http://hesuancj.cn:9999"
// const BaseUrl = "https://hesuancj.cn:9095"
// const BaseUrl = "http://10.101.33.114:9999"
// 登录
api/request.js
@@ -81,11 +81,14 @@
// 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 BaseUrl = "http://192.168.0.144:9997";
// const BaseUrl = "http://192.168.3.119:9997";
// const BaseUrl = "http://192.168.0.144:9997";
const BaseUrl = "http://hesuancj.cn:9997";
// 线上
// const BaseUrl = "https://hesuancj.cn:9095";
const webSocketUrl = "ws://192.168.3.109:9997/wrzs/ws/info"
// const webSocketUrl = "ws://10.101.33.114:9997/wrzs/ws/info"
// const webSocketUrl = "ws://hesuancj.cn:9095/wrzs/ws/info"
const webSocketUrl = "ws://hesuancj.cn:9997/wrzs/ws/info"
// 请求拦截
const fetch = (url, opt) => {
    // 查找对应地址
main.js
@@ -25,6 +25,7 @@
Vue.prototype.$reqAll = reqAll;
Vue.prototype.$reqGet = reqGet;
Vue.prototype.$reqPost = reqPost;
Vue.prototype.$store = store;
// 由于微信小程序的运行机制问题,需声明如下一行,H5和APP非必填
const app = new Vue({
    store,
pages/customer-page/customer-index/customer-index.vue
@@ -10,7 +10,7 @@
                    </view>
                    <view class="card-left__utils">
                        <u-button @tap.stop="receiveClick(item)" text="领取" type="primary" v-if="item.cars2 != item.carNum" shape="circle"></u-button>
                        <u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNum != item.carNumSurplus1"></u-button>
                        <u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle"></u-button>
                    </view>
                </template>
                <template v-slot:right-top>
@@ -60,13 +60,13 @@
                        <uni-th align="center" width="80">提煤单个数</uni-th>
                    </uni-tr>
                    <uni-tr v-for="(item, index) in historyCoalData" :key="index">
                        <uni-td align="center">{{ item.sendDate }}</uni-td>
                        <uni-td align="left">{{ item.deptName }}</uni-td>
                        <uni-td align="center">{{ item.filedName }}</uni-td>
                        <uni-td align="center">{{ item.coalName }}</uni-td>
                        <uni-td align="center">{{ item.orderCode }}</uni-td>
                        <uni-td align="center">{{ item.carNumSurplus }}</uni-td>
                        <uni-td align="center">{{ item.tmCount }}</uni-td>
                        <uni-td align="center" @row-click="faYundetail(item)">{{ item.sendDate }}</uni-td>
                        <uni-td align="left" @row-click="faYundetail(item)">{{ item.deptName }}</uni-td>
                        <uni-td align="center" @row-click="faYundetail(item)">{{ item.filedName }}</uni-td>
                        <uni-td align="center" @row-click="faYundetail(item)">{{ item.coalName }}</uni-td>
                        <uni-td align="center" @row-click="faYundetail(item)">{{ item.orderCode }}</uni-td>
                        <uni-td align="center" @row-click="faYundetail(item)">{{ item.carNumSurplus }}</uni-td>
                        <uni-td align="center" @row-click="faYundetail(item)">{{ item.tmCount }}</uni-td>
                    </uni-tr>
                </uni-table>
                <view class="more_text" v-if="showMoreData">没有数据了...</view>
@@ -99,11 +99,12 @@
        combinedTitle
    },
    watch: {
        orderPlanDataStore(v) {
            if (v.length > 0) {
                console.log(v, 'props');
        orderPlanDataStore: {
            handler(v) {
                this.orderPlanData = v;
            }
            },
            deep: true,
            immediate: true
        }
    },
    data() {
@@ -120,7 +121,7 @@
            loading: false,
            scrollTop: 0,
            // 每页数据量
            pageSize: 5,
            pageSize: 10,
            // 当前页
            pageCurrent: 1,
            // 数据总量
@@ -161,10 +162,6 @@
                    this.loading = false;
                }
            });
        },
        change2(e) {
            this.pageCurrent = e.current;
            this.getJhOrderPlanDataPage();
        },
        // 上拉加载
        historyScrolltolower() {
@@ -218,14 +215,23 @@
        },
        // 提煤单详情
        cardBodyClick(name) {
            console.log(name, 'name');
            let code = null;
            let cars2 = null;
            this.orderPlanData.forEach(item => {
                if (item.id == name) {
                    code = item.code;
                    cars2 = item.cars2;
                }
            });
            uni.navigateTo({
                url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${name}&code=${code}`
                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}`
            });
        },
        // 转发
@@ -239,11 +245,8 @@
</script>
<style lang="scss" scoped>
.uni-pagination-box {
    height: 60rpx;
}
.scroll-Y {
    height: 300rpx;
    height: 600rpx;
    .more_text {
        color: #999;
        font-size: 24rpx;
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
@@ -10,7 +10,7 @@
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">领取总量</uni-th>
                        <uni-td align="left">{{ orderPlanDetail.fleetOrHuodaiNub || 0 }}张</uni-td>
                        <uni-td align="left">{{ cars2 || 0 }}张</uni-td>
                    </uni-tr>
                    <uni-tr v-for="(item, index) in orderPlanDetail.huodaiList" :key="index">
                        <uni-th align="left">{{ item.huoDaiName }}</uni-th>
@@ -27,49 +27,25 @@
                </uni-table>
            </view>
            <combined-title title="提煤单详情"></combined-title>
            <view class="compDetails" v-for="(item, index) in orderPlanDetail.yyDailyList" :key="index">
                <uni-table border stripe emptyText="暂无更多数据">
                    <uni-tr>
                        <uni-th align="left">提煤单编号</uni-th>
                        <uni-td align="left">{{ item.code || '' }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">提煤单状态</uni-th>
                        <uni-td align="left">{{ coalStatus[item.status] }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">车牌号</uni-th>
                        <uni-td align="left">{{ item.carNo || '' }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">入场时间</uni-th>
                        <uni-td align="left">{{ item.inTime || '' }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">出场时间</uni-th>
                        <uni-td align="left">{{ item.outTime || '' }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">皮重</uni-th>
                        <uni-td align="left">{{ item.skin || 0 }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">毛重</uni-th>
                        <uni-td align="left">{{ item.hair || 0 }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">净重</uni-th>
                        <uni-td align="left">{{ item.clean || 0 }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">订单编号</uni-th>
                        <uni-td align="left">{{ orderCode || '' }}</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">订单剩余量</uni-th>
                        <uni-td align="left">{{ item.allowance || 0 }}</uni-td>
                    </uni-tr>
                </uni-table>
            <view class="empty-pointer" v-if="!yyDailyList">暂无更多数据</view>
            <view class="compDetails card" v-for="(item, index) in yyDailyList" :key="index">
                <view class="coal-status">
                    <view class="label-title">提煤单状态</view>
                    <view class="label-value">{{ coalStatus[item.status] }}</view>
                </view>
                <view class="coal-clean">
                    <view class="label-title">净重</view>
                    <view class="label-value">{{ item.clean || 0 }}</view>
                </view>
                <view class="coal-carNo">
                    <view class="label-title">车牌号</view>
                    <view class="label-value">{{ item.carNo || '' }}</view>
                </view>
                <view class="coal-allowance">
                    <view class="label-title">余量</view>
                    <view class="label-value">{{ item.allowance || 0 }}</view>
                </view>
                <view class="more-button"><u-button type="success" text="更多" @click="showMore(index)"></u-button></view>
            </view>
        </view>
    </view>
@@ -82,24 +58,31 @@
        combinedTitle
    },
    onLoad(value) {
        console.log('页面加载', value);
        if (value.orderPlanId && value.code) {
            this.orderPlanId = value.orderPlanId;
            this.orderCode = value.code;
        }
        this.orderPlanId = value.orderPlanId;
        this.orderCode = value.code;
        this.cars2 = value.cars2;
        console.log(value, '发运计划参数');
    },
    data() {
        return {
            orderPlanId: null,
            orderCode: null,
            orderPlanDetail: {},
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓']
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'],
            yyDailyList: [],
            // 领取数量
            cars2: ''
        };
    },
    onShow() {
        this.init();
    },
    methods: {
        showMore(index) {
            uni.navigateTo({
                url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore?orderPlanId=${this.orderPlanId}&index=${index}`
            });
        },
        init() {
            this.GetOrderPlanDetail();
        },
@@ -111,6 +94,7 @@
            this.$reqGet('xiangqingList', { orderPlanId: this.orderPlanId }).then(res => {
                if (res.code == 0) {
                    this.orderPlanDetail = res.data;
                    this.yyDailyList = res.data.yyDailyList;
                    uni.hideLoading();
                }
            });
@@ -120,9 +104,16 @@
</script>
<style lang="scss" scoped>
.empty-pointer {
    position: absolute;
    top: 50%;
    left: 38%;
    color: #909399;
}
::v-deep.fayunPlan {
    width: 100%;
    margin: 0 auto;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    .fayunPlanBody {
@@ -143,6 +134,41 @@
                background-color: #f5f5f5;
            }
        }
        .card {
            width: 94%;
            height: vww(150);
            margin: vww(24) auto 0 auto;
            background-color: #fff;
            border-radius: 4px;
            box-shadow: 0 2px 12px 0 #ebeef5;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            .coal-status,
            .coal-clean,
            .coal-allowance,
            .coal-carNo {
                width: 50%;
                margin-top: vww(30);
                height: vww(50);
                text-align: center;
                .label-title {
                    color: #909399;
                }
                .label-value {
                    margin-top: vww(10);
                    color: #606266;
                }
            }
            .more-button {
                width: vww(60);
                position: absolute;
                top: vww(100);
                display: flex;
                justify-content: center;
            }
        }
        // 表格样式
        .uni-table {
            .uni-table-tr {
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
New file
@@ -0,0 +1,115 @@
<template>
    <view>
        <combined-title title="提煤单详情"></combined-title>
        <view class="compDetails" v-for="(item, index) in yyDailyList" :key="index">
            <uni-table border stripe emptyText="暂无更多数据">
                <uni-tr>
                    <uni-th align="left">提煤单编号</uni-th>
                    <uni-td align="left">{{ item.code || '' }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">提煤单状态</uni-th>
                    <uni-td align="left">{{ coalStatus[item.status] }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">车牌号</uni-th>
                    <uni-td align="left">{{ item.carNo || '' }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">入场时间</uni-th>
                    <uni-td align="left">{{ item.inTime || '' }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">出场时间</uni-th>
                    <uni-td align="left">{{ item.outTime || '' }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">皮重</uni-th>
                    <uni-td align="left">{{ item.skin || 0 }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">毛重</uni-th>
                    <uni-td align="left">{{ item.hair || 0 }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">净重</uni-th>
                    <uni-td align="left">{{ item.clean || 0 }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">订单编号</uni-th>
                    <uni-td align="left">{{ item.orderCode || '' }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="left">订单剩余量</uni-th>
                    <uni-td align="left">{{ item.allowance || 0 }}</uni-td>
                </uni-tr>
            </uni-table>
        </view>
    </view>
</template>
<script>
import combinedTitle from '@/components/combined-title/combined-title.vue';
export default {
    components: {
        combinedTitle
    },
    onLoad(params) {
        this.orderPlanId = params.orderPlanId;
        this.index = params.index;
    },
    onShow() {
        this.GetOrderPlanDetail();
    },
    data() {
        return {
            orderPlanId: '',
            yyDailyList: [],
            orderPlanDetail: {},
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'],
            index: ''
        };
    },
    methods: {
        GetOrderPlanDetail() {
            uni.showLoading({
                title: '加载中...'
            });
            this.$reqGet('xiangqingList', { orderPlanId: this.orderPlanId }).then(res => {
                if (res.code == 0) {
                    this.orderPlanDetail = res.data;
                    this.yyDailyList = res.data.yyDailyList.filter((v, i) => i == this.index);
                    uni.hideLoading();
                }
            });
        }
    }
};
</script>
<style scoped lang="scss">
.uni-table {
    .uni-table-tr {
        padding: 0;
        border: vww(1) solid #c6c6c6;
        .uni-table-th {
            font-size: vww(14);
            height: vww(30);
            line-height: vww(30);
            padding: vww(5) vww(10);
            color: #111111;
            font-weight: 500;
            background: #e2e2e2;
        }
        .uni-table-td {
            font-size: vww(14);
            font-weight: 400;
            height: vww(30);
            line-height: vww(30);
            padding: vww(5) vww(10);
            color: #111111;
        }
    }
}
</style>
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -52,7 +52,7 @@
            yyId: null,
            dayRZ: [],
            coalDetailsData: {}, // 提煤单详情
            currentPageCoalStatus:0,// 当前页面提煤单状态
            currentPageCoalStatus: 0, // 当前页面提煤单状态
            // 获取所在磅房参数
            getWeightHouseObj: {
                deptId: '',
@@ -77,8 +77,7 @@
                openId: null,
                openName: ''
            },
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] ,// 状态
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] // 状态
        };
    },
    onShow() {
@@ -108,6 +107,8 @@
                    if (res.data.length > 0) {
                        this.serviceInfoObj.openId = res.data[0].openId;
                        this.serviceInfoObj.openName = res.data[0].openName;
                        uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
                        uni.setStorageSync('customerName', this.serviceInfoObj.openName);
                    }
                }
            });
@@ -131,7 +132,7 @@
                    this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
                    this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
                    // 获取提煤单状态
                    this.currentPageCoalStatus = this.coalDetailsData.status
                    this.currentPageCoalStatus = this.coalDetailsData.status;
                }
            });
        },
@@ -152,7 +153,9 @@
        // 签到
        arriveClick() {
            uni.navigateTo({
                url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${this.currentPageCoalStatus}`
                url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${
                    this.currentPageCoalStatus
                }&tmId=${this.getWeightHouseObj.tmId}`
            });
        },
        // 入场申请
@@ -184,7 +187,7 @@
                    } else {
                        wx.join1v1Chat({
                            caller: { nickname: uni.getStorageSync('name'), openid: uni.getStorageSync('openid') },
                            listener: { nickname: '付延余', openid: 'oZjXk5e7G9uIvOzaTO6nFV51ALwk' }, // 这里的openid是fyy的,充当固定的客服openid
                            listener: { nickname: uni.getStorageSync('customerName'), openid: uni.getStorageSync('customeropenId') }, // 这里的openid是fyy的,充当固定的客服openid
                            backgroundType: 2,
                            roomType: 'voice',
                            success() {
@@ -215,9 +218,9 @@
                console.log(res, '获取磅房');
                if (res.code == 0) {
                    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}`
                        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}`
                    });
                } else {
                    this.$u.toast('未在磅房,请前往磅房后再试!!');
pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
@@ -21,19 +21,17 @@
import { todayDate } from '@/utils/util.js';
export default {
    onLoad(params) {
        if (params.orderPlanId && params.coalStatus) {
            this.punchTheClockObj.id = params.orderPlanId;
            this.coalStatus = params.coalStatus;
        }
        this.punchTheClockObj.tmcoa = params.tmId.toString();
        this.coalStatus = params.coalStatus;
    },
    data() {
        return {
            nowTime: '',
            coalStatus: 0,
            punchTheClockObj: {
                latitude: null,
                longitude: null,
                id: null
                tmcoa: null,
                latA: null,
                latB: null
            }
        };
    },
@@ -69,8 +67,8 @@
                type: 'wgs84',
                success(res) {
                    console.log(res, '获取位置', that);
                    that.punchTheClockObj.latitude = res.latitude;
                    that.punchTheClockObj.longitude = res.longitude;
                    that.punchTheClockObj.latB = res.latitude;
                    that.punchTheClockObj.latA = res.longitude;
                }
            });
        },
@@ -81,7 +79,8 @@
        },
        // 签到
        arrive() {
            if (this.punchTheClockObj.latitude && this.punchTheClockObj.longitude) {
            if (this.punchTheClockObj.latA && this.punchTheClockObj.latB) {
                console.log(this.punchTheClockObj);
                this.$reqPost('arrive', this.punchTheClockObj, 'params').then(res => {
                    console.log(res, '签到');
                    if (res.code == 0) {
@@ -95,7 +94,7 @@
                            );
                        });
                    } else {
                        this.$u.toast(res.data ? res.data : '签到失败');
                        this.$u.toast(res.msg ? res.msg : '签到失败');
                    }
                });
            } else {
@@ -123,7 +122,7 @@
            display: flex;
            justify-content: center;
            align-items: center;
            p{
            p {
                text-align: center;
            }
        }
pages/driver-page/driver-index/driver-index.vue
@@ -172,6 +172,7 @@
        // 抢单模态框
        qiangDanConfirm() {
            this.qiangDanContent = '';
            this.qiangDanShow = false;
            this.qiangDan(this.qiangDanOrderPlanId, this.fleetId);
        },
        qiangDanCancel() {
@@ -179,16 +180,19 @@
        },
        // 抢单请求
        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.$reqPost('qiangDan', { orderPlanId: id, fleetId: fleetId }, 'params')
                .then(res => {
                    if (res.code == 0) {
                        this.$u.toast('抢单成功');
                    } else {
                        this.$u.toast(res.data ? res.data : '抢单失败');
                    }
                })
                .then(() => {
                    setTimeout(() => {
                        this.qiangDanList();
                    }, 1000);
                });
        },
        list3CardIconClick(value) {
            uni.navigateTo({
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -29,14 +29,56 @@
                </template>
            </card>
        </view>
        <view class="history-numbers">
            <combined-title title="历史提煤单"></combined-title>
            <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>
                        <uni-th width="100" align="center">所属单位</uni-th>
                        <uni-th align="center" width="150">煤场名称</uni-th>
                        <uni-th align="center" width="100">煤种名称</uni-th>
                        <uni-th align="center" width="150">订单编号</uni-th>
                        <uni-th align="center" width="100">订单剩余量</uni-th>
                        <uni-th align="center" width="80">提煤单个数</uni-th>
                    </uni-tr>
                    <uni-tr v-for="(item, index) in historyCoalData" :key="index">
                        <uni-td align="center">{{ item.sendDate }}</uni-td>
                        <uni-td align="left">{{ item.deptName }}</uni-td>
                        <uni-td align="center">{{ item.filedName }}</uni-td>
                        <uni-td align="center">{{ item.coalName }}</uni-td>
                        <uni-td align="center">{{ item.orderCode }}</uni-td>
                        <uni-td align="center">{{ item.carNumSurplus }}</uni-td>
                        <uni-td align="center">{{ item.tmCount }}</uni-td>
                    </uni-tr>
                </uni-table>
                <view class="more_text" v-if="showMoreData">没有数据了...</view>
            </scroll-view>
        </view>
    </view>
</template>
<script>
import combinedTitle from '@/components/combined-title/combined-title.vue';
export default {
    components: {
        combinedTitle
    },
    data() {
        return {
            orderPlanData: []
            orderPlanData: [],
            historyCoalData: [],
            // 表格加载状态
            loading: false,
            scrollTop: 0,
            // 每页数据量
            pageSize: 10,
            // 当前页
            pageCurrent: 1,
            // 数据总量
            total: 0,
            // 是否显示更多数据
            showMoreData: false
        };
    },
    onShow() {
@@ -48,8 +90,25 @@
        }
    },
    methods: {
        getJhOrderPlanDataPage() {
            this.loading = true;
            this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
                if (res.data.records) {
                    this.historyCoalData = [...this.historyCoalData, ...res.data.records];
                    this.total = res.data.total;
                    this.loading = false;
                }
            });
        },
        // 上拉加载
        historyScrolltolower() {
            if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
            this.pageCurrent++;
            this.getJhOrderPlanDataPage();
        },
        init() {
            this.huoDaiList();
            this.getJhOrderPlanDataPage();
        },
        huoDaiList() {
            this.$reqGet('huoDaiList').then(res => {
@@ -78,6 +137,14 @@
</script>
<style lang="scss" scoped>
.scroll-Y {
    height: 600rpx;
    .more_text {
        color: #999;
        font-size: 24rpx;
        text-align: center;
    }
}
::v-deep.freightForwarder-index {
    width: 94%;
    margin: 0 auto;
pages/login/login.vue
@@ -61,6 +61,7 @@
            uni.login({
                success: res => {
                    if (res.code) {
                        uni.setStorageSync('code', res.code);
                        this.apiLogin(res.code);
                    } else {
                        uni.showToast({
@@ -80,20 +81,20 @@
            uni.showLoading({
                title: '加载中...'
            });
            wx.request({
                url: `https://api.weixin.qq.com/sns/jscode2session?appid=wx4a62fc1684c429a9&secret=ee90afe376cdcec2fdd947c0a4db961a&js_code=${code}&grant_type=authorization_code`,
                success(res) {
                    uni.setStorageSync('openid', res.data.openid);
                    uni.showToast({
                        title: '成功获取测试openid',
                        icon: 'none'
                    });
                }
            });
            // wx.request({
            //     url: `https://api.weixin.qq.com/sns/jscode2session?appid=wx4a62fc1684c429a9&secret=ee90afe376cdcec2fdd947c0a4db961a&js_code=${code}&grant_type=authorization_code`,
            //     success(res) {
            //         uni.setStorageSync('openid', res.data.openid);
            //         uni.showToast({
            //             title: '成功获取测试openid',
            //             icon: 'none'
            //         });
            //     }
            // });
            this.$nextTick(() => {
                apiLoginWx({ code: uni.getStorageSync('openid') }).then(res => {
                apiLoginWx({ code: code }).then(res => {
                    if (res.code != 1) {
                        this.$u.toast('恭喜您,登录成功!');
                        this.$u.toast('登录成功');
                        // 登陆成功,存储相关信息
                        setToken(res.access_token);
                        setRefreshToken(res.refresh_token);
@@ -119,7 +120,7 @@
        },
        bindWxConfirm() {
            uni.navigateTo({
                url: `/pages/login/wxLogin?code=${uni.getStorageSync('openid')}`
                url: `/pages/login/wxLogin?code=${uni.getStorageSync('code')}`
            });
            this.bindWxModelShow = false;
        },
pages/login/userPassword.vue
@@ -87,7 +87,7 @@
                            //查询用户详细信息并储存
                            this.$reqGet('getUserEntity')
                                .then(res => {
                                    this.$u.toast('恭喜您,登录成功!');
                                    this.$u.toast('登录成功');
                                    this.setUserTabbar(res.data.type);
                                    uni.setStorageSync('roleType', res.data.type);
                                    setCustomerId(res.data.customerid);
@@ -107,7 +107,7 @@
                            this.$u.toast(res.msg);
                        }
                    } else {
                        this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('openid') }, 'params').then(res => {
                        this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('code') }, 'params').then(res => {
                            uni.hideLoading();
                            if (res.code == 0) {
                                this.$u.toast('绑定成功!即将回到登录页!');
pages/public-page/forward/forward.vue
@@ -69,7 +69,7 @@
        }
        this.orderPlanId = params.orderPlanId;
        this.$reqGet('forwardList', { OrderPlanId: params.orderPlanId }).then(res => {
            if (res.data) {
            if (res.data.length !== 0) {
                this.jhOrderPlanForwardList = res.data.map(item => {
                    return {
                        id: item.id,
pages/register/register.vue
@@ -46,7 +46,9 @@
                        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>
                <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">
@@ -233,7 +235,7 @@
                            .then(res => {
                                if (res.data.code == 0) {
                                    uni.showToast({
                                        title: '注册成功,即将进入登录!',
                                        title: '注册成功,即将返回登录页',
                                        icon: 'none',
                                        duration: 1000
                                    });
@@ -241,7 +243,7 @@
                                        uni.redirectTo({ url: '/pages/login/login' });
                                    }, 1000);
                                } else {
                                    this.$u.toast(res.data.data?res.data.data:'添加失败');
                                    this.$u.toast(res.data.data ? res.data.data : '添加失败');
                                }
                            })
                            .catch(err => {
store/index.js
@@ -36,7 +36,8 @@
        // 用戶界面判斷
        userInfo: {},
        roleType: null, // 1客户,2货代,3司机
        userTabbar: [] ,// 用户所在角色底部菜单,
        userTabbar: [], // 用户所在角色底部菜单,
        orderPlanDataStore: [],
    },
    mutations: {
        setUserInfo(state, identity) {
uni_modules/uni-table/components/uni-td/uni-td.vue
@@ -1,90 +1,90 @@
<template>
    <!-- #ifdef H5 -->
    <td class="uni-table-td" :rowspan="rowspan" :colspan="colspan" :class="{'table--border':border}" :style="{width:width + 'px','text-align':align}">
    <td class="uni-table-td" @click="getRow" :rowspan="rowspan" :colspan="colspan" :class="{ 'table--border': border }" :style="{ width: width + 'px', 'text-align': align }">
        <slot></slot>
    </td>
    <!-- #endif -->
    <!-- #ifndef H5 -->
    <!-- :class="{'table--border':border}"  -->
    <view class="uni-table-td" :class="{'table--border':border}" :style="{width:width + 'px','text-align':align}">
        <slot></slot>
    </view>
    <view class="uni-table-td" @click="getRow" :class="{ 'table--border': border }" :style="{ width: width + 'px', 'text-align': align }"><slot></slot></view>
    <!-- #endif -->
</template>
<script>
    /**
     * Td 单元格
     * @description 表格中的标准单元格组件
     * @tutorial https://ext.dcloud.net.cn/plugin?id=3270
     * @property {Number}     align = [left|center|right]    单元格对齐方式
     */
    export default {
        name: 'uniTd',
        options: {
            virtualHost: true
/**
 * Td 单元格
 * @description 表格中的标准单元格组件
 * @tutorial https://ext.dcloud.net.cn/plugin?id=3270
 * @property {Number}     align = [left|center|right]    单元格对齐方式
 */
export default {
    name: 'uniTd',
    options: {
        virtualHost: true
    },
    props: {
        width: {
            type: [String, Number],
            default: ''
        },
        props: {
            width: {
                type: [String, Number],
                default: ''
            },
            align: {
                type: String,
                default: 'left'
            },
            rowspan: {
                type: [Number,String],
                default: 1
            },
            colspan: {
                    type: [Number,String],
                default: 1
        align: {
            type: String,
            default: 'left'
        },
        rowspan: {
            type: [Number, String],
            default: 1
        },
        colspan: {
            type: [Number, String],
            default: 1
        }
    },
    data() {
        return {
            border: false
        };
    },
    created() {
        this.root = this.getTable();
        this.border = this.root.border;
    },
    methods: {
        getRow() {
            this.$emit('row-click');
        },
        /**
         * 获取父元素实例
         */
        getTable() {
            let parent = this.$parent;
            let parentName = parent.$options.name;
            while (parentName !== 'uniTable') {
                parent = parent.$parent;
                if (!parent) return false;
                parentName = parent.$options.name;
            }
        },
        data() {
            return {
                border: false
            };
        },
        created() {
            this.root = this.getTable()
            this.border = this.root.border
        },
        methods: {
            /**
             * 获取父元素实例
             */
            getTable() {
                let parent = this.$parent;
                let parentName = parent.$options.name;
                while (parentName !== 'uniTable') {
                    parent = parent.$parent;
                    if (!parent) return false;
                    parentName = parent.$options.name;
                }
                return parent;
            },
            return parent;
        }
    }
};
</script>
<style lang="scss">
    $border-color:#EBEEF5;
$border-color: #ebeef5;
    .uni-table-td {
        display: table-cell;
        padding: 8px 10px;
        font-size: 14px;
        border-bottom: 1px $border-color solid;
        font-weight: 400;
        color: #606266;
        line-height: 23px;
        box-sizing: border-box;
    }
.uni-table-td {
    display: table-cell;
    padding: 8px 10px;
    font-size: 14px;
    border-bottom: 1px $border-color solid;
    font-weight: 400;
    color: #606266;
    line-height: 23px;
    box-sizing: border-box;
}
    .table--border {
        border-right: 1px $border-color solid;
    }
.table--border {
    border-right: 1px $border-color solid;
}
</style>
utils/util.js
@@ -1,4 +1,4 @@
export function todayDate(arg){
export function todayDate(arg) {
    let date = new Date()
    let year = date.getFullYear()
    let month = date.getMonth() + 1;
@@ -6,11 +6,10 @@
    let hour = date.getHours()
    let minutes = date.getMinutes()
    let seconds = date.getSeconds()
    console.log(arg,'时间');
    if(arg == 'hms'){
    if (arg == 'hms') {
        hour = hour < 10 ? '0' + hour : hour
        minutes = minutes < 10 ? '0' + minutes : minutes
        seconds = seconds < 10 ? '0' + seconds : seconds
        return hour+':'+minutes+':' + seconds
        return hour + ':' + minutes + ':' + seconds
    }
}
}