|
|
|
@ -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)
|
|
|
|
|