master
张同海 1 year ago
parent c27badc876
commit cfdfa66468

@ -0,0 +1,26 @@
import { axios } from '@/utils/request'
// 车辆绑定审核:获取车辆列表
export function tmsCarAuditingList(parameter) {
return axios({
url: '/tmsaip/tmsCar/auditingList',
method: 'get',
params: parameter
})
}
// 车辆绑定审核:通过
export function tmsCarApproved(parameter) {
return axios({
url: `/tmsaip/tmsCar/approved/${parameter.id}`,
method: 'post'
})
}
// 车辆绑定审核:驳回
export function tmsCarReject(parameter) {
return axios({
url: `/tmsaip/tmsCar/reject/${parameter.id}`,
method: 'post'
// data: {
// rejectReason: parameter.rejectReason
// }
})
}

@ -0,0 +1,32 @@
import { axios } from '@/utils/request'
// 获取工厂地址模板列表
export function tmsCobLoadingPlacelist(parameter) {
return axios({
url: '/tmsaip/tmsCobLoadingPlace/list',
method: 'get',
params: parameter
})
}
// 新增
export function tmsCobLoadingPlacecreate(parameter) {
return axios({
url: '/tmsaip/tmsCobLoadingPlace/create',
method: 'post',
data: parameter
})
}
// 根据id更新信息
export function tmsCobLoadingPlaceupdate(parameter) {
return axios({
url: `/tmsaip/tmsCobLoadingPlace/update/${parameter.id}`,
method: 'post',
data: parameter
})
}
// 根据id删除信息
export function tmsCobLoadingPlacedelete(parameter) {
return axios({
url: `/tmsaip/tmsCobLoadingPlace/delete/${parameter}`,
method: 'post'
})
}

