| | |
| | | import { |
| | | BaseUrl as wrBaseUrl |
| | | } from '@/api/request.js' |
| | | const BaseUrl = "http://hesuancj.cn:9999" |
| | | // const BaseUrl = "http://hesuancj.cn:9999" |
| | | // const BaseUrl = "https://hesuancj.cn:9095" |
| | | // const BaseUrl = "http://10.101.33.114:9999" |
| | | const BaseUrl = "http://192.168.3.119:9999" |
| | | |
| | | // 登录 |
| | | // function apiLogin({ |
| | |
| | | } |
| | | |
| | | // const BaseUrl = "http://192.168.0.120:9997" |
| | | // const webSocketUrl = "ws://192.168.0.120:9997/wrzs/ws/info" |
| | | const webSocketUrl = "ws://192.168.3.119:9997/wrzs/ws/info" |
| | | |
| | | // const BaseUrl = "http://192.168.3.119: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 = "http://hesuancj.cn:9997"; |
| | | // 线上 |
| | | // const BaseUrl = "https://hesuancj.cn:9095"; |
| | | |
| | | // const webSocketUrl = "ws://hesuancj.cn:9095/wrzs/ws/info" |
| | | const webSocketUrl = "ws://hesuancj.cn:9997/wrzs/ws/info" |
| | | // const webSocketUrl = "ws://hesuancj.cn:9997/wrzs/ws/info" |
| | | // 请求拦截 |
| | | const fetch = (url, opt) => { |
| | | // 查找对应地址 |
| | |
| | | "navigationBarTitleText": "我的", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }, { |
| | | "path": "pages/customer-page/fleet-management/fleet-management", |
| | | "style": { |
| | | "navigationBarTitleText": "车队", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }, |
| | | // { |
| | | // "path": "pages/customer-page/fleet-management/fleet-management", |
| | | // "style": { |
| | | // "navigationBarTitleText": "车队", |
| | | // "enablePullDownRefresh": false |
| | | // } |
| | | // }, |
| | | { |
| | | "path": "pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details", |
| | | "style": { |
| | |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/customer-page/freight-forwarder-details/freight-forwarder-details", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | // { |
| | | // "path": "pages/customer-page/freight-forwarder-details/freight-forwarder-details", |
| | | // "style": { |
| | | // "navigationBarTitleText": "", |
| | | // "enablePullDownRefresh": false |
| | | // } |
| | | |
| | | }, { |
| | | "path": "pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver", |
| | | "style": { |
| | | "navigationBarTitleText": "添加", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }, |
| | | // }, |
| | | // { |
| | | // "path": "pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver", |
| | | // "style": { |
| | | // "navigationBarTitleText": "添加", |
| | | // "enablePullDownRefresh": false |
| | | // } |
| | | // }, |
| | | // { |
| | | // "path": "pages/public-page/forward/forward", |
| | | // "style": { |
| | |
| | | "navigationBarTitleText": "发运计划详情", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }, |
| | | { |
| | | "path": "pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill", |
| | |
| | | } |
| | | ], |
| | | "subPackages": [{ |
| | | "root": "pages/register", |
| | | "pages": [{ |
| | | "path": "register", |
| | | "style": { |
| | | "navigationBarTitleText": "注册", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }, { |
| | | "root": "pages/public-page", |
| | | "pages": [{ |
| | | "path": "forward/forward", |
| | | "style": { |
| | | "navigationBarTitleText": "转发", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }, { |
| | | "root": "pages/driver-page/appointment", |
| | | "pages": [{ |
| | | "path": "appointment", |
| | | "style": { |
| | | "navigationBarTitleText": "时段", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }], |
| | | "root": "pages/register", |
| | | "pages": [{ |
| | | "path": "register", |
| | | "style": { |
| | | "navigationBarTitleText": "注册", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }, { |
| | | "root": "pages/public-page", |
| | | "pages": [{ |
| | | "path": "forward/forward", |
| | | "style": { |
| | | "navigationBarTitleText": "转发", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }, { |
| | | "root": "pages/driver-page/appointment", |
| | | "pages": [{ |
| | | "path": "appointment", |
| | | "style": { |
| | | "navigationBarTitleText": "时段", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | "root": "pages/customer-page/fleet-management", |
| | | "pages": [{ |
| | | "path": "fleet-management", |
| | | "style": { |
| | | "navigationBarTitleText": "车队", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | "root": "pages/customer-page/addTo-freightForwarder-driver", |
| | | "pages": [{ |
| | | "path": "addTo-freightForwarder-driver", |
| | | "style": { |
| | | "navigationBarTitleText": "添加", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | "root": "pages/customer-page/freight-forwarder-details", |
| | | "pages": [{ |
| | | "path": "freight-forwarder-details", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | } |
| | | ], |
| | | "preloadRule": { |
| | | "pages/login/login": { |
| | | "network": "all", |
| | |
| | | }, |
| | | "pages/tabbar-page/index-tabbar/index-tabbar": { |
| | | "network": "all", |
| | | "packages": ["pages/public-page"] |
| | | "packages": ["pages/public-page", "pages/driver-page/appointment", |
| | | "pages/customer-page/freight-forwarder-details" |
| | | ] |
| | | }, |
| | | "pages/tabbar-page/index-tabbar/index-tabbar": { |
| | | "pages/tabbar-page/myPage-tabbar/myPage-tabbar": { |
| | | "network": "all", |
| | | "packages": ["pages/driver-page/appointment"] |
| | | "packages": ["pages/customer-page/fleet-management"] |
| | | } |
| | | |
| | | // "pages/tabbar-page/index-tabbar/index-tabbar": { |
| | | // "network": "all", |
| | | // "packages": [] |
| | | // } |
| | | }, |
| | | "tabBar": { |
| | | // "color": "#999794", |
| | |
| | | export default { |
| | | props: { |
| | | indexdriverBillOfLoadingData: { |
| | | type: Array, |
| | | default: [] |
| | | type: Object, |
| | | default: {} |
| | | } |
| | | }, |
| | | watch: { |
| | | indexdriverBillOfLoadingData: { |
| | | handler(v) { |
| | | console.log(v, '刷新之后的司机首页'); |
| | | this.driverBillOfLoadingData = v; |
| | | }, |
| | | deep: true, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | driverBillOfLoadingData: [], |
| | | driverBillOfLoadingData: {}, |
| | | // 抢单模态框 |
| | | qiangDanShow: false, |
| | | qiangDanTitle: '抢单提示', |
| | |
| | | title: '加载中...' |
| | | }); |
| | | this.$reqGet('qiangDanList').then(res => { |
| | | console.log(res, '司机首页'); |
| | | uni.hideLoading(); |
| | | this.driverBillOfLoadingData = res.data; |
| | | }); |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | username: '12222222222', // 客户 |
| | | username: '', // 客户 |
| | | // username:'13333333331',//货代 |
| | | // username: '13333333332',// 司机 |
| | | password: '123456', |
| | | password: '', |
| | | remember: true, |
| | | baseUrl: '' |
| | | }; |
| | |
| | | } |
| | | this.orderPlanId = params.orderPlanId; |
| | | this.$reqGet('forwardList', { OrderPlanId: params.orderPlanId }).then(res => { |
| | | if (res.data.length !== 0) { |
| | | if (res.data.length !== 0 && this.roleType == 1) { |
| | | this.jhOrderPlanForwardList = res.data.map(item => { |
| | | return { |
| | | id: item.id, |
| | | orderPlanId: item.orderPlanId, |
| | | name: item.xsUserName === null ? item.fleetName : item.xsUserName, |
| | | carNum: item.carNum, |
| | | xsUserId: item.xsUserId === null ? 0 : item.xsUserId, |
| | | fleetId: item.fleetId === null ? 0 : item.fleetId, |
| | | checkboxValue1: '' |
| | | }; |
| | | }); |
| | | } else if (res.data.length !== 0 && this.roleType == 2) { |
| | | this.jhOrderPlanForwardList = res.data.map(item => { |
| | | return { |
| | | id: item.id, |
| | | orderPlanId: item.orderPlanId, |
| | | name: item.fleetName, |
| | | carNum: item.carNum, |
| | | xsUserId: item.xsUserId === null ? 0 : item.xsUserId, |
| | | fleetId: item.fleetId === null ? 0 : item.fleetId, |
| | |
| | | }, |
| | | // 删除一组表单 |
| | | deleteGroup(index, v) { |
| | | if (v.id) { |
| | | let tempcarNum = v.carNum; |
| | | if (v.id && this.jhOrderPlanForwardList[index].carNum !== tempcarNum) { |
| | | this.$reqPost('deleteForward', { id: v.id }, 'params').then(res => { |
| | | if (res.code === 0) { |
| | | this.jhOrderPlanForwardList.splice(index, 1); |
| | | this.$u.toast('删除成功'); |
| | | } else if (res.code === 1) { |
| | | this.$u.toast(res.msg); |
| | | } |
| | | }); |
| | | } else { |
| | | this.jhOrderPlanForwardList.splice(index, 1); |
| | | this.$u.toast('删除成功'); |
| | | } |
| | | }, |
| | | // 提交 |
| | |
| | | this.$u.toast('请输入合法数字'); |
| | | isPass = false; |
| | | return isPass; |
| | | } else if (Number(v.carNum) > Number(this.forwardSurplus)) { |
| | | this.$u.toast('超过最大订单剩余量'); |
| | | isPass = false; |
| | | return isPass; |
| | | } else { |
| | | } |
| | | // else if (Number(v.carNum) > Number(this.forwardSurplus)) { |
| | | // this.$u.toast('超过最大订单剩余量'); |
| | | // isPass = false; |
| | | // return isPass; |
| | | // } |
| | | else { |
| | | isPass = true; |
| | | return isPass; |
| | | } |
| | | }); |
| | | if (isPass) { |
| | | this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => { |
| | | console.log(res, 'zh'); |
| | | if (res.code == 0) { |
| | | this.$u.toast('提交成功'); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | }, 1000); |
| | | } else { |
| | | this.$u.toast(res.msg); |
| | | } |
| | | }); |
| | | } |
| | |
| | | } 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 = [...this.historyCoalData, ...res.data.records]; |
| | | this.indexHistoryCoalData = res.data.records; |
| | | uni.hideLoading(); |
| | | uni.stopPullDownRefresh(); |
| | | } |
| | | }); |
| | | } else { |
| | | } else if (this.roleType == 3) { |
| | | this.$reqGet('qiangDanList').then(res => { |
| | | this.indexdriverBillOfLoadingData = res.data; |
| | | uni.hideLoading(); |
| | |
| | | orderPlanDataStore: [], |
| | | indexHuoDaiOrderPlanData: [], |
| | | indexHistoryCoalData: [], |
| | | indexdriverBillOfLoadingData: [] |
| | | indexdriverBillOfLoadingData: {} |
| | | }; |
| | | }, |
| | | onShow() { |