|
|
|
@ -22,8 +22,8 @@
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="shipperSelect"
|
|
|
|
|
@focus="shipperChange"
|
|
|
|
|
@change="debounce(shipperChange, 300, $event)"
|
|
|
|
|
@focus="shipperChangeFirst"
|
|
|
|
|
/>
|
|
|
|
|
<!-- @change="shipperChange" -->
|
|
|
|
|
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('shipper')">
|
|
|
|
@ -74,8 +74,8 @@
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="consigneeSelect"
|
|
|
|
|
@focus="consigneeChange"
|
|
|
|
|
@change="debounce(consigneeChange, 300, $event)"
|
|
|
|
|
@focus="consigneeChangeFirst"
|
|
|
|
|
/>
|
|
|
|
|
<!-- @change="consigneeChange" -->
|
|
|
|
|
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('consignee')"
|
|
|
|
@ -124,8 +124,8 @@
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="notifyDataArr"
|
|
|
|
|
@select="notifySelect"
|
|
|
|
|
@focus="notifyChange"
|
|
|
|
|
@change="debounce(notifyChange, 300, $event)"
|
|
|
|
|
@focus="notifyChangeFirst"
|
|
|
|
|
/>
|
|
|
|
|
<!-- @change="notifyChange" -->
|
|
|
|
|
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('notifyparty')">保存</a-button>
|
|
|
|
@ -218,7 +218,7 @@
|
|
|
|
|
prop="feeself"
|
|
|
|
|
>
|
|
|
|
|
<!-- {{ details.feeself }} -->
|
|
|
|
|
<a-radio-group size="small" v-model="details.feeself" @change="changeFeeself">
|
|
|
|
|
<a-radio-group size="small" v-model="details.feeself">
|
|
|
|
|
<a-radio size="small" :value="true">
|
|
|
|
|
是
|
|
|
|
|
</a-radio>
|
|
|
|
@ -246,8 +246,8 @@
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="customserSelect"
|
|
|
|
|
@focus="customserChange"
|
|
|
|
|
@change="debounce(customserChange, 300, $event)"
|
|
|
|
|
@focus="customserChangeFirst"
|
|
|
|
|
/>
|
|
|
|
|
<!-- @change="customserChange" -->
|
|
|
|
|
</a-form-model-item>
|
|
|
|
@ -270,8 +270,8 @@
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="truckerSelect"
|
|
|
|
|
@focus="truckerChange"
|
|
|
|
|
@change="debounce(truckerChange, 300, $event)"
|
|
|
|
|
@focus="truckerChangeFirst"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
@ -293,8 +293,8 @@
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="agentidSelect"
|
|
|
|
|
@focus="agentidChange"
|
|
|
|
|
@change="debounce(agentidChange, 300, $event)"
|
|
|
|
|
@focus="agentidChangeFirst"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
@ -317,8 +317,8 @@
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="warehouseSelect"
|
|
|
|
|
@focus="warehouseChange"
|
|
|
|
|
@change="debounce(warehouseChange, 300, $event)"
|
|
|
|
|
@focus="warehouseChangeFirst"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
@ -407,19 +407,15 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="placereceiptid"
|
|
|
|
|
>
|
|
|
|
|
<auto-complete
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.placereceiptid"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="placereceiptDataArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '300px' }"
|
|
|
|
|
@select="placereceiptSelect"
|
|
|
|
|
@focus="placereceiptChange"
|
|
|
|
|
@change="debounce(placereceiptChange, 0, $event)"
|
|
|
|
|
></auto-complete>
|
|
|
|
|
<!-- @change="debounce(placereceiptChange, 100, $event)" -->
|
|
|
|
|
<autoCompleteView
|
|
|
|
|
type="placereceiptid"
|
|
|
|
|
:defaultVal="details.placereceiptid"
|
|
|
|
|
:dropdownStyle="{ width: '300px' }"
|
|
|
|
|
searchApi="GetPortloadlist"
|
|
|
|
|
:searchQuery="{ KeyWord: '' }"
|
|
|
|
|
:showLabel="['ediCode', 'enName']"
|
|
|
|
|
@select="getAutoInputChangeSelect"
|
|
|
|
|
></autoCompleteView>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -444,18 +440,15 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="portloadid"
|
|
|
|
|
>
|
|
|
|
|
<auto-complete
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.portloadid"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="portloadDataArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '300px' }"
|
|
|
|
|
@select="portloadSelect"
|
|
|
|
|
@focus="portloadChange"
|
|
|
|
|
@change="debounce(portloadChange, 0, $event)"
|
|
|
|
|
></auto-complete>
|
|
|
|
|
<autoCompleteView
|
|
|
|
|
type="portloadid"
|
|
|
|
|
:defaultVal="details.portloadid"
|
|
|
|
|
:dropdownStyle="{ width: '300px' }"
|
|
|
|
|
searchApi="GetPortloadlist"
|
|
|
|
|
:searchQuery="{ KeyWord: '' }"
|
|
|
|
|
:showLabel="['ediCode', 'enName']"
|
|
|
|
|
@select="getAutoInputChangeSelect"
|
|
|
|
|
></autoCompleteView>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -468,7 +461,6 @@
|
|
|
|
|
prop="portload"
|
|
|
|
|
>
|
|
|
|
|
<inputView type="portload" size="small" :parentVal="details.portload" @getInputChange="inputChange"/>
|
|
|
|
|
<!-- <a-input :allowClear="true" v-model="details.portload" /> -->
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -480,18 +472,15 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="transportid"
|
|
|
|
|
>
|
|
|
|
|
<auto-complete
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.transportid"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="transportDataArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '300px' }"
|
|
|
|
|
@select="transportSelect"
|
|
|
|
|
@focus="transportChange"
|
|
|
|
|
@change="debounce(transportChange, 0, $event)"
|
|
|
|
|
/>
|
|
|
|
|
<autoCompleteView
|
|
|
|
|
type="transportid"
|
|
|
|
|
:defaultVal="details.transportid"
|
|
|
|
|
:dropdownStyle="{ width: '300px' }"
|
|
|
|
|
searchApi="GetPortlist"
|
|
|
|
|
:searchQuery="{ KeyWord: '' }"
|
|
|
|
|
:showLabel="['ediCode', 'enName']"
|
|
|
|
|
@select="getAutoInputChangeSelect"
|
|
|
|
|
></autoCompleteView>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -504,7 +493,6 @@
|
|
|
|
|
prop="transport"
|
|
|
|
|
>
|
|
|
|
|
<inputView type="transport" size="small" :parentVal="details.transport" @getInputChange="inputChange"/>
|
|
|
|
|
<!-- <a-input :allowClear="true" v-model="details.transport" /> -->
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -516,18 +504,15 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="portdischargeid"
|
|
|
|
|
>
|
|
|
|
|
<auto-complete
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.portdischargeid"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="portdischargeDataArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '300px' }"
|
|
|
|
|
@select="portdischargeSelect"
|
|
|
|
|
@focus="portdischargeChange"
|
|
|
|
|
@change="debounce(portdischargeChange, 0, $event)"
|
|
|
|
|
/>
|
|
|
|
|
<autoCompleteView
|
|
|
|
|
type="portdischargeid"
|
|
|
|
|
:defaultVal="details.portdischargeid"
|
|
|
|
|
:dropdownStyle="{ width: '300px' }"
|
|
|
|
|
searchApi="GetPortlist"
|
|
|
|
|
:searchQuery="{ KeyWord: '' }"
|
|
|
|
|
:showLabel="['ediCode', 'enName']"
|
|
|
|
|
@select="getAutoInputChangeSelect"
|
|
|
|
|
></autoCompleteView>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -540,30 +525,26 @@
|
|
|
|
|
prop="portdischarge"
|
|
|
|
|
>
|
|
|
|
|
<inputView type="portdischarge" size="small" :parentVal="details.portdischarge" @getInputChange="inputChange"/>
|
|
|
|
|
<!-- <a-input :allowClear="true" v-model="details.portdischarge" /> -->
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-model-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="目的代码"
|
|
|
|
|
label="目的地代码"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="destinationid"
|
|
|
|
|
>
|
|
|
|
|
<auto-complete
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.destinationid"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="destinationDataArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '300px' }"
|
|
|
|
|
@select="destinationSelect"
|
|
|
|
|
@focus="destinationChange"
|
|
|
|
|
@change="debounce(destinationChange, 0, $event)"
|
|
|
|
|
/>
|
|
|
|
|
<autoCompleteView
|
|
|
|
|
type="destinationid"
|
|
|
|
|
:defaultVal="details.destinationid"
|
|
|
|
|
:dropdownStyle="{ width: '300px' }"
|
|
|
|
|
searchApi="GetPortlist"
|
|
|
|
|
:searchQuery="{ KeyWord: '' }"
|
|
|
|
|
:showLabel="['ediCode', 'enName']"
|
|
|
|
|
@select="getAutoInputChangeSelect"
|
|
|
|
|
></autoCompleteView>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -576,30 +557,26 @@
|
|
|
|
|
prop="destination"
|
|
|
|
|
>
|
|
|
|
|
<inputView type="destination" size="small" :parentVal="details.destination" @getInputChange="inputChange"/>
|
|
|
|
|
<!-- <a-input :allowClear="true" v-model="details.destination" /> -->
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-model-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="交货代码"
|
|
|
|
|
label="交货地代码"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="placedeliveryid"
|
|
|
|
|
>
|
|
|
|
|
<auto-complete
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.placedeliveryid"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="placedeliveryDataArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '300px' }"
|
|
|
|
|
@select="placedeliverySelect"
|
|
|
|
|
@change="debounce(placedeliveryChange, 0, $event)"
|
|
|
|
|
@focus="placedeliveryChange"
|
|
|
|
|
/>
|
|
|
|
|
<autoCompleteView
|
|
|
|
|
type="placedeliveryid"
|
|
|
|
|
:defaultVal="details.placedeliveryid"
|
|
|
|
|
:dropdownStyle="{ width: '300px' }"
|
|
|
|
|
searchApi="GetPortlist"
|
|
|
|
|
:searchQuery="{ KeyWord: '' }"
|
|
|
|
|
:showLabel="['ediCode', 'enName']"
|
|
|
|
|
@select="getAutoInputChangeSelect"
|
|
|
|
|
></autoCompleteView>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -818,6 +795,7 @@ import { XCard } from '@/components'
|
|
|
|
|
import { AutoComplete } from 'ant-design-vue'
|
|
|
|
|
import inputView from './inputView'
|
|
|
|
|
import textareaView from './textareaView'
|
|
|
|
|
import autoCompleteView from './autoCompleteView'
|
|
|
|
|
import {
|
|
|
|
|
BookingTemplate,
|
|
|
|
|
GetYardlist,
|
|
|
|
@ -834,7 +812,8 @@ export default {
|
|
|
|
|
XCard,
|
|
|
|
|
AutoComplete,
|
|
|
|
|
textareaView,
|
|
|
|
|
inputView
|
|
|
|
|
inputView,
|
|
|
|
|
autoCompleteView
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
details: {
|
|
|
|
@ -884,12 +863,6 @@ export default {
|
|
|
|
|
notifyData: [], // 通知人
|
|
|
|
|
yardData: [], // 场站
|
|
|
|
|
yardSelectData: [],
|
|
|
|
|
portloadData: [], // 装货港
|
|
|
|
|
transportData: [], // 中转港
|
|
|
|
|
portdischargeData: [], // 卸货港
|
|
|
|
|
destinationData: [], // 目的地
|
|
|
|
|
placedeliveryData: [], // 交货地
|
|
|
|
|
placereceiptData: [], // 收货地
|
|
|
|
|
kindpkgsData: [],
|
|
|
|
|
customserData: [], // 报关行
|
|
|
|
|
truckerData: [], // 车队
|
|
|
|
@ -1003,90 +976,6 @@ export default {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
portloadDataArr() {
|
|
|
|
|
if (this.portloadData) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.portloadData.map((item, index) => {
|
|
|
|
|
if (!arr.includes(item.enName)) {
|
|
|
|
|
arr.push(`(${item.ediCode})${item.enName}`)
|
|
|
|
|
// arr.push(item.enName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return arr
|
|
|
|
|
} else {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
transportDataArr() {
|
|
|
|
|
if (this.transportData) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.transportData.map((item, index) => {
|
|
|
|
|
if (!arr.includes(item.enName)) {
|
|
|
|
|
arr.push(`(${item.ediCode})${item.enName}`)
|
|
|
|
|
// arr.push(item.enName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return arr
|
|
|
|
|
} else {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
portdischargeDataArr() {
|
|
|
|
|
if (this.portdischargeData) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.portdischargeData.map((item, index) => {
|
|
|
|
|
if (!arr.includes(item.enName)) {
|
|
|
|
|
arr.push(`(${item.ediCode})${item.enName}`)
|
|
|
|
|
// arr.push(item.enName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return arr
|
|
|
|
|
} else {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
destinationDataArr() {
|
|
|
|
|
if (this.destinationData) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.destinationData.map((item, index) => {
|
|
|
|
|
if (!arr.includes(item.enName)) {
|
|
|
|
|
arr.push(`(${item.ediCode})${item.enName}`)
|
|
|
|
|
// arr.push(item.enName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return arr
|
|
|
|
|
} else {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
placedeliveryDataArr() {
|
|
|
|
|
if (this.placedeliveryData) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.placedeliveryData.map((item, index) => {
|
|
|
|
|
if (!arr.includes(item.enName)) {
|
|
|
|
|
arr.push(`(${item.ediCode})${item.enName}`)
|
|
|
|
|
// arr.push(item.enName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return arr
|
|
|
|
|
} else {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
placereceiptDataArr() {
|
|
|
|
|
if (this.placereceiptData) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.placereceiptData.map((item, index) => {
|
|
|
|
|
if (!arr.includes(item.enName)) {
|
|
|
|
|
arr.push(`(${item.ediCode})${item.enName}`)
|
|
|
|
|
// arr.push(item.enName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return arr
|
|
|
|
|
} else {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
kindpkgsDataArr() {
|
|
|
|
|
if (this.kindpkgsData) {
|
|
|
|
|
const arr = []
|
|
|
|
@ -1254,6 +1143,10 @@ export default {
|
|
|
|
|
shipperChange(value) {
|
|
|
|
|
this.getTemplate(value, 'shipper')
|
|
|
|
|
},
|
|
|
|
|
shipperChangeFirst(value) {
|
|
|
|
|
if (this.shippername) { return false }
|
|
|
|
|
this.getTemplate(value, 'shipper')
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
consigneeSelect(value) {
|
|
|
|
|
this.consigneename = value
|
|
|
|
@ -1264,7 +1157,10 @@ export default {
|
|
|
|
|
consigneeChange(value) {
|
|
|
|
|
this.getTemplate(value, 'consignee')
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
consigneeChangeFirst(value) {
|
|
|
|
|
if (this.consigneename) { return false }
|
|
|
|
|
this.getTemplate(value, 'consignee')
|
|
|
|
|
},
|
|
|
|
|
notifySelect(value) {
|
|
|
|
|
this.notifypartyname = value
|
|
|
|
|
const index = this.notifyDataArr.indexOf(value)
|
|
|
|
@ -1274,6 +1170,10 @@ export default {
|
|
|
|
|
notifyChange(value) {
|
|
|
|
|
this.getTemplate(value, 'notify')
|
|
|
|
|
},
|
|
|
|
|
notifyChangeFirst(value) {
|
|
|
|
|
if (this.notifypartyname) { return false }
|
|
|
|
|
this.getTemplate(value, 'notify')
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 订舱模板 - end
|
|
|
|
|
|
|
|
|
@ -1319,117 +1219,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 场站 - end
|
|
|
|
|
|
|
|
|
|
// 起始港 ( 装货港 / 收货地) - start
|
|
|
|
|
getPortloadlist(name = '', type) {
|
|
|
|
|
GetPortloadlist({
|
|
|
|
|
KeyWord: name
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this[`${type}Data`] = res.data
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
portloadSelect(value) {
|
|
|
|
|
const index = this.portloadDataArr.indexOf(value)
|
|
|
|
|
this.details.portloadid = this.portloadData[index].ediCode
|
|
|
|
|
this.details.portload = this.portloadData[index].enName
|
|
|
|
|
this.details.issueplace = this.portloadData[index].enName
|
|
|
|
|
if (!this.details.prepardat) {
|
|
|
|
|
this.details.prepardat = this.portloadData[index].enName
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
portloadChange(value) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
this.details.portloadid = this.details.portloadid ? this.details.portloadid : ''
|
|
|
|
|
}
|
|
|
|
|
this.getPortloadlist(value, 'portload')
|
|
|
|
|
},
|
|
|
|
|
placereceiptSelect(value) {
|
|
|
|
|
const index = this.placereceiptDataArr.indexOf(value)
|
|
|
|
|
this.details.placereceiptid = this.placereceiptData[index].ediCode
|
|
|
|
|
this.details.placereceipt = this.placereceiptData[index].enName
|
|
|
|
|
},
|
|
|
|
|
placereceiptChange(value) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
this.details.placereceiptid = this.details.placereceiptid ? this.details.placereceiptid : ''
|
|
|
|
|
}
|
|
|
|
|
this.getPortloadlist(value, 'placereceipt')
|
|
|
|
|
},
|
|
|
|
|
// 起始港 ( 装货港 / 收货地) - end
|
|
|
|
|
|
|
|
|
|
// 目的港 ( 卸货港 / 中转港 / 目的地 / 交货地) - start
|
|
|
|
|
getPortlist(name = '', type) {
|
|
|
|
|
GetPortlist({
|
|
|
|
|
KeyWord: name
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this[`${type}Data`] = res.data.splice(0, 50)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 卸货港
|
|
|
|
|
portdischargeSelect(value) {
|
|
|
|
|
const index = this.portdischargeDataArr.indexOf(value)
|
|
|
|
|
this.details.portdischargeid = this.portdischargeData[index].ediCode
|
|
|
|
|
this.details.portdischarge = this.portdischargeData[index].enName
|
|
|
|
|
if (!this.details.payableat) {
|
|
|
|
|
this.details.payableat = this.portdischargeData[index].enName
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
portdischargeChange(value) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
this.details.portdischargeid = this.details.portdischargeid ? this.details.portdischargeid : ''
|
|
|
|
|
}
|
|
|
|
|
this.getPortlist(value, 'portdischarge')
|
|
|
|
|
},
|
|
|
|
|
// 目的地
|
|
|
|
|
destinationSelect(value) {
|
|
|
|
|
const index = this.destinationDataArr.indexOf(value)
|
|
|
|
|
this.details.destinationid = this.destinationData[index].ediCode
|
|
|
|
|
this.details.destination = this.destinationData[index].enName
|
|
|
|
|
},
|
|
|
|
|
destinationChange(value) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
this.details.destinationid = this.details.destinationid ? this.details.destinationid : ''
|
|
|
|
|
}
|
|
|
|
|
this.getPortlist(value, 'destination')
|
|
|
|
|
},
|
|
|
|
|
// 交货地
|
|
|
|
|
placedeliverySelect(value) {
|
|
|
|
|
const index = this.placedeliveryDataArr.indexOf(value)
|
|
|
|
|
this.details.placedeliveryid = this.placedeliveryData[index].ediCode
|
|
|
|
|
this.details.placedelivery = this.placedeliveryData[index].enName
|
|
|
|
|
},
|
|
|
|
|
placedeliveryChange(value) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
this.details.placedeliveryid = this.details.placedeliveryid ? this.details.placedeliveryid : ''
|
|
|
|
|
}
|
|
|
|
|
this.getPortlist(value, 'placedelivery')
|
|
|
|
|
},
|
|
|
|
|
// 中转港
|
|
|
|
|
transportSelect(value) {
|
|
|
|
|
const index = this.transportDataArr.indexOf(value)
|
|
|
|
|
this.details.transportid = this.transportData[index].ediCode
|
|
|
|
|
this.details.transport = this.transportData[index].enName
|
|
|
|
|
},
|
|
|
|
|
transportChange(value) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
this.details.transportid = this.details.transportid ? this.details.transportid : ''
|
|
|
|
|
}
|
|
|
|
|
this.getPortlist(value, 'transport')
|
|
|
|
|
},
|
|
|
|
|
// 目的港 ( 卸货港 / 中转港 / 目的地 / 交货地) - end
|
|
|
|
|
|
|
|
|
|
// 包装 - start
|
|
|
|
|
getPackage(name = '') {
|
|
|
|
|
GetPackage({
|
|
|
|
@ -1485,6 +1274,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.getDjyCustomerpage(value, 'customser', 'customs_broker')
|
|
|
|
|
},
|
|
|
|
|
customserChangeFirst(value) {
|
|
|
|
|
if (this.details.customser) { return false }
|
|
|
|
|
this.getDjyCustomerpage(value, 'customser', 'customs_broker')
|
|
|
|
|
},
|
|
|
|
|
// 报关行 - end
|
|
|
|
|
|
|
|
|
|
// 车队 - start
|
|
|
|
@ -1497,6 +1290,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.getDjyCustomerpage(value, 'trucker', 'fleet')
|
|
|
|
|
},
|
|
|
|
|
truckerChangeFirst(value) {
|
|
|
|
|
if (this.details.trucker) { return false }
|
|
|
|
|
this.getDjyCustomerpage(value, 'trucker', 'fleet')
|
|
|
|
|
},
|
|
|
|
|
// 车队 - end
|
|
|
|
|
|
|
|
|
|
// 国外代理 - start
|
|
|
|
@ -1509,6 +1306,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.getDjyCustomerpage(value, 'agentid', 'out_agent')
|
|
|
|
|
},
|
|
|
|
|
agentidChangeFirst(value) {
|
|
|
|
|
if (this.details.agentid) { return false }
|
|
|
|
|
this.getDjyCustomerpage(value, 'agentid', 'out_agent')
|
|
|
|
|
},
|
|
|
|
|
// 国外代理 - end
|
|
|
|
|
|
|
|
|
|
// 仓库 - start
|
|
|
|
@ -1522,6 +1323,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.getDjyCustomerpage(value, 'warehouse', 'warehouse')
|
|
|
|
|
},
|
|
|
|
|
warehouseChangeFirst(value) {
|
|
|
|
|
if (this.details.warehouse) { return false }
|
|
|
|
|
this.getDjyCustomerpage(value, 'warehouse', 'warehouse')
|
|
|
|
|
},
|
|
|
|
|
// 仓库 - end
|
|
|
|
|
|
|
|
|
|
// 保存模板
|
|
|
|
@ -1972,7 +1777,6 @@ export default {
|
|
|
|
|
const cbmTexyVal = this.details.cbmtotal
|
|
|
|
|
const arr = cbmTexyVal.split(/\n|\r/g)
|
|
|
|
|
let cbm = 0
|
|
|
|
|
console.log('arr:', arr)
|
|
|
|
|
arr.map((item, index) => {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g)
|
|
|
|
|
console.log('分割数组:', regexStr)
|
|
|
|
@ -1982,28 +1786,22 @@ export default {
|
|
|
|
|
cbm = (cbm * 100 + num1 * 100) / 100
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// cbm += ''
|
|
|
|
|
// let res = null
|
|
|
|
|
// const pNum = cbm.split('.')
|
|
|
|
|
// if (!/\./.test(cbm)) {
|
|
|
|
|
// res = cbm + '.00'
|
|
|
|
|
// } else if (pNum[1].length < 2) {
|
|
|
|
|
// res = cbm + '0'
|
|
|
|
|
// } else if (pNum.length > 1) {
|
|
|
|
|
// res = pNum[0] + '.' + pNum[1].substr(0, 1)
|
|
|
|
|
// console.log(pNum[0], pNum[1].substr(0, 1))
|
|
|
|
|
// } else {
|
|
|
|
|
// res = cbm
|
|
|
|
|
// }
|
|
|
|
|
console.log('尺码: ', cbm)
|
|
|
|
|
this.details.cbm = cbm
|
|
|
|
|
this.cbmtotalRes = cbm
|
|
|
|
|
},
|
|
|
|
|
changeFeeself (e) {
|
|
|
|
|
// this.details.feeself = e
|
|
|
|
|
// this.details.feeself = !this.details.feeself
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
// this.$emit('', this.details.feeself)
|
|
|
|
|
// 新增 - 封装模糊搜索框
|
|
|
|
|
getAutoInputChangeSelect ({ type, res }) {
|
|
|
|
|
// 港口公共部分
|
|
|
|
|
if (['placereceiptid', 'portloadid', 'transportid', 'portdischargeid', 'destinationid', 'placedeliveryid'].includes(type)) {
|
|
|
|
|
this.details[type] = res['ediCode']
|
|
|
|
|
this.details[type.replace('id', '')] = res['enName']
|
|
|
|
|
if (type === 'portloadid') {
|
|
|
|
|
this.details.issueplace = res['enName']
|
|
|
|
|
this.details.prepardat = this.details.prepardat ? this.details.prepardat : res['enName']
|
|
|
|
|
} else if (type === 'portdischargeid') {
|
|
|
|
|
this.details.payableat = this.details.payableat ? this.details.payableat : res['enName']
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|