master
张同海 1 year ago
parent 0f5712b5e0
commit a235395504

@ -49,6 +49,7 @@
"vcolorpicker": "^0.1.8",
"viser-vue": "^2.4.6",
"vue": "^2.6.10",
"vue-baidu-map": "^0.21.22",
"vue-clipboard2": "^0.2.1",
"vue-codemirror-lite": "^1.0.4",
"vue-contextmenu": "^1.5.9",

@ -75,3 +75,36 @@ export function listAll(parameter) {
method: 'get'
})
}
/**
* 货代车辆定位(主表列表查询中使用)
*/
export function forwarderOrderTransTime(parameter) {
console.log(JSON.stringify(parameter))
return axios({
url: '/tmsaip/tmsPositioning/forwarderOrderTransTime',
method: 'post',
data: parameter
})
}
/**
* 货代车辆定位(明细
*/
export function forwarderTransTime(parameter) {
console.log(JSON.stringify(parameter))
return axios({
url: '/tmsaip/tmsPositioning/forwarderTransTime',
method: 'post',
data: parameter
})
}
/**
* 货代运输轨迹信息查询(明细起止时间为 72 小时之内轨迹根据定位时间排序
*/
export function forwarderRouterPath(parameter) {
console.log(JSON.stringify(parameter))
return axios({
url: '/tmsaip/tmsPositioning/forwarderRouterPath',
method: 'post',
data: parameter
})
}

