Commit 6d2fc9c9 authored by houjn@hikoon.cn's avatar houjn@hikoon.cn

空运agent同步海运试试

parent 0c88c1e6
<template>
<div>
<el-select
filterable
:value="value === 0 ? undefined : value"
@change="change"
v-bind="$attrs"
clearable
>
<el-option
v-for="supplier in getSuppliers"
:key="supplier.id"
:label="$t('公司名称:')+$l(supplier, 'company')+$t(',地址:')+supplier.externalBackVO.receiveAddress+$t(',邮箱:')+supplier.externalBackVO.receiveEmail+$t(',品名:')+supplier.externalBackVO.goodName+$t(',From M No:')+supplier.externalBackVO
.fromNo+$t(',BA No:')+supplier.externalBackVO
.baNo"
:value="supplier.id"
></el-option>
</el-select>
</div>
</template>
<script>
/**
* 供应商
*/
export default {
name: "supplierSelect",
props: {
companyType: String,
value: Number,
allSupplier: Array,
areaType: {
type: Number,
default: 0
},
},
model: {
prop: "value",
event: "change",
},
data() {
return {};
},
computed: {
getSuppliers() {
let allSupplier = this.allSupplier.filter(
(item) => item.areaType == this.areaType
);
allSupplier.forEach(map=>{
map.externalBackVO.receiveAddress = map.externalBackVO.receiveAddress?map.externalBackVO.receiveAddress: ''
map.externalBackVO.receiveEmail = map.externalBackVO.receiveEmail?map.externalBackVO.receiveEmail:''
map.externalBackVO.goodName = map.externalBackVO.goodName?map.externalBackVO.goodName:''
map.externalBackVO.fromNo = map.externalBackVO.fromNo?map.externalBackVO.fromNo:''
map.externalBackVO.baNo = map.externalBackVO.baNo?map.externalBackVO.baNo:''
})
if(this.areaType == 1 || !this.companyType) return allSupplier;
return allSupplier.filter((item) =>
item.companyTypes.includes(this.companyType)
);
},
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment