|
|
|
@ -0,0 +1,372 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<a-card :bordered="false" :bodyStyle="tstyle">
|
|
|
|
|
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
|
|
|
|
|
<a-form layout="inline">
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
<a-col :md="18">
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<a-form-item label="模板名称:">
|
|
|
|
|
<a-input v-model="queryParam.templateName" allow-clear placeholder="请输入模板名称" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<a-form-item label="联系人:">
|
|
|
|
|
<a-input v-model="queryParam.contact" allow-clear placeholder="请输入联系人" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<a-form-item label="联系电话:">
|
|
|
|
|
<a-input v-model="queryParam.tel" allow-clear placeholder="请输入联系电话" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
|
|
<a-button type="primary" @click="FnGetData">查询</a-button>
|
|
|
|
|
<a-button style="margin-left: 8px" @click="init">重置</a-button>
|
|
|
|
|
<!-- <a @click="toggleAdvanced" style="margin-left: 8px">
|
|
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
|
|
</a> -->
|
|
|
|
|
</span>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
</a-card>
|
|
|
|
|
<a-card :bordered="false">
|
|
|
|
|
<vxe-toolbar>
|
|
|
|
|
<template #buttons>
|
|
|
|
|
<!-- <a-button type="primary" icon="plus" @click="$refs.addForm.add()">
|
|
|
|
|
新增配置
|
|
|
|
|
</a-button> -->
|
|
|
|
|
<div class="nav-box">
|
|
|
|
|
<div class="nav" @click="$refs.addForm.add()"><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-column
|
|
|
|
|
v-for="item in columns"
|
|
|
|
|
:key="`${item.dataIndex}3`"
|
|
|
|
|
:field="item.dataIndex"
|
|
|
|
|
:min-width="item.width"
|
|
|
|
|
:title="item.title"
|
|
|
|
|
: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 }">
|
|
|
|
|
<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"
|
|
|
|
|
:page-size="queryParam.pageSize"
|
|
|
|
|
:total="queryParam.totalCount"
|
|
|
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
|
|
|
@page-change="handlePageChange1"
|
|
|
|
|
>
|
|
|
|
|
</vxe-pager>
|
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
|
</a-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { mapActions } from 'vuex'
|
|
|
|
|
import { tmsCobLoadingPlacelist, tmsCobLoadingPlacedelete } from '@/api/modular/main/tmsaip/tmsCobLoadingPlace'
|
|
|
|
|
import { listAll } from '@/api/modular/main/tmsaip/TmsForwarderOrder'
|
|
|
|
|
import addForm from './addForm.vue'
|
|
|
|
|
import editForm from './editForm.vue'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addForm,
|
|
|
|
|
editForm
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
carSourceData: [
|
|
|
|
|
{ code: '1', name: '自有车辆' },
|
|
|
|
|
{ code: '2', name: '社会车辆' },
|
|
|
|
|
{ code: '3', name: '加盟车辆' }
|
|
|
|
|
],
|
|
|
|
|
statusData: [
|
|
|
|
|
{ code: '1', name: '正常作业' },
|
|
|
|
|
{ code: '2', name: '维修保养' },
|
|
|
|
|
{ code: '3', name: '请假' },
|
|
|
|
|
{ code: '4', name: '查扣' },
|
|
|
|
|
{ code: '5', name: '预淘汰' }
|
|
|
|
|
],
|
|
|
|
|
TypeData: [],
|
|
|
|
|
// 高级搜索 展开/关闭
|
|
|
|
|
advanced: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
setVisible: false,
|
|
|
|
|
setVisible1: false,
|
|
|
|
|
queryParam: {
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
totalCount: 0,
|
|
|
|
|
sort: 'sort',
|
|
|
|
|
sidx: true
|
|
|
|
|
},
|
|
|
|
|
ColumnsQuery: [],
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
title: '模板名称',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '100',
|
|
|
|
|
dataIndex: 'templateName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '工厂',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'name'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '工厂地址',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'address'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '联系人',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'contact'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '联系电话',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'tel'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
|
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
|
|
loadData: [],
|
|
|
|
|
CodeData: [],
|
|
|
|
|
WCodeData: [],
|
|
|
|
|
ModulesData: [],
|
|
|
|
|
carrierCodeData: [],
|
|
|
|
|
listAllData: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.init()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
...mapActions(['setCtnallList']),
|
|
|
|
|
filterOption(input, option) {
|
|
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
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) {
|
|
|
|
|
tmsCobLoadingPlacedelete(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
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
},
|
|
|
|
|
toggleAdvanced() {
|
|
|
|
|
this.advanced = !this.advanced
|
|
|
|
|
},
|
|
|
|
|
init() {
|
|
|
|
|
Object.assign(this.$data, this.$options.data())
|
|
|
|
|
this.ColumnsQuery = this.columns
|
|
|
|
|
listAll().then(res => {
|
|
|
|
|
this.listAllData = res.data
|
|
|
|
|
})
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
},
|
|
|
|
|
FnGetData() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
tmsCobLoadingPlacelist(this.queryParam).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.loadData = res.data.list
|
|
|
|
|
this.queryParam.totalCount = res.data.pagination.total
|
|
|
|
|
} else {
|
|
|
|
|
this.loadData = []
|
|
|
|
|
this.$message.warning(res.message)
|
|
|
|
|
}
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleOk() {
|
|
|
|
|
this.setCtnallList()
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.table-operator {
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button {
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
.Open {
|
|
|
|
|
}
|
|
|
|
|
.Close {
|
|
|
|
|
height: 45px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.vxe-table--render-default .vxe-body--row.row--stripe {
|
|
|
|
|
background: #f5f9fe;
|
|
|
|
|
}
|
|
|
|
|
.ant-card-body {
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
.nav-box {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
|
|
|
|
.nav {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0);
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
|
|
|
|
margin-right: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(1) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(2) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #865ef8;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(3) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #ff9702;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(4) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(5) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #ff1062;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(6) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1ebeca;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(7) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #82c93d;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(8) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|