@ -1,44 +1,33 @@
import { axios } from '@/utils/request'
// 车辆司机管理:获取列表
export function TmsTruckerCarRelationList(parameter) {
// 车队端:查询我的司机
export function TruckerDriverList(parameter) {
return axios({
url: '/tmsaip/tmsTruckerCarRelation/list',
url: '/tmsaip/tmsTruckerDriverRelation/truckerDriverList',
method: 'get',
params: parameter
})
}
// 车辆司机管理:创建
export function TmsTruckerCarRelationCreate(parameter) {
// 车队端:车队确认通过操作(当司机端发起绑定车队时使用)
export function TmsTruckerDriverRelationApproved(parameter) {
return axios({
url: '/tmsaip/tmsTruckerCarRelation/create',
url: `/tmsaip/tmsTruckerDriverRelation/approved/${parameter.id}`,
method: 'post',
data: parameter
})
}
// 车辆司机管理根据id更新
export function TmsTruckerCarRelationUpdate(parameter) {
// 车队端:车队驳回操作(当司机端发起绑定车队时使用)
export function TmsTruckerDriverRelationReject(parameter) {
return axios({
url: `/tmsaip/tmsTruckerCarRelation/update/${parameter.id}`,
url: `/tmsaip/tmsTruckerDriverRelation/reject/${parameter.id}`,
method: 'post',
data: parameter
})
}
// 车辆司机管理根据id删除
export function TmsTruckerCarRelationDelete(parameter) {
// 车队端:车队解绑;司机端:解绑车队
export function TmsTruckerDriverRelationUnbinding(parameter) {
return axios({
url: `/tmsaip/tmsTruckerCarRelation/delete/${parameter}`,
method: 'post'
})
}
/**
* 获取箱型信息
*
* @author Myshipping
*/
export function CommondbList(parameter) {
return axios({
url: '/commondb/ctn',
method: 'get',
params: parameter
url: `/tmsaip/tmsTruckerDriverRelation/unbinding/${parameter.id}`,
method: 'post',
data: parameter
})
}

@ -30,7 +30,10 @@ import 'vxe-table/lib/style.css'
import 'vue-easytable/libs/theme-default/index.css'
import VueEasytable from 'vue-easytable'
import qs from 'qs'
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
ak: 'xnXUdo9xSX574YBsVb3je1w2pUG2N5Hd'
})
Vue.use(VXETable)
Vue.use(VueContextMenu)
Vue.use(vcolorpicker)

@ -463,6 +463,29 @@
</a-row>
</a-form>
</a-spin>
<a-modal v-model="MapVisible" title="车辆定位" @ok="handleOk" width="60vw">
<div :style="{ height: '50vh' }">
<baidu-map @ready="Mapinit" :style="{ height: '100%' }" :scroll-wheel-zoom="true">
<bm-marker :position="point"></bm-marker>
<bm-driving
start="天通苑北"
end="宋家庄地铁站"
:auto-viewport="true"
policy="BMAP_DRIVING_POLICY_LEAST_DISTANCE"
:panel="false"
location="北京"
:waypoints="['西二旗']"
>
</bm-driving>
</baidu-map>
</div>
<!-- <div>地址:{{ center.adr }}</div> -->
<template slot="footer">
<a-button key="submit" type="primary" @click="FnSgj">
车辆轨迹
</a-button>
</template>
</a-modal>
</div>
<!-- </a-modal> -->
@ -479,12 +502,18 @@ import {
TmsForwarderOrderConfirm,
TmsForwarderOrderInfo,
listCarGroup,
listAll
listAll,
forwarderTransTime,
forwarderRouterPath
} from '@/api/modular/main/tmsaip/TmsForwarderOrder'
import { DjyCustomerQuerytDjyCustomerInfo } from '@/api/modular/main/SendCar'
export default {
data() {
return {
point: '',
center: { lng: 0, lat: 0, adr: '' },
zoom: 3,
MapVisible: false,
carGroupIdData: [],
listAllData: [],
YardCodeData: [],
@ -639,6 +668,40 @@ export default {
},
methods: {
...mapActions(['setTmsAddData']),
FnSgj() {
forwarderRouterPath({
bodyId: '1671454297131257858',
qryBtm: '2023-07-03 00:59:40',
qryEtm: '2023-07-05 00:59:40'
}).then(res => {
console.log(res)
})
},
handleOk() {
console.log('ok')
},
Mapinit({ BMap, map }) {
console.log(BMap, map)
this.point = new BMap.Point(this.center.lng, this.center.lat)
map.centerAndZoom(this.point, 12)
},
FnCarLocate(data) {
console.log(data)
forwarderTransTime({ bodyId: '1671454297131257858' }).then(res => {
console.log(res)
if (res.code == 200) {
this.center.lng = res.data.lon / 600000
this.center.lat = res.data.lat / 600000
// this.center.adr = res.data.adr
// setTimeout(() => {
this.MapVisible = true
// }, 1000)
} else {
this.$message.warning(res.message)
}
})
},
FnChangeYard(type, e) {
DjyCustomerQuerytDjyCustomerInfo({ queryItem: e }).then(res => {
console.log(res)

@ -264,13 +264,18 @@
:current-page="queryParam.PageNo"
:page-size="queryParam.PageSize"
:total="queryParam.totalCount"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes']"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange1"
>
</vxe-pager>
<check ref="check" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
<a-modal v-model="MapVisible" title="车辆定位" @ok="handleOk" width="60vw">
<div :style="{ height: '50vh' }">
<baidu-map :center="center" :zoom="zoom" @ready="handler" :style="{ height: '100%' }"></baidu-map>
</div>
</a-modal>
</div>
</template>
<script>
@ -281,7 +286,8 @@ import {
TmsForwarderOrderList,
TmsForwarderOrderDelete,
listCarGroup,
listAll
listAll,
forwarderOrderTransTime
} from '@/api/modular/main/tmsaip/TmsForwarderOrder'
import check from './check.vue'
import editForm from './editForm.vue'
@ -292,6 +298,8 @@ export default {
},
data() {
return {
center: { lng: 0, lat: 0 },
zoom: 3,
YardCodeData: [],
orderStatusData: [
{ code: '0', name: '已录入' },
@ -376,7 +384,8 @@ export default {
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: []
carrierCodeData: [],
MapVisible: false
}
},
created() {},
@ -385,6 +394,14 @@ export default {
},
methods: {
...mapActions(['setIssuetypeList']),
handler({ BMap, map }) {
console.log(BMap, map)
//
this.center.lng = 119.12
this.center.lat = this.lat
//
this.zoom = 15
},
FnCopy() {
let selectRecords = this.$refs.xTable1.getCheckboxRecords()
if (selectRecords.length == 1) {
@ -446,20 +463,27 @@ export default {
console.log(selectRecords)
},
FnCarLocate(data) {
if (data.containers) {
let cntNum = data.containers.split('*')[1]
if (cntNum == 1) {
if (data.carLicense) {
this.$message.warning('调用龙船车辆定位URL上传车牌号获取车辆定位和运行轨迹并展示。')
} else {
this.$message.warning('尚未获取到车牌号,请获取到车牌号后再执行查询。')
}
} else {
this.$message.warning('当前订单箱量大于1请在派车明细中按车牌号单条查询。')
console.log(data)
forwarderOrderTransTime({ id: data.id }).then(res => {
console.log(res)
if (res.code == 200) {
this.MapVisible = true
}
} else {
this.$message.warning('暂无箱型箱量。')
}
})
// if (data.containers) {
// let cntNum = data.containers.split('*')[1]
// if (cntNum == 1) {
// if (data.carLicense) {
// this.$message.warning('URL')
// } else {
// this.$message.warning('')
// }
// } else {
// this.$message.warning('1')
// }
// } else {
// this.$message.warning('')
// }
},
FnStop(data) {
switch (data.orderStatus) {

@ -1,7 +1,7 @@
<template>
<a-modal
title="新增配置"
:width="1600"
:width="600"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@ -10,7 +10,7 @@
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="4">
<a-col :span="24">
<a-form-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入车牌号"
@ -18,7 +18,7 @@
/>
</a-form-item>
</a-col>
<a-col :span="4">
<a-col :span="24">
<a-form-item label="司机" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择司机"
@ -30,7 +30,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="4">
<a-col :span="24">
<a-form-item label="车辆属性" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择车辆属性"
@ -48,7 +48,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="4">
<!-- <a-col :span="4">
<a-form-item label="百公里油耗(L)" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入百公里油耗(L)" v-decorator="['avgoil']" />
</a-form-item>
@ -282,7 +282,7 @@
<a-form-item label="行驶证反面" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入行驶证反面" v-decorator="['drivingImg2']" />
</a-form-item>
</a-col>
</a-col> -->
</a-row>
</a-form>
</a-spin>
@ -298,11 +298,11 @@ export default {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 9 }
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
sm: { span: 20 }
},
labelCol2: {
xs: { span: 24 },

@ -1,7 +1,7 @@
<template>
<a-modal
title="编辑配置"
:width="1600"
:width="600"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@ -10,7 +10,7 @@
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="4">
<a-col :span="24">
<a-form-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入车牌号"
@ -18,7 +18,7 @@
/>
</a-form-item>
</a-col>
<a-col :span="4">
<a-col :span="24">
<a-form-item label="司机" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择司机"
@ -30,7 +30,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="4">
<a-col :span="24">
<a-form-item label="车辆属性" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择车辆属性"
@ -48,7 +48,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="4">
<!-- <a-col :span="4">
<a-form-item label="百公里油耗(L)" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入百公里油耗(L)" v-decorator="['avgoil']" />
</a-form-item>
@ -282,7 +282,7 @@
<a-form-item label="行驶证反面" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入行驶证反面" v-decorator="['drivingImg2']" />
</a-form-item>
</a-col>
</a-col> -->
</a-row>
</a-form>
</a-spin>
@ -298,11 +298,11 @@ export default {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 9 }
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
sm: { span: 20 }
},
labelCol2: {
xs: { span: 24 },

@ -20,7 +20,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<!-- <a-col :md="6" :sm="24">
<a-form-item label="关键字:">
<a-input v-model="queryParam.keyword" allow-clear placeholder="请输入关键字" />
</a-form-item>
@ -33,7 +33,7 @@
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-col> -->
</a-row>
</a-col>
<a-col :md="6" :sm="24">
@ -72,6 +72,11 @@
:align="item.align"
:show-overflow="true"
>
<template #default="{ row }">
<span v-if="item.dataIndex == 'driverId'">{{ FndriverId(row[item.dataIndex]) }}</span>
<span v-else-if="item.dataIndex == 'carSource'">{{ FncarSource(row[item.dataIndex]) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="150" align="center">
<template #default="{ row }">
@ -103,6 +108,7 @@
import { TmsCarDelete } from '@/api/modular/main/tmsaip/tmsCar'
import { mapActions } from 'vuex'
import { TmsCarList } from '@/api/modular/main/tmsaip/tmsCar'
import { listAll } from '@/api/modular/main/tmsaip/TmsForwarderOrder'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
@ -139,133 +145,12 @@ export default {
},
ColumnsQuery: [],
columns: [
{
title: '百公里油耗(L)',
align: 'center',
width: '120',
dataIndex: 'avgoil'
},
{
title: '车辆品牌',
align: 'center',
width: '80',
dataIndex: 'brand'
},
{
title: '购车时间',
align: 'center',
width: '120',
dataIndex: 'buyTime'
},
{
title: '轴数',
align: 'center',
width: '80',
dataIndex: 'carCaraxle'
},
{
title: '车身颜色',
align: 'center',
width: '80',
dataIndex: 'carColor'
},
{
title: '发动机编号',
align: 'center',
width: '100',
dataIndex: 'carEngine'
},
{
title: '车队名称',
align: 'center',
width: '80',
dataIndex: 'carGroupName'
},
{
title: '车辆高度(米)',
align: 'center',
width: '100',
dataIndex: 'carHeight'
},
{
title: '车牌号',
align: 'center',
width: '100',
dataIndex: 'carLicense'
},
{
title: '车牌备注',
align: 'center',
width: '80',
dataIndex: 'carLicenseRemark'
},
{
title: '车辆长度(米)',
align: 'center',
width: '100',
dataIndex: 'carLong'
},
{
title: '车辆类型',
align: 'center',
width: '80',
dataIndex: 'carModel'
},
{
title: '车辆属性',
align: 'center',
width: '80',
dataIndex: 'carSource'
},
{
title: '车型分类',
align: 'center',
width: '80',
dataIndex: 'carType'
},
{
title: '车架号',
align: 'center',
width: '80',
dataIndex: 'carVin'
},
{
title: '车辆容积(方)',
align: 'center',
width: '100',
dataIndex: 'carVol'
},
{
title: '车辆载重(吨)',
align: 'center',
width: '100',
dataIndex: 'carWeight'
},
{
title: '车辆宽度(米)',
align: 'center',
width: '100',
dataIndex: 'carWidth'
},
{
title: '底盘号',
align: 'center',
width: '80',
dataIndex: 'chassisNum'
},
{
title: '排量单位',
align: 'center',
width: '80',
dataIndex: 'disUnit'
},
{
title: '排量',
align: 'center',
width: '80',
dataIndex: 'displacement'
},
{
title: '司机',
align: 'center',
@ -273,59 +158,183 @@ export default {
dataIndex: 'driverId'
},
{
title: '发动机型号',
align: 'center',
width: '100',
dataIndex: 'engineType'
},
{
title: '初始里程(KM)',
align: 'center',
width: '120',
dataIndex: 'kilometreStart'
},
{
title: '车牌类型',
align: 'center',
width: '80',
dataIndex: 'licenseType'
},
{
title: '当前司机',
align: 'center',
width: '80',
dataIndex: 'nowDriverId'
},
{
title: '燃油类型 ',
align: 'center',
width: '80',
dataIndex: 'oilType'
},
{
title: '车辆识别代码',
align: 'center',
width: '120',
dataIndex: 'roadtransNumber'
},
{
title: '车辆状态',
align: 'center',
width: '80',
dataIndex: 'status'
},
{
title: '副司机',
align: 'center',
width: '80',
dataIndex: 'viceDriverId'
},
{
title: '工作状态',
title: '车辆属性',
align: 'center',
width: '80',
dataIndex: 'workStatus'
dataIndex: 'carSource'
}
// {
// title: '(L)',
// align: 'center',
// width: '120',
// dataIndex: 'avgoil'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'brand'
// },
// {
// title: '',
// align: 'center',
// width: '120',
// dataIndex: 'buyTime'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'carCaraxle'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'carColor'
// },
// {
// title: '',
// align: 'center',
// width: '100',
// dataIndex: 'carEngine'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'carGroupName'
// },
// {
// title: '()',
// align: 'center',
// width: '100',
// dataIndex: 'carHeight'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'carLicenseRemark'
// },
// {
// title: '()',
// align: 'center',
// width: '100',
// dataIndex: 'carLong'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'carModel'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'carType'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'carVin'
// },
// {
// title: '()',
// align: 'center',
// width: '100',
// dataIndex: 'carVol'
// },
// {
// title: '()',
// align: 'center',
// width: '100',
// dataIndex: 'carWeight'
// },
// {
// title: '()',
// align: 'center',
// width: '100',
// dataIndex: 'carWidth'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'chassisNum'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'disUnit'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'displacement'
// },
// {
// title: '',
// align: 'center',
// width: '100',
// dataIndex: 'engineType'
// },
// {
// title: '(KM)',
// align: 'center',
// width: '120',
// dataIndex: 'kilometreStart'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'licenseType'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'nowDriverId'
// },
// {
// title: ' ',
// align: 'center',
// width: '80',
// dataIndex: 'oilType'
// },
// {
// title: '',
// align: 'center',
// width: '120',
// dataIndex: 'roadtransNumber'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'status'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'viceDriverId'
// },
// {
// title: '',
// align: 'center',
// width: '80',
// dataIndex: 'workStatus'
// }
],
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
@ -333,7 +342,8 @@ export default {
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: []
carrierCodeData: [],
listAllData: []
}
},
created() {},
@ -342,6 +352,24 @@ export default {
},
methods: {
...mapActions(['setCtnallList']),
FndriverId(data) {
let Rdata = '-'
this.listAllData.forEach(item => {
if (item.id == data) {
Rdata = item.name
}
})
return Rdata
},
FncarSource(data) {
let Rdata = '-'
this.carSourceData.forEach(item => {
if (item.code == data) {
Rdata = item.name
}
})
return Rdata
},
confirm(e) {
TmsCarDelete(e.id)
.then(res => {
@ -365,6 +393,9 @@ export default {
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
listAll().then(res => {
this.listAllData = res.data
})
this.FnGetData()
},
FnGetData() {
@ -372,7 +403,7 @@ export default {
TmsCarList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data.list
this.queryParam.totalCount = res.data.totalCount
this.queryParam.totalCount = res.data.pagination.total
} else {
this.loadData = []
this.$message.warning(res.message)

@ -255,7 +255,7 @@ export default {
tmsTenantRelationList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data.list
this.queryParam.totalCount = res.data.totalCount
this.queryParam.totalCount = res.data.pagination.total
} else {
this.loadData = []
this.$message.warning(res.message)

@ -300,7 +300,7 @@ export default {
tmsTenantRelationList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data.list
this.queryParam.totalCount = res.data.totalCount
this.queryParam.totalCount = res.data.pagination.total
} else {
this.loadData = []
this.$message.warning(res.message)

@ -6,18 +6,9 @@
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<!-- <a-col :md="6" :sm="24">
<a-form-item label="车牌号:">
<a-select placeholder="请选择车牌号" v-model="queryParam.carLicense">
<a-select-option v-for="item in carIdData" :key="item.carLicense" :value="item.carLicense">
{{ item.carLicense }}
</a-select-option>
</a-select>
</a-form-item>
</a-col> -->
<a-col :md="6" :sm="24">
<a-form-item label="车牌号">
<a-input v-model="queryParam.carLicense" allow-clear placeholder="请输入车牌号" />
<a-form-item label="司机名称:">
<a-input v-model="queryParam.driverName" allow-clear placeholder="请输入司机" />
</a-form-item>
</a-col>
<!-- <a-col :md="6" :sm="24">
@ -39,34 +30,13 @@
</a-form-item>
</a-col> -->
<a-col :md="6" :sm="24">
<a-form-item label="司机:">
<a-input v-model="queryParam.driverName" allow-clear placeholder="请输入司机" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="车险日期:">
<div class="picker-box" style="display:flex;padding-right: 2px;">
<a-date-picker
style="min-width:30px; flex: 1;"
v-model="queryParam.insureDueDateBegin"
format="YYYY-MM-DD"
suffixIcon=" "
placeholder="开始时间"
/>
<span style="margin:0 4px;">-</span>
<a-date-picker
style="min-width:30px;flex: 1;"
v-model="queryParam.insureDueDateEnd"
format="YYYY-MM-DD"
placeholder="结束时间"
suffixIcon=" "
/>
</div>
<a-form-item label="电话:">
<a-input v-model="queryParam.phone" allow-clear placeholder="请输入电话" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="车辆属性">
<a-select v-model="queryParam.carType" allow-clear placeholder="请选择车辆状态">
<a-form-item label="状态:">
<a-select v-model="queryParam.status" allow-clear placeholder="请选择状态">
<a-select-option v-for="item in statusData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -96,12 +66,23 @@
新增配置
</a-button> -->
<div class="nav-box">
<div class="nav" @click="$refs.addForm.add()"><i class="iconfont icon-jiahao2fill"></i>新建</div>
<div class="nav" @click="Fnapproved()"><i class="iconfont icon-jiahao2fill"></i>通过</div>
<div class="nav" @click="Fnreject()"><i class="iconfont icon-jiahao2fill"></i>驳回</div>
<div class="nav" @click="Fnunbinding()"><i class="iconfont icon-jiahao2fill"></i>解绑</div>
</div>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" stripe resizable round :loading="loading" height="546" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-table
:data="loadData"
ref="xTable1"
stripe
resizable
round
:loading="loading"
height="546"
empty-text="没有更多数据了!"
>
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
@ -112,22 +93,10 @@
:show-overflow="true"
>
<template #default="{ row }">
<span v-if="item.dataIndex == 'carType'">{{ FncarType(row[item.dataIndex]) }}</span>
<span v-if="item.dataIndex == 'status'">{{ FncarType(row[item.dataIndex]) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="150" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)">
<a-icon type="form" :style="{ color: '#13c2c2' }" />
</vxe-button>
<a-popconfirm title="是否确认删除?" ok-text="" cancel-text="" @confirm="confirm(row)">
<vxe-button type="text">
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
</vxe-button>
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:current-page="queryParam.currentPage"
@ -145,7 +114,12 @@
<script>
import { TmsCarlistRef } from '@/api/modular/main/tmsaip/tmsCar'
import { listAll } from '@/api/modular/main/tmsaip/tmsTruckerOrder'
import { TmsTruckerCarRelationDelete, TmsTruckerCarRelationList } from '@/api/modular/main/tmsaip/tmsTruckerCarRelation'
import {
TruckerDriverList,
TmsTruckerDriverRelationApproved,
TmsTruckerDriverRelationReject,
TmsTruckerDriverRelationUnbinding
} from '@/api/modular/main/tmsaip/tmsTruckerCarRelation'
import { mapActions } from 'vuex'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
@ -164,8 +138,10 @@ export default {
{ code: '3', name: '加盟车辆' }
],
statusData: [
{ code: '0', name: '自有车' },
{ code: '1', name: '挂靠车' }
{ code: '1', name: '已绑定' },
{ code: '2', name: '待确认' },
{ code: '3', name: '已驳回' },
{ code: '9', name: '已解绑' }
],
TypeData: [],
// /
@ -183,53 +159,22 @@ export default {
ColumnsQuery: [],
columns: [
{
title: '车牌号',
title: '司机名称',
align: 'center',
width: '100',
dataIndex: 'carLicense'
},
{
title: '司机',
title: '联系电话',
align: 'center',
width: '80',
dataIndex: 'driverName'
},
{
title: '联系方式',
title: '状态',
align: 'center',
width: '120',
dataIndex: 'tel'
},
{
title: '保险到期日期',
align: 'center',
width: '80',
dataIndex: 'insureDueDate'
},
{
title: '车辆属性',
align: 'center',
width: '120',
dataIndex: 'carType'
},
{
title: '创建人',
align: 'center',
width: '80',
dataIndex: 'createByName'
},
{
title: '创建日期',
align: 'center',
width: '80',
dataIndex: 'createTime'
},
{
title: '所属公司',
align: 'center',
width: '100',
dataIndex: 'truckerName'
}
],
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
@ -247,6 +192,51 @@ export default {
},
methods: {
...mapActions(['setCtnallList']),
Fnapproved() {
let selectRecords = this.$refs.xTable1.getCheckboxRecords()
if (selectRecords.length == 1) {
TmsTruckerDriverRelationApproved(selectRecords[0].id).then(res => {
if (res.success) {
this.$message.success('操作成功')
this.init()
} else {
this.$message.warning(res.message)
}
})
} else {
this.$message.warning('请选择一条数据!')
}
},
Fnreject() {
let selectRecords = this.$refs.xTable1.getCheckboxRecords()
if (selectRecords.length == 1) {
TmsTruckerDriverRelationReject(selectRecords[0].id).then(res => {
if (res.success) {
this.$message.success('操作成功')
this.init()
} else {
this.$message.warning(res.message)
}
})
} else {
this.$message.warning('请选择一条数据!')
}
},
Fnunbinding() {
let selectRecords = this.$refs.xTable1.getCheckboxRecords()
if (selectRecords.length == 1) {
TmsTruckerDriverRelationUnbinding(selectRecords[0].id).then(res => {
if (res.success) {
this.$message.success('操作成功')
this.init()
} else {
this.$message.warning(res.message)
}
})
} else {
this.$message.warning('请选择一条数据!')
}
},
FncarType(data) {
let Rdata = '-'
this.statusData.forEach(item => {
@ -259,18 +249,6 @@ export default {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
confirm(e) {
TmsTruckerCarRelationDelete(e.id)
.then(res => {
if (res.success) {
this.$message.success('删除成功')
this.init()
} else {
this.$message.error(`删除失败,${res.message}`)
}
})
.finally(res => {})
},
handlePageChange1({ currentPage, pageSize }) {
this.queryParam.currentPage = currentPage
this.queryParam.pageSize = pageSize
@ -292,10 +270,10 @@ export default {
},
FnGetData() {
this.loading = true
TmsTruckerCarRelationList(this.queryParam).then(res => {
TruckerDriverList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data.list
this.queryParam.totalCount = res.data.totalCount
this.queryParam.totalCount = res.data.pagination.total
} else {
this.loadData = []
this.$message.warning(res.message)

@ -347,7 +347,7 @@
:current-page="queryParam.currentPage"
:page-size="queryParam.pageSize"
:total="queryParam.totalCount"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes']"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange1"
>
</vxe-pager>

@ -11,7 +11,7 @@
</a-col>
<a-col :md="8" :sm="24">
<a-button type="primary" @click="$refs.table.refresh(true)"></a-button>
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
<a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
</a-col>
</a-row>
</a-form>
@ -23,10 +23,12 @@
:columns="columns"
:data="loadData"
:alert="true"
:rowKey="(record) => record.id"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
:rowKey="record => record.id"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<template slot="operator" v-if="hasPerm('sysTenant:add')">
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysTenant:add')">
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysTenant:add')"
>新增租户
</a-button>
</template>
<span slot="host" slot-scope="host">
@ -37,10 +39,9 @@
<span slot="action" slot-scope="text, record">
<a v-if="hasPerm('sysTenant:edit')" @click="$refs.editForm.edit(record)"></a>
<a-divider type="vertical" v-if="hasPerm('sysTenant:edit')" />
<a v-if="hasPerm('simulationTenantLogin')" @click="simulationTenantLogin(record)"></a>
<a v-if="hasPerm('simulationTenantLogin')" @click="simulationTenantLogin(record)"></a>
<a-divider type="vertical" v-if="hasPerm('simulationTenantLogin')" />
<a-dropdown
v-if="hasPerm('sysTenant:grantMenu') || hasPerm('sysTenant:delete')">
<a-dropdown v-if="hasPerm('sysTenant:grantMenu') || hasPerm('sysTenant:delete')">
<a class="ant-dropdown-link">
更多
<a-icon type="down" />
@ -65,162 +66,151 @@
</s-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
<tenant-menu-form ref="tenantMenuForm" @ok="handleOk"/>
<tenant-menu-form ref="tenantMenuForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import {
import { STable, Ellipsis, XCard } from '@/components'
import { sysTenantPage, sysTenantDelete, sysTenantResetPwd } from '@/api/modular/system/tenantManage'
import { simulationTenantLogin } from '@/api/modular/system/loginManage'
import addForm from './addForm'
import editForm from './editForm'
import tenantMenuForm from './tenantMenuForm'
import { ACCESS_TOKEN, ALL_APPS_MENU } from '@/store/mutation-types'
export default {
components: {
XCard,
STable,
Ellipsis,
XCard
} from '@/components'
import {
sysTenantPage,
sysTenantDelete,
sysTenantResetPwd
} from '@/api/modular/system/tenantManage'
import {
simulationTenantLogin
} from '@/api/modular/system/loginManage'
import addForm from './addForm'
import editForm from './editForm'
import tenantMenuForm from './tenantMenuForm'
import {
ACCESS_TOKEN,
ALL_APPS_MENU
} from '@/store/mutation-types'
export default {
components: {
XCard,
STable,
Ellipsis,
addForm,
editForm,
tenantMenuForm
},
data() {
return {
//
queryParam: {},
//
columns: [{
title: '公司名称',
dataIndex: 'name'
},
{
title: '账号(邮箱)',
dataIndex: 'email'
},
{
title: '姓名',
dataIndex: 'adminName'
},
{
title: '电话',
dataIndex: 'phone'
},
{
title: '创建时间',
dataIndex: 'createdTime'
},
{
title: '备注',
dataIndex: 'remark'
}
// {
// title: '',
// dataIndex: 'schema',
// width: 100
// },
],
// Promise
loadData: parameter => {
return sysTenantPage(Object.assign(parameter, this.queryParam)).then((res) => {
return res.data
})
addForm,
editForm,
tenantMenuForm
},
data() {
return {
//
queryParam: {},
//
columns: [
{
title: '公司名称',
dataIndex: 'name'
},
selectedRowKeys: [],
selectedRows: []
}
},
created() {
if (this.hasPerm('sysTenant:edit') || this.hasPerm('sysTenant:delete')|| this.hasPerm(
'simulationTenantLogin')) {
this.columns.push({
title: '操作',
width: '200px',
dataIndex: 'action',
scopedSlots: {
customRender: 'action'
}
{
title: '账号(邮箱)',
dataIndex: 'email'
},
{
title: '姓名',
dataIndex: 'adminName'
},
{
title: '电话',
dataIndex: 'phone'
},
{
title: '创建时间',
dataIndex: 'createdTime'
},
{
title: '备注',
dataIndex: 'remark'
}
// {
// title: '',
// dataIndex: 'schema',
// width: 100
// },
],
// Promise
loadData: parameter => {
return sysTenantPage(Object.assign(parameter, this.queryParam)).then(res => {
return res.data
})
}
},
methods: {
sysTenantDelete(record) {
sysTenantDelete(record).then((res) => {
},
selectedRowKeys: [],
selectedRows: []
}
},
created() {
if (this.hasPerm('sysTenant:edit') || this.hasPerm('sysTenant:delete') || this.hasPerm('simulationTenantLogin')) {
this.columns.push({
title: '操作',
width: '200px',
dataIndex: 'action',
scopedSlots: {
customRender: 'action'
}
})
}
},
methods: {
sysTenantDelete(record) {
sysTenantDelete(record)
.then(res => {
if (res.success) {
this.$message.success('删除成功')
this.$refs.table.refresh()
} else {
this.$message.error('删除失败:' + res.message)
}
}).catch((err) => {
this.$message.error('删除错误:' + err.message)
})
},
toggleAdvanced() {
this.advanced = !this.advanced
},
handleOk() {
this.$refs.table.refresh()
},
onSelectChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys
this.selectedRows = selectedRows
},
/**
* 重置密码
*/
resetPwd(record) {
sysTenantResetPwd({
id: record.id
}).then(res => {
if (res.success) {
this.$message.success('重置成功')
// this.$refs.table.refresh()
} else {
this.$message.error('重置失败:' + res.message)
}
.catch(err => {
this.$message.error('删除错误:' + err.message)
})
},
simulationTenantLogin(record) {
const that = this;
simulationTenantLogin({
tenantId: record.id,
account: record.email,
password: '66666' //
}).then((res) => {
if (res.success) {
const token = res.data;
that.$ls.remove(ALL_APPS_MENU)
that.$ls.set(ACCESS_TOKEN, token)
window.open(`${window.location.origin}/`)
} else {
this.$message.error('登录失败:' + res.message)
}
})
}
},
toggleAdvanced() {
this.advanced = !this.advanced
},
handleOk() {
this.$refs.table.refresh()
},
onSelectChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys
this.selectedRows = selectedRows
},
/**
* 重置密码
*/
resetPwd(record) {
sysTenantResetPwd({
id: record.id
}).then(res => {
if (res.success) {
this.$message.success('重置成功')
// this.$refs.table.refresh()
} else {
this.$message.error('重置失败:' + res.message)
}
})
},
simulationTenantLogin(record) {
const that = this
simulationTenantLogin({
tenantId: record.id,
account: record.email,
password: '66666' //
}).then(res => {
if (res.success) {
const token = res.data
that.$ls.remove(ALL_APPS_MENU)
that.$ls.set(ACCESS_TOKEN, token)
window.open(`${window.location.origin}/`)
} else {
this.$message.error('登录失败:' + res.message)
}
})
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
button {
margin-right: 8px;
}
</style>

Loading…
Cancel
Save