| | |
| | | // 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({ |
| | |
| | | carImg, |
| | | drivingImg |
| | | }) { |
| | | uni.showLoading({ |
| | | title: "加载中..." |
| | | }) |
| | | uni.showLoading({ title: '加载中...' }) |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: wrBaseUrl + '/wrzs/wx/bindWx', |
| | |
| | | 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 |
| | |
| | | }) { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: BaseUrl + "/admin/oauth2/token", |
| | | method: "POST", |
| | | url: BaseUrl + '/admin/oauth2/token', |
| | | method: 'POST', |
| | | data: { |
| | | username, |
| | | password, |
| | |
| | | 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: '服务器错误' |
| | |
| | | |
| | | |
| | | // 微信小程序一键登录 |
| | | 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: '服务器错误' |
| | |
| | | 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) => { |
| | | // 查找对应地址 |
| | |
| | | 张 |
| | | </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> |
| | |
| | | }, |
| | | // 获取发运计划列表 |
| | | GetOrderPlan() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }); |
| | | uni.showLoading({ title: '加载中...' }); |
| | | this.$reqGet('GetOrderPlan').then(res => { |
| | | if (res.data) { |
| | | this.orderPlanData = res.data; |
| | |
| | | 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) { |
| | |
| | | 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}` }); |
| | | } |
| | | } |
| | | }; |
| | |
| | | <style lang="scss" scoped> |
| | | .scroll-Y { |
| | | height: 600rpx; |
| | | margin-bottom: vww(50); |
| | | .more_text { |
| | | color: #999; |
| | | font-size: 24rpx; |
| | |
| | | margin: 0 auto; |
| | | // 主体 |
| | | .customer-index-body { |
| | | margin-bottom: vww(56); |
| | | margin-bottom: vww(10); |
| | | .card-left__top { |
| | | margin-top: vww(26); |
| | | text-align: center; |
| | |
| | | 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 : '预约失败'); |
| | | } |
| | |
| | | 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('未在磅房,请前往磅房后再试!!'); |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // 是否可点击放空 |
| | | isEvacuation: false, |
| | | weighData: { |
| | | //确认称重接口参数 |
| | | deptId: '', |
| | |
| | | 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 { |
| | |
| | | <!-- 待预约提煤单 --> |
| | | <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> |
| | |
| | | watch: { |
| | | indexdriverBillOfLoadingData: { |
| | | handler(v) { |
| | | console.log(v, '刷新之后的司机首页'); |
| | | this.driverBillOfLoadingData = v; |
| | | }, |
| | | deep: true, |
| | |
| | | title: '加载中...' |
| | | }); |
| | | this.$reqGet('qiangDanList').then(res => { |
| | | console.log(res, '司机首页'); |
| | | uni.hideLoading(); |
| | | this.driverBillOfLoadingData = res.data; |
| | | }); |
| | |
| | | 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 { |
| | |
| | | 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; |
| | |
| | | <style lang="scss" scoped> |
| | | .scroll-Y { |
| | | height: 600rpx; |
| | | margin-bottom: vww(50); |
| | | .more_text { |
| | | color: #999; |
| | | font-size: 24rpx; |
| | |
| | | margin: 0 auto; |
| | | // 主体 |
| | | .freightForwarder-index-body { |
| | | margin-bottom: vww(56); |
| | | margin-bottom: vww(10); |
| | | |
| | | // 卡片样式 |
| | | .card-left__top { |
| | |
| | | }, |
| | | //首页下拉刷新 |
| | | 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) { |
| | |
| | | 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() { |