szh_zidingyibiaoti
张同海 2 years ago
parent eea3a3d187
commit f534d8810f

@ -297,6 +297,7 @@ export function GetYardData(parameter) {
return axios({ return axios({
url: '/BookingOrder/GetYardData', url: '/BookingOrder/GetYardData',
method: 'get', method: 'get',
timeout: 30 * 1000,
params: parameter params: parameter
}) })
} }

@ -36,6 +36,66 @@ export function DjyCustomerQuerytDjyCustomerInfo(parameter) {
params: parameter params: parameter
}) })
} }
/**
* 通过职位获取用户信息
*
* @author Myshipping
*/
export function sysUserQueryUserByPos(parameter) {
return axios({
url: '/sysUser/QueryUserByPos',
method: 'get',
params: parameter
})
}
/**
* 获取派车详情
*
* @author Myshipping
*/
export function BookingTruckGetInfo(parameter) {
return axios({
url: '/BookingTruck/GetInfo',
method: 'get',
params: parameter
})
}
/**
* 撤销派车
*
* @author Myshipping
*/
export function BookingTruckCancel(parameter) {
return axios({
url: '/BookingTruck/Cancel',
method: 'get',
params: parameter
})
}
/**
* 删除派车
*
* @author Myshipping
*/
export function apibookingtruck(parameter) {
return axios({
url: `/api/bookingtruck/${parameter}`,
method: 'DELETE'
})
}
/**
* 打印派车
*
* @author Myshipping
*/
export function BookingTruckPrint(parameter) {
return axios({
url: '/BookingTruck/Print',
method: 'get',
params: parameter
})
}
/** /**
* 添加订舱模板 * 添加订舱模板
* *

@ -79,7 +79,7 @@
<div class="nav" @click="batchEditing"><i class="iconfont icon-bianjiwenjian"></i>批量编辑</div> <div class="nav" @click="batchEditing"><i class="iconfont icon-bianjiwenjian"></i>批量编辑</div>
<div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div> <div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div>
<!-- <div class="nav" @click="excuteShippingOrderCompareBatch"><i class="iconfont icon-weibiaoti--"></i>下货纸比对</div> --> <!-- <div class="nav" @click="excuteShippingOrderCompareBatch"><i class="iconfont icon-weibiaoti--"></i>下货纸比对</div> -->
<a-popconfirm <!-- <a-popconfirm
title="确定进行下货纸比对?" title="确定进行下货纸比对?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@ -87,7 +87,7 @@
@cancel="cancelRemove" @cancel="cancelRemove"
> >
<div class="nav"><i class="iconfont icon-duibi"></i>下货纸比对</div> <div class="nav"><i class="iconfont icon-duibi"></i>下货纸比对</div>
</a-popconfirm> </a-popconfirm> -->
<a-popconfirm <a-popconfirm
title="确定删除当前选中订舱?" title="确定删除当前选中订舱?"
ok-text="是" ok-text="是"

@ -10,28 +10,28 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form" class="CsForm"> <a-form :form="form" class="CsForm">
<a-row type="flex" :gutter="16"> <a-row type="flex" :gutter="16">
<a-col> <a-col v-if="$route.query.type == 'Edit'">
<a-button type="primary" @click="handleSubmit('New')"> <a-button type="primary" @click="FnPrint">
打印 打印
</a-button> </a-button>
</a-col> </a-col>
<a-col> <a-col v-if="$route.query.type == 'Add' || 'Edit'">
<a-button type="primary" @click="handleSubmit"> <a-button type="primary" @click="handleSubmit">
保存 保存
</a-button> </a-button>
</a-col> </a-col>
<a-col> <a-col v-if="$route.query.type == 'Edit'">
<a-button type="primary" @click="handleSubmit"> <a-button type="primary" @click="handleSubmit">
提交派车 提交派车
</a-button> </a-button>
</a-col> </a-col>
<a-col> <a-col v-if="$route.query.type == 'Edit'">
<a-button type="primary" @click="handleSubmit"> <a-button type="primary" @click="handleSubmit">
撤销派车 撤销派车
</a-button> </a-button>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row :style="{ marginTop: '10px' }">
<p class="CsFormTitle"> <p class="CsFormTitle">
<span><i class="iconfont icon-shiyongwendang"></i>车队信息</span> <span><i class="iconfont icon-shiyongwendang"></i>车队信息</span>
</p> </p>
@ -109,37 +109,37 @@
<p class="CsFormTitle"> <p class="CsFormTitle">
<span><i class="iconfont icon-shiyongwendang"></i>派车通知详细信息</span> <span><i class="iconfont icon-shiyongwendang"></i>派车通知详细信息</span>
</p> </p>
<a-row> <a-row v-if="$route.query.type == 'Edit'">
<a-col :span="5"> <a-col :span="5">
<a-form-item label="船名:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="船名:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input v-decorator="['ctncode']" /> <a-input v-decorator="['vessel']" disabled />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="3"> <a-col :span="3">
<a-form-item label="船名:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="航次:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input v-decorator="['kgs']" /> <a-input v-decorator="['voyNo']" disabled />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="5"> <a-col :span="5">
<a-form-item label="提单号:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="提单号:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input v-decorator="['fee']" /> <a-input v-decorator="['mblNo']" disabled />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="5"> <a-col :span="5">
<a-form-item label="箱型箱量:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="箱型箱量:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input v-decorator="['ctncode']" /> <a-input v-decorator="['cntrTotal']" disabled />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="3"> <a-col :span="3">
<a-form-item label="吨数:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="吨数:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input v-decorator="['kgs']" /> <a-input-number v-decorator="['kgs']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="5"> <a-col :span="5">
<a-form-item label="陆运费:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="陆运费:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input v-decorator="['fee']" /> <a-input-number v-decorator="['fee']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="5"> <a-col :span="5">
@ -160,23 +160,19 @@
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="提箱场站:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback> <a-form-item label="提箱场站:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<!-- <a-select v-decorator="['yardid']" allowClear>
<a-select-option v-for="item in payMethodData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select> -->
<a-select <a-select
show-search show-search
placeholder="请选择场站" placeholder="请选择场站"
v-decorator="['yardid']" v-decorator="['yardid']"
@search="YardCodeSearch" @search="yardidSearch"
@focus="YardCodeSearch" @focus="yardidSearch"
@change="Changeyardid"
:default-active-first-option="false" :default-active-first-option="false"
:show-arrow="false" :show-arrow="false"
:filter-option="filterOption" :filter-option="filterOption"
:not-found-content="null" :not-found-content="null"
> >
<a-select-option v-for="item in YardCodeData" :key="item.codeName" :value="item.codeName"> <a-select-option v-for="item in yardidData" :key="item.codeName" :value="item.codeName">
{{ item.shortName }} {{ item.shortName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -184,8 +180,13 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="联系人:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback> <a-form-item label="联系人:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-select v-decorator="['yardcontract']" @change="Changeyardcontract" v-if="attnData.length" allowClear> <a-select
<a-select-option v-for="item in attnData" :key="item.id" :value="item.id"> v-decorator="['yardcontract']"
@change="Changeyardcontract"
v-if="yardcontractaData.length"
allowClear
>
<a-select-option v-for="item in yardcontractaData" :key="item.id" :value="item.id">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -247,23 +248,19 @@
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="入场场站:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback> <a-form-item label="入场场站:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<!-- <a-select v-decorator="['inYardID']" allowClear>
<a-select-option v-for="item in payMethodData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select> -->
<a-select <a-select
show-search show-search
placeholder="请选择场站" placeholder="请选择场站"
v-decorator="['inYardID']" v-decorator="['inYardID']"
@search="YardCodeSearch" @search="inYardIDSearch"
@focus="YardCodeSearch" @focus="inYardIDSearch"
@change="ChangeinYardID"
:default-active-first-option="false" :default-active-first-option="false"
:show-arrow="false" :show-arrow="false"
:filter-option="filterOption" :filter-option="filterOption"
:not-found-content="null" :not-found-content="null"
> >
<a-select-option v-for="item in YardCodeData" :key="item.codeName" :value="item.codeName"> <a-select-option v-for="item in inYardIDData" :key="item.codeName" :value="item.codeName">
{{ item.shortName }} {{ item.shortName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -271,8 +268,13 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="联系人:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback> <a-form-item label="联系人:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-select v-decorator="['inYardContact']" @change="ChangeinYardContact" v-if="attnData.length" allowClear> <a-select
<a-select-option v-for="item in attnData" :key="item.id" :value="item.id"> v-decorator="['inYardContact']"
@change="ChangeinYardContact"
v-if="inYardContactData.length"
allowClear
>
<a-select-option v-for="item in inYardContactData" :key="item.id" :value="item.id">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -299,7 +301,7 @@
<a-col :span="8"> <a-col :span="8">
<a-form-item label="派车状态:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="派车状态:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select v-decorator="['status']" allowClear> <a-select v-decorator="['status']" allowClear>
<a-select-option v-for="item in payMethodData" :key="item.id" :value="item.id"> <a-select-option v-for="item in statusData" :key="item.id" :value="item.id">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -311,7 +313,7 @@
<span><i class="iconfont icon-tuandui"></i>箱信息</span> <span><i class="iconfont icon-tuandui"></i>箱信息</span>
</p> </p>
<a-row> <a-row>
<a-col :span="18"> <a-col :span="24">
<vxe-toolbar> <vxe-toolbar>
<template #buttons> <template #buttons>
<vxe-button icon="vxe-icon-square-plus" @click="insertEvent()"></vxe-button> <vxe-button icon="vxe-icon-square-plus" @click="insertEvent()"></vxe-button>
@ -331,12 +333,12 @@
<!-- <vxe-column type="seq" width="60"></vxe-column> --> <!-- <vxe-column type="seq" width="60"></vxe-column> -->
<vxe-column field="ctncode" title="箱型" :edit-render="{}"> <vxe-column field="ctncode" title="箱型" :edit-render="{}">
<template #default="{ row }"> <template #default="{ row }">
<span>{{ formatRole(row.ctncode) }}</span> <span>{{ FnRctncode(row.ctncode) }}</span>
</template> </template>
<template #edit="{ row }"> <template #edit="{ row }">
<vxe-select v-model="row.ctncode" transfer> <vxe-select v-model="row.ctncode" transfer>
<vxe-option <vxe-option
v-for="item in TypeData" v-for="item in ctnList"
:key="item.code" :key="item.code"
:value="item.code" :value="item.code"
:label="item.name" :label="item.name"
@ -374,36 +376,43 @@
<vxe-input v-model="row.cbm" type="text" transfer></vxe-input> <vxe-input v-model="row.cbm" type="text" transfer></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="remark" title="车牌号" :edit-render="{}"> <vxe-column field="carNumber" title="车牌号" :edit-render="{}">
<template #edit="{ row }"> <template #edit="{ row }">
<vxe-input v-model="row.remark" type="text" transfer></vxe-input> <vxe-input v-model="row.carNumber" type="text" transfer></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="remark" title="司机" :edit-render="{}"> <vxe-column field="carDriver" title="司机" :edit-render="{}">
<template #edit="{ row }"> <template #edit="{ row }">
<vxe-input v-model="row.remark" type="text" transfer></vxe-input> <vxe-input v-model="row.carDriver" type="text" transfer></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="remark" title="司机电话" :edit-render="{}"> <vxe-column field="carDriverTel" title="司机电话" :edit-render="{}">
<template #edit="{ row }"> <template #edit="{ row }">
<vxe-input v-model="row.remark" type="text" transfer></vxe-input> <vxe-input v-model="row.carDriverTel" type="text" transfer></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
</vxe-table> </vxe-table>
</a-col> </a-col>
<a-col :span="6" :style="{ marginTop: '50px' }"> </a-row>
<a-row> <a-row :style="{ marginTop: '20px' }">
<a-col> <a-col :span="8">
<a-form-item label="注意事项:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="调度:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-textarea :auto-size="{ minRows: 3, maxRows: 5 }" v-decorator="['attention']" /> <a-select v-decorator="['dispatcherId']" allowClear>
</a-form-item> <a-select-option v-for="item in dispatcherIdData" :key="item.sysEmpId" :value="item.sysEmpId">
</a-col> {{ item.sysEmpName }}
<a-col> </a-select-option>
<a-form-item label="备注:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> </a-select>
<a-textarea :auto-size="{ minRows: 3, maxRows: 5 }" v-decorator="['remark']" /> </a-form-item>
</a-form-item> </a-col>
</a-col> <a-col :span="8">
</a-row> <a-form-item label="注意事项:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-textarea :auto-size="{ minRows: 3, maxRows: 5 }" v-decorator="['attention']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="备注:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-textarea :auto-size="{ minRows: 3, maxRows: 5 }" v-decorator="['remark']" />
</a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
@ -416,14 +425,36 @@ import {
DjyCustomerAdd, DjyCustomerAdd,
DjyCustomerQuerytDjyCustomerInfo, DjyCustomerQuerytDjyCustomerInfo,
BookingTruckSave, BookingTruckSave,
sysUserQueryUserByPos,
BookingTruckGetInfo,
BookingTruckPrint,
DjyCustomerEdit DjyCustomerEdit
} from '@/api/modular/main/SendCar' } from '@/api/modular/main/SendCar'
import { GetCtn } from '@/api/modular/main/BookingLedger'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger' import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
import { values } from 'xe-utils'
export default { export default {
data() { data() {
return { return {
YardCodeData: [], WebData: {},
payMethodData: [], dispatcherIdData: [],
ctnList: [],
yardidData: [],
inYardIDData: [],
yardcontractaData: [],
inYardContactData: [],
payMethodData: [
{ id: 'NO_INVOICE', name: '不开票' },
{ id: 'OWN_COMPANY', name: '本公司发票' },
{ id: 'LAND_TRANS_INVOICE', name: '陆运发票' }
],
statusData: [
{ id: 'TEMP', name: '暂存' },
{ id: 'SUBMITED', name: '已提交' },
{ id: 'CANCELED', name: '已撤销' },
{ id: 'SEND_DISPATCH', name: '已派车' },
{ id: 'CANCEL_DISPATCH', name: '已撤销派车' }
],
truckIdData: [], truckIdData: [],
attnData: [], attnData: [],
sexList: [ sexList: [
@ -483,63 +514,155 @@ export default {
bookingServiceItem: [] bookingServiceItem: []
} }
}, },
computed: {
path() {
console.log(location.pathname)
return location.pathname
}
},
watch: { watch: {
$route() { $route: {
if (this.$route.query.type == 'Add') { immediate: true,
this.$data = this.$options.data() deep: true,
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet' }).then(res => { handler(To, from) {
console.log(res) if (To.path == '/SendCarAdd') {
this.truckIdData = res.data this.init()
}) }
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard' }).then(res => {
console.log(res)
this.YardCodeData = res.data
})
// commondbYardlist().then(res => {
// this.YardCodeData = res.data
// })
} }
} }
}, },
mounted() { mounted() {
this.TypeData = this.$options.filters['dictData']('djy_cust_contact_role') // this.init()
// this.propStringData = this.$options.filters['dictData']('djy_cust_prop')
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
}, },
methods: { methods: {
YardCodeSearch(data) { FnPrint() {
BookingTruckPrint({ id: this.WebData.id }).then(res => {
console.log(res)
})
},
init() {
if (this.$route.query.type == 'Add' || this.$route.query.type == 'Edit') {
// this.$data = this.$options.data()
this.ContactsData = []
this.form = this.$form.createForm(this)
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet' }).then(res => {
this.truckIdData = res.data
})
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard' }).then(res => {
this.yardidData = res.data
this.inYardIDData = res.data
})
sysUserQueryUserByPos({ pos: 'PCDD' }).then(res => {
this.dispatcherIdData = res.data
})
GetCtn({ KeyWord: '' }).then(res => {
this.ctnList = res.data
})
if (this.$route.query.type == 'Edit') {
BookingTruckGetInfo({ id: this.$route.query.id }).then(res => {
if (res.data.ext.contaList) {
this.ContactsData = res.data.ext.contaList
}
setTimeout(() => {
this.form.setFieldsValue({ ...res.data.ext })
this.WebData = res.data.ext
this.ChangetruckId(res.data.ext.truckId)
setTimeout(() => {
this.Changeattn(res.data.ext.attn)
}, 110)
this.Changeyardid(res.data.ext.yardid)
setTimeout(() => {
this.Changeyardcontract(res.data.ext.yardcontract)
}, 110)
this.ChangeinYardID(res.data.ext.inYardID)
setTimeout(() => {
this.ChangeinYardContact(res.data.ext.inYardContact)
}, 110)
}, 100)
})
}
}
},
FnRctncode(value) {
let RData = ''
if (value) {
this.ctnList.forEach(item => {
if (item.code == value) {
RData = item.name
}
})
}
return RData
},
yardidSearch(data) {
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard', queryItem: data }).then(res => { DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard', queryItem: data }).then(res => {
this.YardCodeData = res.data this.yardidData = res.data
})
},
inYardIDSearch(data) {
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard', queryItem: data }).then(res => {
this.inYardIDData = res.data
}) })
// commondbYardlist({ KeyWord: data }).then(res => {
// this.YardCodeData = res.data
// })
}, },
ChangeinYardContact(e) { ChangeinYardContact(e) {
this.attnData.forEach(item => { this.inYardContactData.forEach(item => {
if (item.id == e) { if (item.id == e) {
console.log(item)
this.form.setFieldsValue({ this.form.setFieldsValue({
inYardContact: item.id,
inYardContractTel: item.tel inYardContractTel: item.tel
}) })
} }
}) })
}, },
Changeyardcontract(e) { Changeyardcontract(e) {
this.attnData.forEach(item => { this.yardcontractaData.forEach(item => {
if (item.id == e) { if (item.id == e) {
console.log(item)
this.form.setFieldsValue({ this.form.setFieldsValue({
yardcontract: item.id,
yardcontracttel: item.tel yardcontracttel: item.tel
}) })
} }
}) })
}, },
ChangeinYardID(e) {
setTimeout(() => {
this.form.setFieldsValue({
inYardContact: '',
inYardContractTel: ''
})
}, 100)
this.inYardIDData.forEach(item => {
if (item.codeName == e) {
if (item.contacts && item.contacts.length) {
this.inYardContactData = item.contacts
} else {
this.inYardContactData = []
}
}
})
},
Changeyardid(e) {
setTimeout(() => {
this.form.setFieldsValue({
yardcontract: '',
yardcontracttel: ''
})
}, 100)
this.yardidData.forEach(item => {
if (item.codeName == e) {
if (item.contacts && item.contacts.length) {
this.yardcontractaData = item.contacts
} else {
this.yardcontractaData = []
}
}
})
},
Changeattn(e) { Changeattn(e) {
this.attnData.forEach(item => { this.attnData.forEach(item => {
if (item.id == e) { if (item.id == e) {
console.log(item)
this.form.setFieldsValue({ this.form.setFieldsValue({
attn: item.id,
attnTel: item.tel, attnTel: item.tel,
attnMail: item.email attnMail: item.email
}) })
@ -566,7 +689,6 @@ export default {
}, },
gettruckIdData(name = '', type) { gettruckIdData(name = '', type) {
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet', queryItem: name }).then(res => { DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet', queryItem: name }).then(res => {
console.log(res)
this.truckIdData = res.data this.truckIdData = res.data
}) })
}, },
@ -583,6 +705,9 @@ export default {
}) })
}, },
insertEvent() { insertEvent() {
if (this.ContactsData) {
this.ContactsData = []
}
this.ContactsData.push({ this.ContactsData.push({
WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1, WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1,
roleName: '', roleName: '',
@ -620,9 +745,21 @@ export default {
validateFields((errors, values) => { validateFields((errors, values) => {
if (!errors) { if (!errors) {
values.contaList = this.ContactsData
if (this.$route.query.type == 'Edit') {
values.id = this.WebData.id
}
BookingTruckSave({ ...values }) BookingTruckSave({ ...values })
.then(res => { .then(res => {
console.log(res) if (this.$route.query.type == 'Add') {
this.$router.push({
query: {
type: 'Edit',
id: res.data.ext
}
})
}
this.confirmLoading = false this.confirmLoading = false
}) })
.catch(() => { .catch(() => {

@ -74,6 +74,7 @@
resizable resizable
round round
:loading="loading" :loading="loading"
height="600"
empty-text="没有更多数据了!" empty-text="没有更多数据了!"
v-if="!TableType" v-if="!TableType"
> >
@ -132,11 +133,13 @@
</div> </div>
</template> </template>
<script> <script>
import { BookingTruckGetPage, DjyCustomerGet, DjyCustomerDelete, DjyUserConfigAdd } from '@/api/modular/main/SendCar' import {
// import addForm from './addForm.vue' BookingTruckGetPage,
// import editForm from './editForm.vue' BookingTruckCancel,
const addForm = () => import('./addForm.vue') DjyCustomerGet,
const editForm = () => import('./editForm.vue') DjyUserConfigAdd,
apibookingtruck
} from '@/api/modular/main/SendCar'
import columnSetting from '@/components/tableColumnSetting' import columnSetting from '@/components/tableColumnSetting'
const columns = [ const columns = [
{ {
@ -190,8 +193,6 @@ const columns = [
] ]
export default { export default {
components: { components: {
addForm,
editForm,
columnSetting columnSetting
}, },
data() { data() {
@ -353,15 +354,13 @@ export default {
}, },
TabsEdit(row) { TabsEdit(row) {
this.$router.push({ name: 'CustomerInformationManagementEdit', query: { id: row.id } }) this.$router.push({
// this.$refs.editForm[0].edit(row) name: 'SendCarAdd',
// let activeKey = this.panes.length + 1 query: {
// this.panes.push({ type: 'Edit',
// title: '', id: row.id
// key: activeKey, }
// row: row })
// })
// this.activeKey = activeKey
}, },
TabsAdd() { TabsAdd() {
this.$router.push({ this.$router.push({
@ -422,7 +421,7 @@ export default {
this.loading = false this.loading = false
this.queryParam.currentPage = res.data.pageIndex this.queryParam.currentPage = res.data.pageIndex
this.queryParam.pageSize = res.data.pageSize this.queryParam.pageSize = res.data.pageSize
this.queryParam.totalResult = res.data.totalPages this.queryParam.totalResult = res.data.totalCount
}) })
}, },
/** /**
@ -436,7 +435,8 @@ export default {
this.DjyCustomerDelete(data) this.DjyCustomerDelete(data)
}, },
DjyCustomerDelete(record) { DjyCustomerDelete(record) {
DjyCustomerDelete(record).then(res => { console.log(record)
apibookingtruck(record.id).then(res => {
if (res.success) { if (res.success) {
this.$message.success('删除成功') this.$message.success('删除成功')
this.FnGetData() this.FnGetData()

Loading…
Cancel
Save