收发通

dev
lilu 2 years ago
parent b93cc162c0
commit 84e48de926

@ -47,23 +47,6 @@ export default {
required: true
}
},
mounted() {
const data = [
{
name: 'TableDemo',
path: '/tableDemo',
hidden: false,
pid: 0,
id: 183183,
meta: {
title: '表格示例',
show: false
},
component: 'TableDemo'
}
]
this.menus.push(...data)
},
methods: {
onSelect(obj) {
this.$emit('menuSelect', obj)

@ -138,9 +138,13 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入报关行"
<auto-complete
v-model="details.customser"
class="customer-input"
:data-source="customserDataArr"
placeholder="请输入报关行"
@select="customserSelect"
@change="customserChange"
/>
</a-form-item>
</a-col>
@ -152,9 +156,13 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入车队"
<auto-complete
v-model="details.trucker"
class="customer-input"
:data-source="truckerDataArr"
placeholder="请输入车队"
@select="truckerSelect"
@change="truckerChange"
/>
</a-form-item>
</a-col>
@ -166,9 +174,13 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入国外代理"
<auto-complete
v-model="details.agentid"
class="customer-input"
:data-source="agentidDataArr"
placeholder="请输入国外代理"
@select="agentidSelect"
@change="agentidChange"
/>
</a-form-item>
</a-col>
@ -518,7 +530,7 @@
import { XCard } from '@/components'
import { AutoComplete } from 'ant-design-vue'
import { BookingTemplate, GetYardlist, GetPortloadlist, GetPortlist, GetPackage, BookingTemplateAdd } from '@/api/modular/main/BookingLedger'
import { BookingTemplate, GetYardlist, GetPortloadlist, GetPortlist, GetPackage, BookingTemplateAdd, DjyCustomerpage } from '@/api/modular/main/BookingLedger'
export default {
components: {
XCard,
@ -558,6 +570,9 @@ export default {
placedeliveryData: [], //
placereceiptData: [], //
kindpkgsData: [],
customserData: [], //
truckerData: [], //
agentidData: [], //
shippername: '',
consigneename: '',
notifypartyname: '',
@ -722,6 +737,45 @@ export default {
} else {
return []
}
},
customserDataArr () {
if (this.customserData) {
const arr = []
this.customserData.map((item, index) => {
if (!arr.includes(item.shortName)) {
arr.push(item.shortName)
}
})
return arr
} else {
return []
}
},
truckerDataArr () {
if (this.truckerData) {
const arr = []
this.truckerData.map((item, index) => {
if (!arr.includes(item.shortName)) {
arr.push(item.shortName)
}
})
return arr
} else {
return []
}
},
agentidDataArr () {
if (this.agentidData) {
const arr = []
this.agentidData.map((item, index) => {
if (!arr.includes(item.shortName)) {
arr.push(item.shortName)
}
})
return arr
} else {
return []
}
}
},
created() {
@ -921,6 +975,49 @@ export default {
},
// - end
// - start
getDjyCustomerpage (name = '', type, key) {
DjyCustomerpage({
SearchValue: name,
PropString: key
})
.then((res) => {
if (res.code === 200) {
this[`${type}Data`] = res.data.rows
console.log(this[`${type}DataArr`])
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
})
},
customserSelect (value) {
this.details.customser = value
},
customserChange(value) {
this.getDjyCustomerpage(value, 'customser', 'customs_broker')
},
// - end
// - start
truckerSelect (value) {
this.details.trucker = value
},
truckerChange(value) {
this.getDjyCustomerpage(value, 'trucker', 'fleet')
},
// - end
// - start
agentidSelect (value) {
this.details.agentid = value
},
agentidChange(value) {
this.getDjyCustomerpage(value, 'agentid', 'out_agent')
},
// - end
//
saveModel (type) {
this.modelVisible = true

Loading…
Cancel
Save