@ -6,9 +6,9 @@
<a-col>
<div class="nav-box">
<div class="nav" @click="handleSubmit"><i class="iconfont icon-icon_baocun"></i>保存</div>
<!-- <div v-if="type == 'Details'" class="nav" @click="FnDelete">
<div v-if="type == 'Details'" class="nav" @click="FnDelete">
<i class="iconfont icon-shanchu1"></i>删除
</div> -->
</div>
<div v-if="type == 'Details'" class="nav" @click="FnCopy"><i class="iconfont icon-fuzhi"></i></div>
<div v-if="type == 'Details'" class="nav" @click="FnCancel">
<i class="iconfont icon-fuzhi"></i>终止订单
@ -280,7 +280,22 @@
:wrapperCol="{ xs: { span: 25 }, sm: { span: 17 } }"
has-feedback
>
<a-input v-model="item.name" allowClear />
<!-- :data-source="dataSource"
:filter-option="TemplateFilterOption"
v-model="item.name"
allowClear -->
<a-auto-complete
v-model="item.name"
allowClear
:data-source="dataSource"
:style="{ width: '100%' }"
:filter-option="TemplateFilterOption"
@select="
(a, b) => {
TemplateSelect(a, b, item)
}
"
/>
</a-form-item>
</a-col>
<a-col :span="5">
@ -331,6 +346,14 @@
<a-input v-model="item.address" allowClear />
</a-form-item>
</a-col>
<a-col :span="5" :style="{ marginTop: '6px' }">
<vxe-button
status="primary"
content="存为模板"
size="mini"
@click="FnSaveTemplate(item)"
></vxe-button>
</a-col>
</a-row>
</div>
<a-row>
@ -594,6 +617,7 @@
</a-form>
</a-spin>
</a-modal>
<add-form ref="addForm" @ok="handleOk" />
</div>
<!-- </a-modal> -->
@ -604,6 +628,7 @@ import { mapGetters, mapActions } from 'vuex'
import { commondbYardlist } from '@/api/modular/main/CommondbYardlist'
import { commondbCarrierlist } from '@/api/modular/main/CommondbPortlist'
import { GetCtn } from '@/api/modular/main/BookingLedger'
import addForm from '../tmsCobLoadingPlace/addForm.vue'
import {
TmsForwarderOrderCreate,
TmsForwarderOrderUpdate,
@ -619,9 +644,17 @@ import {
} from '@/api/modular/main/tmsaip/TmsForwarderOrder'
import { DjyCustomerQuerytDjyCustomerInfo } from '@/api/modular/main/SendCar'
import { tmsTenantRelationList } from '@/api/modular/main/tmsaip/tmsTenantRelationTF'
import { tmsCobLoadingPlacelist } from '@/api/modular/main/tmsaip/tmsCobLoadingPlace'
import AAutoComplete from 'ant-design-vue/es/auto-complete'
export default {
components: {
addForm,
AAutoComplete
},
data() {
return {
dataSource: [''],
dataSourceA: [],
AddsData: {
driverId: '',
num: 1
@ -798,6 +831,21 @@ export default {
},
methods: {
...mapActions(['setTmsAddData']),
TemplateFilterOption(input, option) {
return option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
},
TemplateSelect(value, option, data) {
this.dataSourceA.forEach(item => {
if (item.templateName == value || item.name == value) {
console.log(item)
data.name = item.name
data.contact = item.contact
data.address = item.address
data.tel = item.tel
}
})
console.log(value, option)
},
CopyFromToReturn() {
// fromYardId fromContract fromTel returnYardId returnContract returnTel
let values = { ...this.form.getFieldsValue() }
@ -996,13 +1044,6 @@ export default {
...res.data
})
}, 100)
// this.$router.replace({
// name: 'TmsTruckerOrderDetails',
// query: {
// type: 'Details',
// id: res.data.id
// }
// })
} else {
this.$message.error(res.message)
}
@ -1025,6 +1066,13 @@ export default {
FnFactoryDelete(index) {
this.tmsForwarderOrderLoadingPlaceEntityList.splice(index, 1)
},
FnSaveTemplate(data) {
this.$refs.addForm.add(data)
},
handleOk() {
this.FnGetTemplateData()
// this.FnGetData()
},
FnCopy() {
this.$router.push({
name: 'TmsForwarderOrderDetails',
@ -1064,6 +1112,19 @@ export default {
})
},
FnGetTemplateData() {
let Arr = []
tmsCobLoadingPlacelist({
pageSize: 999
}).then(res => {
res.data.list.forEach(item => {
Arr.push(item.name)
Arr.push(item.templateName)
})
this.dataSource = Arr
this.dataSourceA = res.data.list
})
},
init() {
if (this.initTime) {
this.ContactsData = []
@ -1092,8 +1153,11 @@ export default {
} else {
this.tmsForwarderOrderLoadingPlaceEntityList = res.data.orderLoadingPlaceList
}
res.data.orderBodyList.forEach((item, index) => {
item.WebKey = index + 1
})
this.ContactsData = res.data.orderBodyList
console.log(this.ContactsData)
}, 100)
} else {
}
@ -1129,6 +1193,7 @@ export default {
commondbYardlist().then(res => {
this.YardCodeData = res.data
})
this.FnGetTemplateData()
// listCarGroup().then(res => {
// this.carGroupIdData = res.data
// })
@ -1176,6 +1241,7 @@ export default {
console.log(this.$refs.xTable.selection)
this.$refs.xTable.selection.forEach(item => {
this.ContactsData.forEach((item2, index2) => {
console.log(item.WebKey, item2.WebKey)
if (item.WebKey == item2.WebKey) {
this.ContactsData.splice(index2, 1)
}
@ -1186,6 +1252,10 @@ export default {
if (!this.ContactsData) {
this.ContactsData = []
}
console.log(
this.ContactsData,
this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1
)
this.ContactsData.push({
WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1,
dispatchStatus: '0'

@ -379,7 +379,8 @@ export default {
{ code: '1', name: '已发送' },
{ code: '2', name: '已派车' },
{ code: '3', name: '订单完成' },
{ code: '9', name: '订单取消' }
{ code: '9', name: '订单取消' },
{ code: '21', name: '部分派车' }
],
carGroupIdData: [],
listAllData: [],

@ -0,0 +1,162 @@
<template>
<a-modal
title="新增配置"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择车牌号"
v-decorator="['carId', { rules: [{ required: true, message: '请选择车牌号!' }] }]"
>
<a-select-option v-for="item in carIdData" :key="item.id" :value="item.id">
{{ item.carLicense }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="司机" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择司机"
v-decorator="['driverId', { rules: [{ required: true, message: '请选择司机!' }] }]"
>
<a-select-option v-for="item in listAllData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入联系方式" v-decorator="['tel']" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入身份证号" v-decorator="['idCard']" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="车辆属性" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select placeholder="请选择车辆属性" v-decorator="['carType']">
<a-select-option value="0">
自有车
</a-select-option>
<a-select-option value="1">
挂靠车
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="保险到期日期" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-date-picker
:style="{ width: '100%', minWidth: 'auto' }"
placeholder="请输入保险到期日期"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
show-time
v-decorator="['insureDueDate']"
allowClear
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { TmsTruckerCarRelationCreate } from '@/api/modular/main/tmsaip/tmsTruckerCarRelation'
import { TmsCarlistRef } from '@/api/modular/main/tmsaip/tmsCar'
import { listCarGroup, listAll } from '@/api/modular/main/tmsaip/TmsForwarderOrder'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 9 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
carGroupIdData: [],
listAllData: [],
carIdData: []
}
},
mounted() {},
methods: {
//
add(record) {
this.visible = true
listCarGroup().then(res => {
this.carGroupIdData = res.data
})
listAll().then(res => {
this.listAllData = res.data
})
TmsCarlistRef().then(res => {
this.carIdData = res.data.list
})
},
/**
* 提交表单
*/
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
TmsTruckerCarRelationCreate(values)
.then(res => {
if (res.success) {
this.$message.success('新增成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`新增失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.confirmLoading = false
this.visible = false
}
}
}
</script>

@ -0,0 +1,181 @@
<template>
<a-modal
title="编辑配置"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择车牌号"
v-decorator="['carId', { rules: [{ required: true, message: '请选择车牌号!' }] }]"
>
<a-select-option v-for="item in carIdData" :key="item.id" :value="item.id">
{{ item.carLicense }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="司机" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择司机"
v-decorator="['driverId', { rules: [{ required: true, message: '请选择司机!' }] }]"
>
<a-select-option v-for="item in listAllData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入联系方式" v-decorator="['tel']" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入身份证号" v-decorator="['idCard']" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="车辆属性" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select placeholder="请选择车辆属性" v-decorator="['carType']">
<a-select-option value="0">
自有车
</a-select-option>
<a-select-option value="1">
挂靠车
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="保险到期日期" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-date-picker
:style="{ width: '100%', minWidth: 'auto' }"
placeholder="请输入保险到期日期"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
show-time
v-decorator="['insureDueDate']"
allowClear
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { TmsCarlistRef } from '@/api/modular/main/tmsaip/tmsCar'
import { TmsTruckerCarRelationUpdate } from '@/api/modular/main/tmsaip/tmsTruckerCarRelation'
import { listCarGroup, listAll } from '@/api/modular/main/tmsaip/TmsForwarderOrder'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 9 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
carGroupIdData: [],
listAllData: [],
id: '',
version: '',
carIdData: []
}
},
mounted() {},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
listCarGroup().then(res => {
this.carGroupIdData = res.data
})
listAll().then(res => {
this.listAllData = res.data
})
TmsCarlistRef().then(res => {
this.carIdData = res.data.list
})
setTimeout(() => {
this.id = record.id
this.version = record.version
this.form.setFieldsValue({
carId: record.carId,
driverId: record.driverId,
tel: record.tel,
idCard: record.idCard,
carType: record.carType,
insureDueDate: record.insureDueDate
})
// console.log(this.form.getFieldsValue())
}, 100)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
// for (const key in values) {
// console.log(key, 1)
// if (typeof values[key] === 'object' && !(values[key] === null)) {
// values[key] = JSON.stringify(values[key])
// }
// }
TmsTruckerCarRelationUpdate({ ...values, version: this.version, id: this.id })
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,401 @@
<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-select v-model="queryParam.auditingStatus" allow-clear placeholder="请选择绑定状态">
<a-select-option v-for="item in statusData" :key="item.code" :value="item.code">
{{ item.name }}
</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>
</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="Fnapproved()"><i class="iconfont icon-jiahao2fill"></i>通过</div>
<div class="nav" @click="Fnreject()"><i class="iconfont icon-jiahao2fill"></i>驳回</div>
</div>
</template>
</vxe-toolbar>
<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`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
<template #default="{ row }">
<!-- <span v-if="item.dataIndex == 'status'">{{ FncarType(row[item.dataIndex]) }}</span> -->
<span v-if="item.dataIndex == 'carImg'">
<vxe-button status="primary" content="预览" @click="FnSeeCarImg(row)"></vxe-button>
</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</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-modal
title="装箱照片"
:visible="ImgsVisible"
@cancel="
() => {
ImgsVisible = false
}
"
>
<div class="imgBox">
<img v-for="(item, index) in ImgsData" :key="index" :src="item.imageUrl" alt="" />
</div>
<template slot="footer"><div></div> </template>
</a-modal>
</a-card>
</div>
</template>
<script>
import { tmsCarAuditingList, tmsCarApproved, tmsCarReject } from '@/api/modular/main/tmsaip/tmsCarBindingAudit'
import { mapActions } from 'vuex'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
components: {
addForm,
editForm
},
data() {
return {
ImgsVisible: false,
ImgsData: [],
statusData: [
{ code: '1', name: '已通过' },
{ code: '2', name: '待审核' },
{ code: '3', name: '已驳回' },
{ code: '9', name: '已解绑' }
],
// /
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: 'driverName'
},
{
title: '手机号',
align: 'center',
width: '80',
dataIndex: 'tel'
},
{
title: '车牌号',
align: 'center',
width: '120',
dataIndex: 'carLicense'
},
{
title: '车辆品牌',
align: 'center',
width: '120',
dataIndex: 'brand'
},
{
title: '车辆颜色',
align: 'center',
width: '120',
dataIndex: 'carColor'
},
{
title: '车辆材料',
align: 'center',
width: '120',
dataIndex: 'carImg'
}
],
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: []
}
},
created() {},
mounted() {
this.init()
},
methods: {
...mapActions(['setCtnallList']),
FnSeeCarImg(data) {
// console.log(data)
if (data.carImg) {
this.ImgsVisible = true
this.ImgsData = [data.carImg]
} else {
this.$message.warning('暂无照片')
}
},
Fnapproved() {
let selectRecords = this.$refs.xTable1.getCheckboxRecords()
console.log(selectRecords)
if (selectRecords.length == 1) {
tmsCarApproved(selectRecords[0]).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()
console.log(selectRecords[0])
if (selectRecords.length == 1) {
tmsCarReject(selectRecords[0]).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 => {
if (item.code == data) {
Rdata = item.name
}
})
return Rdata
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
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
this.FnGetData()
},
FnGetData() {
this.loading = true
tmsCarAuditingList(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>

@ -0,0 +1,131 @@
<template>
<a-modal
title="新增模板"
:width="600"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="24">
<a-form-item label="模板名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入模板名称"
v-decorator="['templateName', { rules: [{ required: true, message: '请输入模板名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="工厂" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入工厂"
v-decorator="['name', { rules: [{ required: true, message: '请输入工厂!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="工厂地址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入工厂地址"
v-decorator="['address', { rules: [{ required: true, message: '请输入工厂地址!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入联系人"
v-decorator="['contact', { rules: [{ required: true, message: '请输入联系人!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入联系电话"
v-decorator="['tel', { rules: [{ required: true, message: '请输入联系电话!' }] }]"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { tmsCobLoadingPlacecreate } from '@/api/modular/main/tmsaip/tmsCobLoadingPlace'
export default {
data() {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
//
add(record) {
console.log(record)
this.visible = true
if (record) {
setTimeout(() => {
this.id = record.id
this.form.setFieldsValue({
name: record.name,
address: record.address,
contact: record.contact,
tel: record.tel
})
}, 100)
}
},
/**
* 提交表单
*/
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
tmsCobLoadingPlacecreate(values)
.then(res => {
if (res.success) {
this.$message.success('新增成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`新增失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,129 @@
<template>
<a-modal
title="编辑模板"
:width="600"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="24">
<a-form-item label="模板名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入模板名称"
v-decorator="['templateName', { rules: [{ required: true, message: '请输入模板名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="工厂" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入工厂"
v-decorator="['name', { rules: [{ required: true, message: '请输入工厂!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="工厂地址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入工厂地址"
v-decorator="['address', { rules: [{ required: true, message: '请输入工厂地址!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入联系人"
v-decorator="['contact', { rules: [{ required: true, message: '请输入联系人!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入联系电话"
v-decorator="['tel', { rules: [{ required: true, message: '请输入联系电话!' }] }]"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { tmsCobLoadingPlaceupdate } from '@/api/modular/main/tmsaip/tmsCobLoadingPlace'
export default {
data() {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
id: ''
}
},
mounted() {},
methods: {
//
edit(record) {
console.log(record)
this.data = record
this.visible = true
setTimeout(() => {
this.id = record.id
this.form.setFieldsValue({
templateName: record.templateName,
name: record.name,
address: record.address,
contact: record.contact,
tel: record.tel
})
}, 100)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
tmsCobLoadingPlaceupdate({ ...values, id: this.id })
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

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

@ -12,11 +12,12 @@
<a-row>
<a-col :span="24">
<a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select placeholder="请选择供应商" v-decorator="['relationId']">
<!-- <a-select placeholder="请选择供应商" v-decorator="['relationName']">
<a-select-option v-for="item in relationIdData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-select> -->
<a-input placeholder="请选择供应商" v-decorator="['relationName']" allowClear />
</a-form-item>
</a-col>
<a-col :span="24">
@ -85,6 +86,13 @@ export default {
// values[key] = JSON.stringify(values[key])
// }
// }
console.log(values)
// this.relationIdData.forEach(item => {
// if (item.id == values.relationId) {
// values.relationName = item.name
// }
// })
tmsTenantRelationCreate(values)
.then(res => {
if (res.success) {

@ -1113,16 +1113,16 @@ export default {
}
return RData
},
removeCheckboxRow() {
console.log(this.$refs.xTable.selection)
this.$refs.xTable.selection.forEach(item => {
this.ContactsData.forEach((item2, index2) => {
if (item.WebKey == item2.WebKey) {
this.ContactsData.splice(index2, 1)
}
})
})
},
// removeCheckboxRow() {
// console.log(this.$refs.xTable.selection)
// this.$refs.xTable.selection.forEach(item => {
// this.ContactsData.forEach((item2, index2) => {
// if (item.WebKey == item2.WebKey) {
// this.ContactsData.splice(index2, 1)
// }
// })
// })
// },
insertEvent() {
if (!this.ContactsData) {
this.ContactsData = []

@ -560,6 +560,7 @@ export default {
if (nData == 1) {
Object.assign(this.$data.columns, this.$options.data().columns)
} else {
setTimeout(() => {
this.columns = [
{
title: '派车状态',
@ -610,12 +611,13 @@ export default {
dataIndex: 'containers'
},
{
title: '工厂地址',
title: '工厂',
align: 'center',
width: '80',
dataIndex: 'carrierId'
dataIndex: 'loadingPlaceName'
}
]
}, 100)
}
}
},

Loading…
Cancel
Save