Commit e25ae2af by weix

添加运单运维管理、商户订单管理、调度待派订单管理模块

parent 1d313274
import {post, get} from "@/request/http";
/*
*获取订单详情
*/
export function getOrderInfoApi(u, data) {
const url = u +'/xoado/order/select';
return post(url, data)
}
/*
*删除订单
*/
export function delDispatchDataApi(id) {
const url = process.env.VUE_APP_BASE_API6 +`/orderUnIfyReceipt/delDispatchData/${id}`;
return get(url, {})
}
/*
*获取运单详情
*/
export function getWaybillInfoApi(data) {
const url = process.env.VUE_APP_BASE_API6 +'/new/waybill/obj';
return get(url, data)
}
/*
*获取商户订单
*/
export function paymentRecordApi(data) {
const url = process.env.VUE_APP_BASE_API6 +'/waybill/payment/record';
return get(url, data)
}
/*
*获取商户订单
*/
export function pushDriverApi(u, data) {
const url = u +'/xoado/order/pushDriver';
return get(url, data)
}
......@@ -280,7 +280,7 @@ export const routes = [{
name: 'transportDetail',
component: () =>
import ('@/views/transports/transportDetail.vue'),
meta: { title: '运力方管理', icon: 'el-icon-s-home' },
meta: { title: '运力方管理详情', icon: 'el-icon-s-home' },
hidden: true
},
{
......@@ -372,8 +372,27 @@ export const routes = [{
import ('@/views/operation/orderDetail.vue'),
meta: { title: '订单运维管理', icon: 'el-icon-s-home' }
},
{
path: 'to-be-sent',
name: 'toBeSent',
component: () =>
import ('@/views/maintenance/toBeSent/index.vue'),
meta: { title: '待派订单', icon: 'el-icon-s-home' }
},
{
path: 'merchant',
name: 'merchant',
component: () =>
import ('@/views/maintenance/merchant/index.vue'),
meta: { title: '商户订单管理', icon: 'el-icon-s-home' }
},
{
path: 'waybill',
name: 'waybill',
component: () =>
import ('@/views/maintenance/waybill/index.vue'),
meta: { title: '运单运维管理', icon: 'el-icon-s-home' }
},
]
}
]
......
......@@ -8,6 +8,7 @@ const getters = {
routes: state => state.permission.routes,
orderStatus: state => state.business.orderStatus,
msgIsShow: state => state.app.msgIsShow,
brandList: state => state.business.brandList.length === 0 ? state.business.brandList : JSON.parse(state.business.brandList),
nameInfo: state => {
let arr = Object.keys(state.user.userInfo);
if (arr.length > 0) {
......
......@@ -4,6 +4,7 @@
* @time: 2020/4/13 11:52 AM
*
*/
import {getplatformList} from "@/port/set-request";
const state = {
areaCodeObj: sessionStorage.getItem('areaCodeObj') || {},
......@@ -11,6 +12,7 @@ const state = {
orderStatus: sessionStorage.getItem('orderStatus') || '',
productJJInfo: sessionStorage.getItem('productJJInfo') || {},
orderDetail: sessionStorage.getItem('orderDetail') || {},
brandList: sessionStorage.getItem('brandList') || []
}
const mutations = {
SET_AREACODE(state, payload) {
......@@ -33,9 +35,48 @@ const mutations = {
state.productJJInfo = payload
sessionStorage.setItem('productJJInfo', payload)
},
SET_BRANDLIST(state, payload){
state.brandList = payload
sessionStorage.setItem('brandList', payload)
},
}
const actions = {
async getBrandList({ commit, dispatch, state, rootState }) {
console.log(rootState)
await getplatformList()
.then((res) => {
if(res.status === 200) {
/** 正式环境注释 */
// res.data.forEach(item => {
// if(item.brandName.indexOf('玖玖') !== -1) {
// item.brandUrl = 'http://192.168.0.251:8181/brand';
// }
// if(item.brandName.indexOf('江南') !== -1) {
// item.brandUrl = 'http://192.168.0.251:9191/brand';
// }
// if(item.brandName.indexOf('妥妥') !== -1) {
// item.brandUrl = 'http://192.168.0.251:9292/brand';
// }
// })
/** 测试环境注释 */
res.data.forEach(item => {
item.brandUrl = item.brandUrl+'/brand';
})
let data = res.data;
commit('SET_BRANDLIST', JSON.stringify(data))
// resove(data)
}
})
},
}
export default {
namespaced: true,
state,
mutations
mutations,
actions
}
<template>
<span
class="el-icon-document-copy"
v-clipboard:copy="msg"
v-clipboard:success="onCopy"
v-clipboard:error="onError"
></span>
</template>
<script>
import JudgeType from "@/mixins/judgeType";
export default {
name: "CopyIcon",
mixins: [JudgeType],
props: {
msg: null
}
};
</script>
<style scoped lang="scss">
.el-icon-document-copy {
display: inline-block;
margin: 0 0.5em;
cursor: pointer;
color: #000000;
font-size: 16px;
}
</style>
<template>
<div>
<el-card class="box-card">
<el-row>
<div class="title-left" style="padding-left: 10px; font-weight: 800">
商户订单管理
</div>
</el-row>
<div style="margin-top: 10px; display: inline-block">
<div style="display: flex; align-items: center">
<div style="margin-right: 10px; display: flex; align-items: center">
<span style="white-space: nowrap; margin-right: 10px">
品牌:
</span>
<el-select v-model="platformInfo" placeholder="请选择" style="width: 200px;">
<el-option
v-for="item in brandLists"
:key="item.value"
:label="item.brandName"
:value="JSON.stringify(item)"
>
</el-option>
</el-select>
</div>
<el-input v-model="orderId" placeholder="请输入内容" style="width: 300px"></el-input>
<el-button
type="primary"
style="margin: 0 10px"
size="small"
@click="searchInfo"
>查询
</el-button
>
</div>
</div>
</el-card>
<el-row style="border-bottom: 1px solid #d5d5d5;margin: 10px 0;"></el-row>
<el-card>
<el-row>
<div class="title-left" style="padding-left: 10px; font-weight: 800">
运单详情
</div>
</el-row>
</el-card>
</div>
</template>
<script>
import {paymentRecordApi} from "@/port/maintenance";
export default {
name: "index",
data() {
return {
platformList: [],
platformInfo: '',
orderId: '',
isShow: false,
data: []
}
},
computed: {
brandLists() {
let brandList = this.$store.getters.brandList;
if(brandList.length === 0) {
return new Promise(() =>{
this.$store.dispatch('business/getBrandList')
})
brandList = this.$store.getters.brandList;
}
this.platformInfo = brandList.length > 0 ? JSON.stringify(brandList[0]) : '';
return brandList;
}
},
methods: {
searchInfo() {
paymentRecordApi({orderId: this.orderId})
.then((res) => {
})
}
}
}
</script>
<style scoped lang="scss">
.clearfix {
display: flex;
align-items: center;
justify-content: space-between;
.mainColor {
font-weight: bold;
font-size: 15px;
color: #000000;
}
}
</style>
<template>
<div>
<el-card class="box-card">
<el-row>
<div class="title-left" style="padding-left: 10px; font-weight: 800">
调度待派订单
</div>
</el-row>
<div style="margin-top: 10px; display: inline-block">
<div style="display: flex; align-items: center">
<div style="margin-right: 10px; display: flex; align-items: center">
<span style="white-space: nowrap; margin-right: 10px">
品牌:
</span>
<el-select v-model="platformInfo" placeholder="请选择" style="width: 200px;">
<el-option
v-for="item in brandLists"
:key="item.value"
:label="item.brandName"
:value="JSON.stringify(item)"
>
</el-option>
</el-select>
</div>
<el-input v-model="orderId" placeholder="请输入内容" style="width: 300px"></el-input>
<el-button
type="primary"
style="margin: 0 10px"
size="small"
@click="searchInfo"
>查询
</el-button
>
</div>
</div>
</el-card>
<el-card style="margin-top: 10px;">
<el-row type="flex" justify="space-between">
<div class="title-left" style="padding-left: 10px; font-weight: 800">
订单详情
<span v-if="isShow" style="margin-left: 10px;font-size: 14px;font-weight: normal;">{{
dataSource.orderReserveType == 1 ? "实时" : "预约"
}}</span>
</div>
<el-button v-if="isShow" type="danger" style="padding: 0 20px;" @click="del">删除</el-button>
</el-row>
<el-row style="border-bottom: 1px solid #d5d5d5;margin: 10px 0;"></el-row>
<div v-if="isShow" class="containers">
<div>
<ul class="table-info">
<li>
<div>
<span>订单编号:{{ dataSource.orderId }}</span>
<CopyIcon :msg="dataSource.orderId" />
</div>
<div>
<span
>订单来源:{{ orderSourcesNew(dataSource.orderSource)
}}{{ dataSource.channelNumber }}</span
>
<CopyIcon
v-if="dataSource.channelNumber"
:msg="dataSource.channelNumber"
/>
</div>
</li>
<li>
<div>
<span v-if="dataSource.startAddress"
>上车点:{{ dataSource.startAddress }}</span
>
</div>
<div>
<span v-if="dataSource.endAddress"
>目的地:{{ dataSource.endAddress
}}</span
>
</div>
</li>
<li>
<div>
<span
>订单价格:{{
(!!dataSource.trealMoney&&dataSource.runType!=6)
? dataSource.trealMoney+'元' + (dataSource.valuationType == '3' ? ' 协定价' : ' 一口价')
: dataSource.estimateMoney+'元' + (dataSource.runType==6?' 套餐价':' 预估价')
}} </span
>
</div>
<div>
<span v-if="dataSource.passengerMobile"
>下单人:{{ dataSource.originatorName
}}{{ dataSource.originatorMobile }}</span
>
<CopyIcon :msg="dataSource.originatorMobile" />
</div>
</li>
<li>
<div v-if="dataSource.runType==6">
<span v-if="dataSource.passengerMobile">套餐类型:{{ dataSource.productInfo.priceSetting.duration+'小时'+dataSource.productInfo.priceSetting.mileage+ '公里/天' }} <span style="border-radius: 50%;background: red;color: #fff;font-size: 11px;padding: 2px;margin-left: 5px;">{{'x'+dataSource.productInfo.priceSetting.days}}</span></span>
</div>
<div>
<span v-if="dataSource.passengerMobile">乘车人:{{ dataSource.passengerName + ' ' + dataSource.passengerMobile }}</span>
<CopyIcon
v-if="dataSource.passengerMobile"
:msg="dataSource.passengerMobile"
/>
</div>
<div
v-if="
dataSource.otherInfo &&
dataSource.otherInfo.flightNumber&&dataSource.runType!=6
"
>
<span
>航班号:{{
dataSource.otherInfo ? dataSource.otherInfo.flightNumber
? dataSource.otherInfo.flightNumber
: "/" : '/'
}}</span
>
<CopyIcon
v-if="dataSource.otherInfo.flightNumber"
:msg="dataSource.otherInfo.flightNumber"
/>
</div>
<div v-else-if="dataSource.runType!=6"><span>航班号:/</span></div>
</li>
<li>
<div v-if="dataSource.waybillId">
<span>运单编号:{{ dataSource.waybillId }}</span>
<CopyIcon
:msg="dataSource.waybillId"
/>
</div>
<div v-if="dataSource.orderSource == 10 && dataSource.otherInfo != null">
<span>携程单号:{{ dataSource.otherInfo ? dataSource.otherInfo.masterOrderId : '' }}</span>
<CopyIcon
:msg="dataSource.otherInfo ? dataSource.otherInfo.masterOrderId : ''"
/>
</div>
</li>
<li>
<div>
<span v-if="dataSource.tpaymentStatus == 2 || dataSource.tpaymentStatus == 4">
预估金额:{{dataSource.estimateMoney}}
</span>
<span v-if="dataSource.tpaymentStatus == 1 || dataSource.tpaymentStatus == 3">
应付金额:{{dataSource.trealMoney}}
</span>
</div>
</li>
</ul>
</div>
</div>
</el-card>
</div>
</template>
<script>
import {getOrderInfoApi, delDispatchDataApi} from "@/port/maintenance";
import judgeType from "@/mixins/judgeType";
import CopyIcon from "@/views/components/CopyIcon";
export default {
name: "index",
mixins: [judgeType],
components: {
CopyIcon
},
data() {
return {
platformList: [],
platformInfo: '',
orderId: '',
dataSource: {},
isShow: false
}
},
computed: {
brandLists() {
let brandList = this.$store.getters.brandList;
if(brandList.length === 0) {
return new Promise(() =>{
this.$store.dispatch('business/getBrandList')
})
brandList = this.$store.getters.brandList;
}
this.platformInfo = brandList.length > 0 ? JSON.stringify(brandList[0]) : '';
return brandList;
}
},
methods: {
searchInfo() {
getOrderInfoApi(JSON.parse(this.platformInfo).brandUrl, [this.orderId])
.then((res) => {
if(res.status === 200) {
this.dataSource = res.data.content[0];
this.isShow = true;
}else {
this.$message.error(res.msg)
}
})
},
del(){
this.$confirm('删除调度中心待派订单,删除后不可恢复,确定删除?', "删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
delDispatchDataApi(this.dataSource.orderId)
.then((res) => {
if(res.status === 200) {
this.$message.success('删除成功');
this.isShow = false;
}else {
this.$message.error(res.msg);
}
})
})
}
}
}
</script>
<style scoped lang="scss">
.clearfix {
display: flex;
align-items: center;
justify-content: space-between;
.mainColor {
font-weight: bold;
font-size: 15px;
color: #000000;
}
}
.table-info {
background: #fff;
margin: 0;
padding: 0;
h5 {
font-weight: bold;
font-size: 14px;
margin: 10px 0;
text-align: left;
}
li {
display: flex;
align-items: center;
margin-bottom: 10px;
div:nth-child(1) {
width: 60%;
text-align: left;
font-size: 14px;
cursor: pointer;
}
}
}
</style>
<template>
<div>
<el-card class="box-card">
<el-row>
<div class="title-left" style="padding-left: 10px; font-weight: 800">
调度待派订单
</div>
</el-row>
<div style="margin-top: 10px; display: inline-block">
<div style="display: flex; align-items: center">
<div style="margin-right: 10px; display: flex; align-items: center">
<span style="white-space: nowrap; margin-right: 10px">
品牌:
</span>
<el-select v-model="platformInfo" placeholder="请选择" style="width: 200px;">
<el-option
v-for="item in brandLists"
:key="item.value"
:label="item.brandName"
:value="JSON.stringify(item)"
>
</el-option>
</el-select>
</div>
<el-input v-model="orderId" placeholder="请输入内容" style="width: 300px"></el-input>
<el-button
type="primary"
style="margin: 0 10px"
size="small"
@click="searchInfo"
>查询
</el-button
>
</div>
</div>
</el-card>
<el-card style="margin-top: 10px;">
<el-row type="flex" justify="space-between">
<div class="title-left" style="padding-left: 10px; font-weight: 800">
订单详情
</div>
<el-row v-if="isShow">
<el-button v-if="dataSource.waybillStatus == '1'" type="primary" style="padding: 5px 20px;" @click="synchronization">同步司机信息</el-button>
<el-button v-if="dataSource.waybillStatus == '1' || dataSource.waybillStatus == '4'" type="warning" style="padding: 5px 20px;" @click="force">强制完单</el-button>
</el-row>
</el-row>
<el-row style="border-bottom: 1px solid #d5d5d5;margin: 10px 0;"></el-row>
<el-row v-if="isShow">
<ul class="table-info">
<li>
<div
class="overText"
v-clipboard:copy="dataSource.waybillId"
v-clipboard:success="onCopy"
v-clipboard:error="onError"
>
<div>运单编号:{{ dataSource.waybillId }}</div>
<CopyIcon :msg="dataSource.waybillId"/>
</div>
<div
class="overText"
v-clipboard:copy="dataSource.waybillIdShort"
v-clipboard:success="onCopy"
v-clipboard:error="onError"
>
<div>运单短号:{{ dataSource.waybillIdShort }}</div>
<CopyIcon :msg="dataSource.waybillIdShort"/>
</div>
<div class="overText"></div>
</li>
</ul>
<template
v-if="
(dataSource.runType == 1 ||
dataSource.runType == 3 ||
dataSource.runType == 6) &&
dataSource.orderInfoList
"
>
<ul
class="table-info"
v-for="(item, index) in dataSource.orderInfoList"
:key="index"
>
<li>
<div class="overText">
<div>
订单编号:
<div class="order-number">{{ item.orderId }}</div>
</div>
<CopyIcon :msg="item.orderId"/>
</div>
<div>
<span>下单时间:{{ item.createTime | formatDate }}</span>
</div>
<div>
<span
>用车时间:{{ dataSource.appointmentTime | formatDate }}</span
>
</div>
</li>
<li>
<div>
<!-- <span v-if="dataSource.valuationType == '2'">{{'一口价:' + item.detail.tRealMoney}}</span>-->
<!-- <span v-else-if="dataSource.valuationType == '0'">{{'预估价:' + item.detail.estimateMoney}}</span>-->
<!-- <span v-else-if="dataSource.valuationType == '4'">{{'套餐价:' + item.detail.estimateMoney}}</span>-->
<span
>{{
dataSource.valuationType == "2"
? "一口价:" +
(item.detail.tRealMoney
? item.detail.tRealMoney
: item.detail.TRealMoney)
: "预估价:" + item.detail.estimateMoney
}}</span
>
</div>
<div>
<span>上车点:{{ item.detail.startAddress }}</span>
</div>
<div>
<span>目的地:{{ item.detail.endAddress }}</span>
</div>
</li>
<li>
<div>
<span>乘车人数:{{ item.passengerNumber }}</span>
</div>
<div>
<span
>下单人:<span v-if="item.detail.originatorName">{{
item.detail.originatorName + " "
}}</span></span
>
<span v-if="item.detail.originatorMobile">
<span>{{ item.detail.originatorMobile }}</span>
<CopyIcon :msg="item.detail.originatorMobile"/>
</span>
</div>
<div>
<span
>乘车人:<span v-if="item.detail.passengerName">{{
item.detail.passengerName + " "
}}</span></span
>
<span v-if="item.detail.passengerMobile">
<span>{{ item.detail.passengerMobile }}</span>
<CopyIcon :msg="item.detail.passengerMobile"/>
</span>
</div>
</li>
<li>
<div>
<span v-if="item.detail.chooseVehicleType"
>下单车型:{{
carTypeText(JSON.parse(item.detail.chooseVehicleType).type)
}}</span
>
</div>
<div>
<span v-if="item.detail.orderReserveType"
>用车类型:{{
item.detail.orderReserveType == 1 ? "实时" : "预约"
}}</span
>
</div>
<div style="display: flex">
<span v-if="dataSource.orderSource"
>订单来源:{{ orderSourcesNew(dataSource.orderSource) }}</span
>
<div
class="overText"
style="margin-left: 10px"
v-if="item.detail.channelNumber"
>
<div>
<span class="order-number order-number-status">{{
item.detail.channelNumber
}}</span>
</div>
<CopyIcon :msg="item.detail.channelNumber"/>
</div>
</div>
</li>
<li>
<div>
<span
>预估里程/时长:{{ item.detail.estimateDistance }}公里/{{
item.detail.estimateTime
}}分钟</span
>
</div>
<div>
<span
>实际里程/时长:{{ item.detail.tRealDistance }}公里/{{
item.detail.tRealTime
}}分钟</span
>
</div>
<div class="overText" v-if="item.detail.otherInfo">
<span>
<span>航班号:</span
><span v-text="judge(item.detail.otherInfo)"></span>
</span>
<CopyIcon
v-if="Object.keys(item.detail.otherInfo).length > 0"
:msg="item.detail.otherInfo.flightNumber"
/>
</div>
<div v-else>航班号:/</div>
</li>
<li>
<div>
<span
>订单备注:{{
item.detail.orderMemo ? item.detail.orderMemo : "/"
}}</span
>
</div>
</li>
</ul>
</template>
<template v-if="dataSource.runType == 5 && dataSource.orderInfoList">
<ul
class="table-info"
v-for="(item, index) in dataSource.orderInfoList"
:key="index"
>
<li>
<div class="overText">
<div>
订单编号:
<div class="order-number">{{ item.orderId }}</div>
</div>
<CopyIcon :msg="item.orderId"/>
</div>
<div>
<span>下单时间:{{ item.createTime | formatDate }}</span>
</div>
<div>
<span
>用车时间:{{ dataSource.appointmentTime | formatDate }}</span
>
</div>
</li>
<li>
<div>
<span
>{{
dataSource.valuationType == "2"
? "一口价:" +
(item.detail.tRealMoney
? item.detail.tRealMoney
: item.detail.TRealMoney)
: "预估价:" + item.detail.estimateMoney
}}</span
>
</div>
<div>
<span>下单人:{{ item.detail.originatorName + " " }}</span>
</div>
<div>
<span>手机号:{{ item.detail.originatorMobile }}</span>
</div>
</li>
<li>
<div>
<span>发货地址:{{ item.detail.startAddress }}</span>
</div>
<div>
<span>发货人:{{ item.detail.passengerName }}</span>
</div>
<div>
<span>手机号:{{ item.detail.passengerMobile }}</span>
<CopyIcon :msg="item.detail.passengerMobile"/>
</div>
</li>
<li>
<div>
<span>收货地址:{{ item.detail.endAddress }}</span>
</div>
<div><span>收货人:/</span></div>
<div>
<span>手机号:/</span>
</div>
</li>
<li>
<div><span>货物类型:其他</span></div>
<div><span>规格:/</span></div>
<div><span></span></div>
</li>
<li>
<div>
<span
>订单备注:{{ item.orderMemo ? item.orderMemo : "/" }}</span
>
</div>
<div><span></span></div>
<div><span></span></div>
</li>
</ul>
</template>
<template v-if="dataSource.runType == 2 && dataSource.orderInfoList">
<ul
class="table-info"
v-for="(item, index) in dataSource.orderInfoList"
:key="index"
>
<h5>乘车信息-{{ index + 1 }}</h5>
<li>
<div class="overText">
<div>
订单编号:
<div class="order-number">{{ item.orderId }}</div>
</div>
<CopyIcon :msg="item.orderId"/>
</div>
<div>
<span>下单时间:{{ item.createTime | formatDate }}</span>
</div>
<div>
<span
>用车时间:{{ dataSource.appointmentTime | formatDate }}</span
>
</div>
</li>
<li>
<div>
<span
>{{
dataSource.valuationType == "2"
? "一口价:" +
(item.detail.tRealMoney
? item.detail.tRealMoney
: item.detail.TRealMoney)
: "预估价:" + item.detail.estimateMoney
}}</span
>
</div>
<div>
<span>乘车人:{{ item.detail.passengerName }}</span>
</div>
<div>
<span>乘车人手机号:{{ item.detail.passengerMobile }}</span>
</div>
</li>
<li>
<div>
<span>乘车人数:{{ item.passengerNumber }}</span>
</div>
<div>
<span>下单人:{{ item.detail.passengerName }}</span>
</div>
<div>
<span>下单人手机号:{{ item.detail.passengerMobile }}</span>
<CopyIcon :msg="item.detail.passengerMobile"/>
</div>
</li>
<li>
<div>
<span>上车点:{{ item.detail.startAddress }}</span>
</div>
<div>
<span>目的地:{{ item.detail.endAddress }}</span>
</div>
<div><span></span></div>
</li>
</ul>
</template>
<ul class="table-info">
<h5 style="margin-top: 30px">线路信息</h5>
<el-divider></el-divider>
<li>
<div>
<span
>产品类型:<span v-text="runTypeText(dataSource.runType)"></span
></span>
</div>
<div>
<span
>产品名称:<span
v-if="dataSource.productInfo"
v-text="dataSource.productInfo.productName"
></span
></span>
</div>
<div>
<span
>产品车型:
<span
v-if="
dataSource.productInfo && dataSource.productInfo.vehicleType
"
>
<span
v-for="(i, idx) in dataSource.productInfo.vehicleType"
:key="idx"
>{{ carTypeText(i) }}{{ " " }}
</span>
</span>
</span>
</div>
</li>
<li>
<div>
<span>发单品牌:{{ BrandText(dataSource.platformId) }}</span>
</div>
<div>
<span
>订单来源:<span
v-text="orderSourcesNew(dataSource.orderSource)"
></span
></span>
</div>
<div>
<span v-if="dataSource.areaName"
>所属区域:{{ dataSource.areaName }}</span
>
</div>
</li>
<h5
style="margin-top: 30px"
v-if="dataSource.status >= 1 && dataSource.status <= 6"
>
司机信息
</h5>
<el-divider></el-divider>
<li
v-if="
dataSource.waybillStatus >= 1 && dataSource.waybillStatus <= 6
"
>
<div>
<span v-if="dataSource.driverName"
>司机:{{ dataSource.driverName }}</span
>
</div>
<div>
<span v-if="dataSource.plateNumber"
>车牌号:{{ dataSource.plateNumber }}</span
>
</div>
<div>
<span v-if="dataSource.driverPhone"
>司机手机号:{{ dataSource.driverPhone }}</span
><i
v-if="dataSource.driverPhone"
class="el-icon-copy-document mainColor"
style="font-size: 14px; margin-left: 5px"
></i>
</div>
</li>
<li
v-if="
dataSource.waybillStatus >= 1 && dataSource.waybillStatus <= 6
"
>
<div>
<span v-if="dataSource.driverName"
>所属运力:{{ dataSource.transportName }}</span
>
</div>
<div>
<span v-if="dataSource.driverName"
>所属区域:{{ dataSource.areaName }}</span
>
</div>
<div>
<span v-if="dataSource.driverName"
>接单车型:<span v-text="carTypeText(dataSource.vehicleInfo.vehicleType)"></span
></span>
</div>
</li>
<li v-if="dataSource.driverName">
<div>
<span style="color: #fd6106"
>司机收益:{{ dataSource.dividePrice }}</span
>
</div>
<div></div>
<div></div>
</li>
</ul>
</el-row>
</el-card>
<el-dialog
:visible="visibleDialog"
title="同步司机信息"
width="500px"
:close-on-click-modal="false"
:close-on-press-escape="false"
@close="closeDialog"
>
<span>
此操作将会再次同步系统运单所派司机信息(最新),推送至订单,确定执行。
</span>
<el-form label-width="120px" label-position="right">
<el-form-item label="司机姓名:">
{{ dataSource.driverName }}
</el-form-item>
<el-form-item label="联系方式:">
{{ dataSource.driverPhone }}
</el-form-item>
<el-form-item label="车牌号:">
{{ dataSource.plateNumber }}
</el-form-item>
</el-form>
<div style="text-align: right;">
<el-button @click="closeDialog">取消</el-button>
<el-button type="primary" @click="pushDriver">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {getWaybillInfoApi, pushDriverApi} from "@/port/maintenance";
import judgeType from "@/mixins/judgeType";
import CopyIcon from "@/views/components/CopyIcon";
//NT_20220318231747287_99381340310
export default {
name: "index",
mixins: [judgeType],
components: {
CopyIcon
},
data() {
return {
visibleDialog: false,
platformList: [],
platformInfo: '',
orderId: '',
dataSource: {},
isShow: false
}
},
filters: {
formatDate(v) {
let d = new Date(v);
const zero = (z) => {
return z < 10 ? '0' + z : z;
}
return d.getFullYear() + '-' + zero(d.getMonth() + 1) + '-' + d.getDate() + ' ' + zero(d.getHours()) + ':' + zero(d.getMinutes()) + ':' + zero(d.getSeconds())
}
},
computed: {
brandLists() {
let brandList = this.$store.getters.brandList;
if (brandList.length === 0) {
return new Promise(() => {
this.$store.dispatch('business/getBrandList')
})
brandList = this.$store.getters.brandList;
}
this.platformInfo = brandList.length > 0 ? JSON.stringify(brandList[0]) : '';
return brandList;
}
},
methods: {
pushDriver() {
let params = {
orderId: this.orderId,
platformId: JSON.parse(this.platformInfo).platformId
}
pushDriverApi(JSON.parse(this.platformInfo).brandUrl, params)
.then((res) => {
if(res.status === 200) {
this.$message.success('推送成功');
}else {
this.$message.error(res.msg);
}
})
},
closeDialog() {
this.visibleDialog = false;
},
searchInfo() {
getWaybillInfoApi({waybillId: this.orderId})
.then((res) => {
if (res.status === 200) {
this.dataSource = res.data;
this.isShow = true;
} else {
this.$message.error(res.msg)
}
})
},
isEmptyObject(obj) {
return Object.keys(obj).length <= 0;
},
judge(info) {
if (typeof info === "string") {
return JSON.parse(info).flightNumber;
} else if (typeof info === "object") {
if (this.isEmptyObject(info)) {
return "/";
} else {
return info.flightNumber;
}
}
},
synchronization() {
this.visibleDialog = true;
},
force() {
},
}
}
</script>
<style scoped lang="scss">
.table-info {
background: #fff;
h5 {
font-weight: bold;
font-size: 14px;
margin: 10px 0;
text-align: left;
}
li {
display: flex;
align-items: center;
margin-bottom: 5px;
& > div {
flex: 1;
text-align: left;
font-size: 14px;
cursor: pointer;
}
}
}
.overText {
display: flex;
align-items: center;
font-size: 14px;
span {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
margin-right: 5px;
}
}
.order-number {
width: 75%;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
vertical-align: middle;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment