收发通

dev
lilu 2 years ago
parent b93cc162c0
commit 84e48de926

@ -47,23 +47,6 @@ export default {
required: true 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: { methods: {
onSelect(obj) { onSelect(obj) {
this.$emit('menuSelect', obj) this.$emit('menuSelect', obj)

@ -138,9 +138,13 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
> >
<a-input <auto-complete
placeholder="请输入报关行"
v-model="details.customser" v-model="details.customser"
class="customer-input"
:data-source="customserDataArr"
placeholder="请输入报关行"
@select="customserSelect"
@change="customserChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -152,9 +156,13 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
> >
<a-input <auto-complete
placeholder="请输入车队"
v-model="details.trucker" v-model="details.trucker"
class="customer-input"
:data-source="truckerDataArr"
placeholder="请输入车队"
@select="truckerSelect"
@change="truckerChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -166,9 +174,13 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
> >
<a-input <auto-complete
placeholder="请输入国外代理"
v-model="details.agentid" v-model="details.agentid"
class="customer-input"
:data-source="agentidDataArr"
placeholder="请输入国外代理"
@select="agentidSelect"
@change="agentidChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -518,7 +530,7 @@
import { XCard } from '@/components' import { XCard } from '@/components'
import { AutoComplete } from 'ant-design-vue' 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 { export default {
components: { components: {
XCard, XCard,
@ -558,6 +570,9 @@ export default {
placedeliveryData: [], // placedeliveryData: [], //
placereceiptData: [], // placereceiptData: [], //
kindpkgsData: [], kindpkgsData: [],
customserData: [], //
truckerData: [], //
agentidData: [], //
shippername: '', shippername: '',
consigneename: '', consigneename: '',
notifypartyname: '', notifypartyname: '',
@ -722,6 +737,45 @@ export default {
} else { } else {
return [] 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() { created() {
@ -921,6 +975,49 @@ export default {
}, },
// - end // - 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) { saveModel (type) {
this.modelVisible = true this.modelVisible = true

Loading…
Cancel
Save