| | |
| | | <view class="driver-index-body"> |
| | | <!-- 待领取提煤单 --> |
| | | <view class="wait-collection" |
| | | style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain"> |
| | | style="background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain"> |
| | | </view> |
| | | <!-- 引导页 --> |
| | | <noob-tour></noob-tour> |
| | |
| | | </view> |
| | | <view class="fourth-line"> |
| | | <view class="button-img" |
| | | v-if="!(item.orderType === '内购' ||item.orderType === '转入')" |
| | | @click.stop="cancelAppoint(item)"> |
| | | 请求退单 |
| | | </view> |
| | | <view class="button-img" |
| | | @click.stop="toAppointmentClick(item)">立即预约</view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | content="是否确认退单" |
| | | @confirm="cancelAppointConfirm" |
| | | @cancel="cancelAppointCancel"></u-modal> |
| | | </view> |
| | | <!-- 场内接单弹窗 --> |
| | | <view class=""> |
| | | <u-modal :show="insideConnectShow" |
| | | title="接单选择" |
| | | showCancelButton |
| | | cancel-text="正常接单" |
| | | confirm-text="场内接单" |
| | | content="场内接单无需称皮,是否确认接单" |
| | | @confirm="insideConnectConfirm" |
| | | @cancel="insideConnectCancel"></u-modal> |
| | | </view> |
| | | <!-- 二维码弹窗 --> |
| | | <view class="qCodeModal"> |
| | | <u-modal :show="qCodeModalVisible" |
| | | :showConfirmButton="false" |
| | | :negativeTop="150" |
| | | @close="qCodeModalVisible = false" |
| | | closeOnClickOverlay |
| | | > |
| | | <uv-qrcode ref="qrcode" canvas-id="qrcode" :value="qCodeValue" size="500rpx" :loading="qCodeloading" |
| | | :options="options"></uv-qrcode> |
| | | |
| | | </u-modal> |
| | | </view> |
| | | <!-- 已预约提煤单 --> |
| | | <view class="Reserved"> |
| | |
| | | </view> |
| | | <view class="fourth-line"> |
| | | <view class="button-img" |
| | | v-if="item.status<3 && !(item.orderType === '内购' ||item.orderType === '转入')" |
| | | @click.stop="cancelAppoint(item)"> |
| | | 请求退单 |
| | | </view> |
| | | <view class="button-img" |
| | | v-if="item.qrCode == 1" |
| | | @click.stop="viewQcode(item)">查看二维码</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | import noobTour from '@/components/noobTour/noobTour.vue' |
| | | import { mapState } from 'vuex' |
| | | import { BaseUrl } from '@/api/publicInterface.js' |
| | | import uvQrcode from '@/uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.vue'; // 引入生成二维码组件 |
| | | export default { |
| | | components: { |
| | | combinedTitle, |
| | | previewImage, |
| | | noobTour |
| | | noobTour, |
| | | uvQrcode |
| | | }, |
| | | props: { |
| | | indexdriverBillOfLoadingData: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | qCodeValue:'', |
| | | qCodeloading:false, |
| | | driverBillOfLoadingData: { |
| | | list1: [], |
| | | list2: [], |
| | |
| | | // 接单模态框 |
| | | qiangDanShow: false, |
| | | qiangDanTitle: '接单提示', |
| | | qCodeModalVisible:false, |
| | | qiangDanContent: '', |
| | | qiangDanOrderPlanId: null, |
| | | fleetId: '', |
| | | xsUserId: '', |
| | | customerId: '', |
| | | isFirstLogin: true, //是否是第一次登录 |
| | | phone: "", |
| | | isFirstTime: false, //是否是登录进入首页,还是别的页面返回 false是登录 true是别的页面 |
| | | cancelAppointShow: false, //确认退单弹窗控制 |
| | | cancelAppointId: '' |
| | | cancelAppointId: '', |
| | | insideConnectShow: false, |
| | | orderPlanId: '', |
| | | fleetId: '', |
| | | customerId: '', |
| | | xsUserId: '', |
| | | filedId: '', |
| | | options: { |
| | | useDynamicSize: false, |
| | | errorCorrectLevel: 'Q', |
| | | margin: 10, |
| | | areaColor: "#fff", |
| | | // 指定二维码前景,一般可在中间放logo |
| | | foregroundImageSrc: '', |
| | | } |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | }, |
| | | // 接单按钮 |
| | | qiangDanBtn(value) { |
| | | if (value.tmcCount == '0') { |
| | | this.qiangDan(value.orderPlanId, value.fleetId, value.customerId === null ? '0' : value.customerId, |
| | | value.xsUserId === null ? '0' : value.xsUserId); |
| | | //是否可以场内接单,1 可以2不可以 |
| | | if (value.isInsideConnect === 1) { |
| | | this.insideConnectShow = true |
| | | this.orderPlanId = value.orderPlanId |
| | | this.fleetId = value.fleetId |
| | | this.customerId = !value.customerId ? '0' : value.customerId |
| | | this.xsUserId = !value.xsUserId ? '0' : value.xsUserId |
| | | this.filedId = value.filedId |
| | | } else { |
| | | this.qiangDanOrderPlanId = value.orderPlanId; |
| | | this.fleetId = value.fleetId; |
| | | this.customerId = value.customerId === null ? '0' : value.customerId; |
| | | this.xsUserId = value.xsUserId === null ? '0' : value.xsUserId; |
| | | this.qiangDanShow = true; |
| | | this.qiangDanContent = `已接${value.tmcCount}单,确定接单?`; |
| | | if (value.tmcCount == '0') { |
| | | this.qiangDan(value.orderPlanId, value.fleetId, !value.customerId ? '0' : value.customerId, |
| | | !value.xsUserId ? '0' : value.xsUserId); |
| | | } else { |
| | | this.qiangDanOrderPlanId = value.orderPlanId; |
| | | this.fleetId = value.fleetId; |
| | | this.customerId = !value.customerId ? '0' : value.customerId; |
| | | this.xsUserId = !value.xsUserId ? '0' : value.xsUserId; |
| | | this.qiangDanShow = true; |
| | | this.qiangDanContent = `已接${value.tmcCount}单,确定接单?`; |
| | | } |
| | | } |
| | | }, |
| | | // 接单模态框 |
| | |
| | | .then(res => { |
| | | uni.hideLoading() |
| | | if (res.code == 0) { |
| | | this.$u.toast('接单成功'); |
| | | this.$u.toast('接单正在处理中...'); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '接单失败'); |
| | | } |
| | |
| | | }).catch(e => { |
| | | uni.hideLoading() |
| | | }) |
| | | }, |
| | | insideConnectHandle(orderPlanId, fleetId, customerId, xsUserId, filedId) { |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | }) |
| | | this.$reqPost('insideConnect', { |
| | | orderPlanId, |
| | | fleetId, |
| | | customerId, |
| | | xsUserId, |
| | | filedId |
| | | }, 'params').then(res => { |
| | | uni.hideLoading() |
| | | if (res.code == 0) { |
| | | this.$u.toast('场内接单成功'); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '场内接单失败'); |
| | | } |
| | | }) |
| | | }, |
| | | list3CardIconClick(value) { |
| | | uni.navigateTo({ |
| | |
| | | // 请求退单 |
| | | cancelAppoint(item) { |
| | | if (item.status >= 3) { |
| | | this.$uy.toast('当前状态不可退单') |
| | | this.$u.toast('当前状态不可退单') |
| | | return |
| | | } |
| | | this.cancelAppointShow = true |
| | |
| | | cancelAppointCancel() { |
| | | this.cancelAppointShow = false |
| | | }, |
| | | insideConnectCancel() { |
| | | this.insideConnectShow = false |
| | | this.qiangDan(this.orderPlanId, this.fleetId, this.customerId, this.xsUserId) |
| | | }, |
| | | // 场内接单 |
| | | insideConnectConfirm() { |
| | | this.insideConnectShow = false |
| | | this.insideConnectHandle(this.orderPlanId, this.fleetId, this.customerId, this.xsUserId, this.filedId) |
| | | }, |
| | | // 去预约 |
| | | toAppointmentClick(value) { |
| | | // 由于自主配送单 是外购单 但是不需要填写原发为1不需要填写原发 |
| | | uni.setStorageSync('isNeedOrigin', value.orderType === '外购' && value.isSpecial === 1 ? 1 : 0) |
| | | if (value.orderType === '外购') { |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/originInfo/originInfo?orderPlanId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}&isSpecial=${value.isSpecial}` |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/originInfo/originInfo?orderPlanId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}&isSpecial=${value.isSpecial}&coalName=${value.coalName}` |
| | | }); |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}` |
| | | url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}&coalName=${value.coalName}` |
| | | }); |
| | | } |
| | | }, |
| | |
| | | uni.navigateTo({ |
| | | url: '/pages/driver-page/driver-index/SelfDelivery/SelfDelivery' |
| | | }) |
| | | }, |
| | | //查看二维码 |
| | | viewQcode(item){ |
| | | console.log('查看二维码') |
| | | |
| | | this.$reqGet('showQRCode',{code:item.code}).then(res=>{ |
| | | console.log(res,'ress') |
| | | if(res.data){ |
| | | this.qCodeModalVisible = true; |
| | | this.qCodeValue = res.data; |
| | | this.$nextTick(() => { |
| | | this.$refs.qrcode.remake({ |
| | | success: () => { |
| | | console.log('生成成功'); |
| | | }, |
| | | fail: err => { |
| | | console.log(err) |
| | | } |
| | | }); |
| | | }) |
| | | }else{ |
| | | this.$u.toast(res.msg || '生成失败') |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | } |
| | | } |
| | | }; |
| | |
| | | .button-img { |
| | | width: vww(122); |
| | | height: vww(41); |
| | | background: url('https://mx.jzeg.cn:9096/appimg/image/banner/button.png') no-repeat; |
| | | background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/button.png') no-repeat; |
| | | background-size: cover; |
| | | font-size: 28rpx; |
| | | font-weight: 300; |
| | |
| | | height: vww(28); |
| | | line-height: vww(28); |
| | | text-align: center; |
| | | background: url('https://mx.jzeg.cn:9096/appimg/image/banner/blueblock.png') no-repeat; |
| | | background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/blueblock.png') no-repeat; |
| | | background-size: contain; |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | |
| | | height: vww(28); |
| | | line-height: vww(28); |
| | | text-align: center; |
| | | background: url('https://mx.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat; |
| | | background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat; |
| | | background-size: contain; |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | |
| | | height: vww(28); |
| | | line-height: vww(28); |
| | | text-align: center; |
| | | background: url('https://mx.jzeg.cn:9096/appimg/image/banner/blueblock.png') no-repeat; |
| | | background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/blueblock.png') no-repeat; |
| | | background-size: contain; |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | |
| | | height: vww(28); |
| | | line-height: vww(28); |
| | | text-align: center; |
| | | background: url('https://mx.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat; |
| | | background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat; |
| | | background-size: contain; |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | |
| | | height: vww(28); |
| | | line-height: vww(28); |
| | | text-align: center; |
| | | background: url('https://mx.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat; |
| | | background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat; |
| | | background-size: contain; |
| | | font-size: 30rpx; |
| | | font-weight: 400; |