Commit a7fdc1c7 by weix

运单相关功能

parent 96dc17bb
......@@ -10499,6 +10499,11 @@
"is-plain-obj": "^1.0.0"
}
},
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-list-map": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
......@@ -11877,6 +11882,14 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true
},
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
}
},
"vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
......
......@@ -21,6 +21,7 @@
"vue-clipboard2": "^0.3.1",
"vue-jsonp": "^2.0.0",
"vue-router": "^3.2.0",
"vuedraggable": "^2.24.3",
"vuex": "^3.4.0"
},
"devDependencies": {
......
const getActions = (h, value, data) => {
let result = value.filter(n => {
let { filter = () => true } = n;
return filter.call(n, data);
});
let result = value.filter(n => {
let {filter = () => true} = n;
return filter.call(n, data);
});
return result.map(a => {
if (a.isShow === undefined || a.isShow(data)) {
return h(
"span",
{
class: "el-button el-button--text",
on: { click: () => a.click(data) },
key: a.prop
},
a.label
);
}
});
};
return result.map(a => h('span', {class: 'btn', on: {click: () => a.click(data)}, key: a.prop}, a.label))
}
export default {
functional: true,
render: (h, { props: { value, data } }) => {
return h("div", { class: "" }, getActions(h, value, data));
}
};
functional: true,
render: (h, {props: {value, data}}) => {
return h('div', {class: 'el-button el-button--text'}, getActions(h, value, data))
}
}
<template functional>
<span>{{ props.value | formatDate }}</span>
<span>{{props.value | dateFilter('1')}}</span>
</template>
<template functional>
<span>{{props.value}}</span>
<span>{{props.value==0||props.value?props.value:'/'}}</span>
</template>
<template>
<router-link :to="{path,query: params}">{{ value }}</router-link>
<router-link :to="{path,query: params}">{{ value ? value : '/' }}</router-link>
</template>
<script>
export default {
......@@ -16,15 +16,15 @@ export default {
}
}
},
computed:{
computed: {
//路由path
path(){
path () {
// console.info(this.data)
const {path} = this.query(this.data)
const { path } = this.query(this.data)
return path
},
params(){
const {payload} = this.query(this.data)
params () {
const { payload } = this.query(this.data)
// console.log(payload)
return payload
}
......
<template>
<el-table :data="data" style="width: 100%;" v-bind="dataSource.attrs">
<el-table-column
type="index"
align="center"
width="50"
label="编号"
></el-table-column>
<el-table-column
<el-table :data="data"
style="width: 100%;"
v-bind="dataSource.attrs">
<el-table-column type="index" align="center" width="50" label="编号"></el-table-column>
<el-table-column
v-for="n in orderConfig.headers"
:prop="n.prop"
:label="n.name"
:key="n.prop"
v-bind="{ ...columnAttrs, ...n.attrs }"
>
<template slot-scope="{ row }">
<Cell :config="n" :data="row" v-if="!n.copy" />
<copyAndMore :config="n" :data="row" v-else />
</template>
</el-table-column>
</el-table>
v-bind="{...columnAttrs,...n.attrs}">
<template slot-scope="{row}">
<Cell :config="n" :data="row" v-if="!n.copy"/>
<copyAndMore :config="n" :data="row" v-else/>
</template>
</el-table-column>
</el-table>
</template>
<script>
import Cell from "./cell";
import Cell from './cell'
import copyAndMore from "./copyAndMore";
export default {
name: "Row.vue",
components: {
name: "Row",
components:{
Cell,
copyAndMore
},
props: {
orderConfig: {
type: Object,
type:Object,
default: {}
},
data: Array
},
data() {
data(){
return {
columnAttrs: {
align: "center",
align: 'center',
resizable: false
},
dataSource: {
on: this.getTableEvents(),
attrs: {
border: true,
stripe: true
stripe: true,
},
...this.orderConfig
}
};
...this.orderConfig,
},
}
},
created () {
console.info(this.data)
},
methods: {
getTableEvents() {
let { hasCheckbox = false } = this.orderConfig,
events = {},
_this = this;
let {hasCheckbox = false} = this.orderConfig, events = {}, _this = this;
if (hasCheckbox) {
// 绑定事件
Object.assign(events, {
"selection-change"(v) {
'selection-change'(v) {
_this.checked = v;
}
},
// 'sort-change'(column) {
// _this.$emit('sortChange', column)
// },
......@@ -74,10 +71,8 @@ export default {
// },
});
}
return events;
return events
}
}
};
}
</script>
<style scoped></style>
<template>
<div>
<el-switch
v-model="data.status"
@change="changeStatus"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</div>
</template>
<script>
export default {
name: "switchOrCustom",
props: ["data"],
methods: {
changeStatus(val) {
this.$emit('switchStatus',this.data)
}
}
};
</script>
<style lang="scss">
</style>
......@@ -7,6 +7,7 @@ import Link from './Link.vue';
import Format from './Format.vue';
import Popover from './Popover.vue';
import MoreCell from "./MoreCell";
import Switch from "./Switch";
export {
Date,
......@@ -17,5 +18,6 @@ export {
Link,
Format,
Popover,
MoreCell
MoreCell,
Switch
}
......@@ -11,6 +11,7 @@
<div>{{ data[config.copy] }}</div>
<i class="el-icon-document-copy"></i>
</div>
<div v-else></div>
</div>
</template>
......
<template>
<el-table
ref="singleTable"
:data="config.data"
style="width: 100%"
v-on="cfg.on"
v-bind="cfg.attrs"
>
:data="config.data"
style="width: 100%"
class="container-table"
v-on="cfg.on"
v-bind="cfg.attrs">
<!-- <el-table-column v-if="cfg.hasCheckbox" v-bind="selectionAttrs" type="selection" width="55" label="xx"></el-table-column>-->
<el-table-column type="expand" v-if="orderConfig">
<template slot-scope="{ row }">
<template slot-scope="{row}">
<Row :orderConfig="orderConfig" :data="row.orderInfoList"></Row>
</template>
</el-table-column>
<el-table-column type="index" align="center" width="50" label="编号"></el-table-column>
<el-table-column
type="index"
align="center"
width="50"
label="编号"
></el-table-column>
<el-table-column
v-for="n in cfg.headers"
v-if="n.disabled"
:prop="n.prop"
:label="n.name"
:key="n.prop"
v-bind="{ ...columnAttrs, ...n.attrs }"
>
<template slot-scope="{ row }">
<Cell :config="n" :data="row" v-if="!n.copy" />
<copyAndMore :config="n" :data="row" v-else />
v-for="n in cfg.headers"
v-if="n.disabled"
:prop="n.prop"
:label="n.name"
:key="n.prop"
v-bind="{...columnAttrs,...n.attrs}">
<template slot-scope="{row}">
<copyAndMore :config="n" :data="row" v-if="n.copy"/>
<SwitchOrCustom @switchStatus="switchStatus" :data="row" v-else-if="n.switch"/>
<Cell :config="n" :data="row" v-else/>
</template>
</el-table-column>
</el-table>
</template>
<script>
import Cell from "./cell";
import Row from "./Row";
import Cell from './cell'
import Row from './Row'
import SwitchOrCustom from './Switch'
import copyAndMore from "./copyAndMore";
export default {
components: {
Cell,
copyAndMore,
Row,
copyAndMore
SwitchOrCustom
},
props: {
config: {
type: Object,
type:Object,
default: {}
},
orderConfig: Object
},
watch: {
"config.headers": {
handler(newVal, oldVal) {
this.updateDataList(newVal);
handler(newVal,oldVal){
// console.log(oldVal)
// console.log(newVal)
// this.cfg.headers=newVal
// this.$forceUpdate()
this.updateDataList(newVal)
}
},
cfg: {
handler(newVal, oldVal) {
console.log(newVal);
handler(newVal,oldVal){
console.log(newVal)
},
deep: true
deep: true,
},
"config.data": {
handler(newVal) {
if (newVal.length > 0 && !!this.config.isSelect) {
// 这的判断是因为要默认选择第一条数据而加的
this.$nextTick(() => {
this.$refs.singleTable.setCurrentRow(this.config.data[0]);
});
}
},
immediate: true
}
},
data() {
return {
columnAttrs: {
align: "left",
align: 'center',
resizable: false
},
cfg: {
on: this.getTableEvents(),
attrs: {
border: true,
stripe: true
stripe: true,
},
...this.config
...this.config,
},
checked: []
};
checked: [],
}
},
methods: {
getTableEvents() {
let { hasCheckbox = false } = this.config,
events = {},
_this = this;
let {hasCheckbox = false} = this.config, events = {}, _this = this;
if (hasCheckbox) {
// 绑定事件
Object.assign(events, {
"selection-change"(v) {
'selection-change'(v) {
_this.checked = v;
},
"sort-change"(column) {
_this.$emit("sortChange", column);
'sort-change'(column) {
// if (column.order == 'descending') {
// this.selectResult.orderFlag = column.prop;
// this.selectResult.order = 'desc';
// } else if (column.order == 'ascending') {
// this.selectResult.orderFlag = column.prop;
// this.selectResult.order = 'asc';
// } else {
// this.selectResult.orderFlag = '';
// this.selectResult.order = '';
// }
// this.sortRule.order = column.order;
// this.sortRule.prop = column.prop;
// this.page = 1;
// this.getData()
_this.$emit('sortChange', column)
},
"row-dblclick"(v) {
'row-dblclick'(v) {
//双击进入订单详情
_this.$emit("orderClick", v);
_this.$emit('orderClick', v)
},
"current-change"(v) {
// 选择
_this.$emit("selectCurrentChange", v);
}
// 'cell-click'(v) {
// _this.$emit('orderClick', v)
// },
});
}
return events;
return events
},
updateDataList(newVal) {
updateDataList(newVal){
let newData = [];
newData = newData.concat(newVal);
this.cfg.headers = [];
this.cfg.headers.push(...newData);
this.cfg.data = [];
this.cfg.data.push(...this.config.data);
console.log(this.cfg);
this.cfg.headers.push(...newData)
this.cfg.data = []
this.cfg.data.push(...this.config.data)
console.log(this.cfg)
},
switchStatus(val){
this.$emit('activityStatus', val)
}
}
};
}
</script>
<style lang="scss" scoped>
//.container-table{
// ::v-deep{
// .el-table, .el-table__expanded-cell{
// background-color: rgba(0,0,0,0.1);
// }
// .el-table__expanded-cell:hover{
// background-color: rgba(0,0,0,0.1)!important;
// }
// }
//}
</style>
......@@ -5,6 +5,38 @@
const dataSource = {
'localOrgId': [],
'localTransportId': [],
'RunTypes': [
{
'id': '1',
'name': '同城用车',
'isShow': true
},
{
'id': '2',
'name': '跨城出行',
'isShow': true
},
{
'id': '3',
'name': '接送用车',
'isShow': true
},
{
'id': '4',
'name': '公务用车',
'isShow': false
},
{
'id': '5',
'name': '货运',
'isShow': true
},
{
'id': '6',
'name': '包车',
'isShow': true
}
],
'operateList': [],
'Typecities': [
{
......@@ -138,6 +170,52 @@ const dataSource = {
'name': '预约'
}
],
'waybillStatusList': [
{
id: '0',
name: '派单中'
},
{
id: '1',
name: '已派单'
},
{
id: '2',
name: '开始行程'
},
{
id: '4',
name: '乘客上车'
},
{
id: '6',
name: '结束服务'
},
{
id: '11',
name: '用户已取消'
},
{
id: '12',
name: '司机拒单'
},
{
id: '13',
name: '系统销单'
},
{
id: '14',
name: '司机已取消'
},
{
id: '15',
name: '同程已取消'
},
{
id: '16',
name: '调度已取消'
}
],
'paymentList': [
{
'id': '1',
......
......@@ -666,6 +666,63 @@ export default {
return '/'
}
},
BrandText (type) {
switch (type) {
case '61fdff1d455c4ab8a2efc564c245b905':
return '华哥出行'
case 'ea72c5a2563d3e3b16181c416ebbdf72':
return '刘备出行'
case 'dad52b5719e3202e32a6619e14d0ccec':
return '领航约车'
default :
}
},
waybillOrderStatusText (status) {
status = Number(status)
switch (status) {
case 0:
return '派单中'
case 1:
return '已派单'
case 2:
return '开始行程'
case 3:
return '已出发-行程开始'
case 4:
return '乘客上车'
case 5:
return '服务中-已到达'
case 6:
return '结束服务'
case 7:
return '派单失败'
case 11:
return '用户已取消'
case 12:
return '司机拒单'
case 13:
return '系统销单'
case 14:
return '司机已取消'
case 15:
return '同程已取消'
case 16:
return '调度已取消'
default :
}
},
carTypeListText(val) {
let type = Number(val)
switch (type) {
......
......@@ -43,6 +43,12 @@ export function organizationsdeptsList(data = {}, parentid, id) {
return get(url, data)
}
/*查询部门人员新(有分页)*/
export function organizationsdeptsListNew(data = {}, parentid, id) {
const url = process.env.VUE_APP_BASE_API2_ + '/organize/organization/' + parentid + '/depts/' + id + '/v2'
return get(url, data)
}
/*删除部门*/
export function organizationsdeptsDeleteS(data = {}, parentid, deptid) {
const url = process.env.VUE_APP_BASE_API2_ + '/organize/organization/' + parentid + '/depts?deptId=' + deptid
......@@ -92,4 +98,4 @@ export function organizationSearch(data = {}, parentid, val = '', page = 1, rows
export function organizationSearch2(data = {}, parentid, val = '', search, page = 1, rows = 999) {
const url = process.env.VUE_APP_BASE_API2_ + '/organize/organization/' + parentid + '?auditType=1&&page=' + page + '&&rows=' + rows + '&type=' + search + '&key=' + val
return get(url, data)
}
\ No newline at end of file
}
......@@ -4,6 +4,11 @@ export function getRegionManageList(data = {}) {
const url = process.env.VUE_APP_BASE_API5 + '/area/V2/condition';
return get(url, data)
}
// 根据品牌获取列表
export function getRegionManageListByPlatform(u ,data = {}) {
const url = 'https://' + u + '/brand/area/V2/condition';
return get(url, data)
}
//虚拟号配置查询列表
export function getConfigurationList(platformId,startPage,pageNumber) {
const url = process.env.VUE_APP_BASE_API5 + `/virtualNumber/select/virtualNumber/table/${platformId}/${startPage}/${pageNumber}`;
......
......@@ -183,6 +183,21 @@ export const routes = [
},
children: [
{
path: 'order-manager',
name: 'OrderManager',
component: () =>
import ('@/views/business/waybillManagement/index.vue'),
meta: { icon: 'el-icon-document', title: '运单列表' }
},
{
path: 'waybill-Detail',
name: 'waybillDetail',
component: () =>
import ('@/views/business/waybillManagement/waybillDetail.vue'),
meta: { title: '运单详情' },
hidden: true
},
{
path: 'complaint-list',
name: 'complaintList',
component: () =>
......
......@@ -139,8 +139,8 @@ export default {
let search = this.form;
let params = {
platformId: search.platformId,
transportIds: [this.transportId],
complaintLabel: search.complainCategory, // 投诉类别:1客户投诉2司机投诉
transportIds: this.form.transportIds,
complaintLabel: this.form.complainCategory, // 投诉类别:1客户投诉2司机投诉
complaintType: search.complainWay, // 投诉类型:1线上投诉2电话投诉3建议
orderSource: search.orderSourceList,
status: search.processingStatus,
......@@ -153,7 +153,7 @@ export default {
};
let loadingInstance = Loading.service({fullscreen: true});
let res = await exportComplaint(params)
let blob = new Blob([res], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"});
let blob = new Blob([res], {type: "application/vnd.openxmlformatsnh[nh-officedocument.spreadsheetml.sheet;charset=utf-8"});
let link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
loadingInstance.close();
......
<template>
<div id="demo">
<el-amap ref="maps" v-if="!!startLat" vid="amapDemo" :amap-manager="amapManager" :events="mapEvents"
class="amap-demo">
</el-amap>
</div>
</template>
<script>
import VueAMap from 'vue-amap'
let amapManager = new VueAMap.AMapManager()
export default {
name: 'maps',
props: ['startLat', 'startLng', 'endLat', 'endLng', 'polylines', 'opsList'],
data () {
return {
amapManager,
mapEvents: {}
}
},
watch: {
polylines (newValue) {
if (newValue.length > 0) {
this.reload(newValue)
}
}
},
created () {
this.initMap()
},
methods: {
initMap () {
let that = this
this.mapEvents = {
init (o) {
o.setMapStyle('amap://styles/macaron') // 自定义的高德地图的样式,我选的是马卡龙
let marker = new AMap.Marker({ // 点图标
position: [that.startLng, that.startLat]
})
o.setZoomAndCenter(16, [that.startLng, that.startLat])
marker.setMap(o)
o.plugin(['AMap.Driving'], function () {
var driving = new AMap.Driving({
map: o,
policy: 'REAL_TRAFFIC'
})
// driving.search(new AMap.LngLat(that.startLng, that.startLat), new AMap.LngLat(that.endLng, that.endLat), {}, function (status, result) {
driving.search(new AMap.LngLat(that.startLng, that.startLat), new AMap.LngLat(that.endLng, that.endLat), { waypoints: that.opsList ? that.opsList : [] }, function (status, result) {
if (status === 'complete') {
console.log('绘制成功')
} else {
console.log('绘制失败', result)
}
})
o.addControl(driving)
})
},
click: (e) => {
console.info(e)
},
mouseover: e => {
// e.target.setOptions({
// strokeColor: "#f31f2a",
// strokeWeight: 8
// });
},
mouseout: e => {
// e.target.setOptions({
// strokeColor: "#f31f2a",
// strokeWeight: 6
// });
}
}
if (this.polylines.length > 0) {
this.reload(this.polylines)
}
},
reload (path) {
let o = amapManager.getMap()
let Polyline = new AMap.Polyline({
map: o,
path: path, // 这里是轨迹的坐标拼成的数组
showDir: true,
strokeColor: '#28F', // 线颜色
// strokeOpacity: 1, //线透明度
strokeWeight: 6 // 线宽
// strokeStyle: "solid" //线样式
})
Polyline.setMap(o)
this.movingPolyline()
},
movingPolyline () {
let o = amapManager.getMap()
let passedPolyline = new AMap.Polyline({
map: o,
// path: lineArr,
strokeColor: '#AF5', // 线颜色
// strokeOpacity: 1, //线透明度
strokeWeight: 6 // 线宽
// strokeStyle: "solid" //线样式
})
let marker = new AMap.Marker({
map: o,
position: this.polylines[0],
icon: 'https://webapi.amap.com/images/car.png',
offset: new AMap.Pixel(-26, -13),
autoRotation: true,
angle: -90
})
marker.setMap(o)
marker.moveAlong(this.polylines, 2000)
marker.on('moving', function (e) {
passedPolyline.setPath(e.passedPath)
})
o.setFitView()
}
}
}
</script>
<style lang="scss" scoped>
.amap-demo {
width: 100%;
height: 100vh;
}
</style>
......@@ -251,7 +251,6 @@ export default {
},
methods: {
carDetail(row) {
debugger
this.$router.push({path: '/transports/driver-detail', query: {id: row.userId, type: row}})
},
searchByInfo() {
......@@ -310,7 +309,6 @@ export default {
if (!!res.data) {
res.data.content.forEach(item => {
if (item.status == '5' || item.status == '1') {
debugger
return item.operatingStatus = '停运'
} else return item.operatingStatus = '上线'
})
......
......@@ -210,7 +210,7 @@
<el-card
class="box-card"
style="margin: 20px 0"
v-if="!isEmptyObject(certificationInfo)"
v-if="!isEmptyObject(certificationInfo) && 1 !== 1"
>
<div
slot="header"
......@@ -598,7 +598,6 @@ export default {
autidComment: '',
driverId: this.$route.query.type.userId,
}
debugger
driverAudit(json).then((res) => {
if (res.status == 200) {
this.$message({
......
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