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