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 = [{ ...@@ -280,7 +280,7 @@ export const routes = [{
name: 'transportDetail', name: 'transportDetail',
component: () => component: () =>
import ('@/views/transports/transportDetail.vue'), import ('@/views/transports/transportDetail.vue'),
meta: { title: '运力方管理', icon: 'el-icon-s-home' }, meta: { title: '运力方管理详情', icon: 'el-icon-s-home' },
hidden: true hidden: true
}, },
{ {
...@@ -372,8 +372,27 @@ export const routes = [{ ...@@ -372,8 +372,27 @@ export const routes = [{
import ('@/views/operation/orderDetail.vue'), import ('@/views/operation/orderDetail.vue'),
meta: { title: '订单运维管理', icon: 'el-icon-s-home' } 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 = { ...@@ -8,6 +8,7 @@ const getters = {
routes: state => state.permission.routes, routes: state => state.permission.routes,
orderStatus: state => state.business.orderStatus, orderStatus: state => state.business.orderStatus,
msgIsShow: state => state.app.msgIsShow, msgIsShow: state => state.app.msgIsShow,
brandList: state => state.business.brandList.length === 0 ? state.business.brandList : JSON.parse(state.business.brandList),
nameInfo: state => { nameInfo: state => {
let arr = Object.keys(state.user.userInfo); let arr = Object.keys(state.user.userInfo);
if (arr.length > 0) { if (arr.length > 0) {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* @time: 2020/4/13 11:52 AM * @time: 2020/4/13 11:52 AM
* *
*/ */
import {getplatformList} from "@/port/set-request";
const state = { const state = {
areaCodeObj: sessionStorage.getItem('areaCodeObj') || {}, areaCodeObj: sessionStorage.getItem('areaCodeObj') || {},
...@@ -11,6 +12,7 @@ const state = { ...@@ -11,6 +12,7 @@ const state = {
orderStatus: sessionStorage.getItem('orderStatus') || '', orderStatus: sessionStorage.getItem('orderStatus') || '',
productJJInfo: sessionStorage.getItem('productJJInfo') || {}, productJJInfo: sessionStorage.getItem('productJJInfo') || {},
orderDetail: sessionStorage.getItem('orderDetail') || {}, orderDetail: sessionStorage.getItem('orderDetail') || {},
brandList: sessionStorage.getItem('brandList') || []
} }
const mutations = { const mutations = {
SET_AREACODE(state, payload) { SET_AREACODE(state, payload) {
...@@ -33,9 +35,48 @@ const mutations = { ...@@ -33,9 +35,48 @@ const mutations = {
state.productJJInfo = payload state.productJJInfo = payload
sessionStorage.setItem('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 { export default {
namespaced: true, namespaced: true,
state, 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>
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