Commit 93820aca authored by 余金瑶's avatar 余金瑶

客户列表字段

parent 5dc83634
...@@ -4676,7 +4676,7 @@ ...@@ -4676,7 +4676,7 @@
"年度发货量": "Shipment yearly", "年度发货量": "Shipment yearly",
"年度发货次数": "Number of shipments yearly", "年度发货次数": "Number of shipments yearly",
"主要竞争对手": "Major competitors", "主要竞争对手": "Major competitors",
"控无收货人": "Control not consignee", "控无收货人": "Control not consignee",
"默认付款": "Default payment", "默认付款": "Default payment",
"默认开票": "Default Billing", "默认开票": "Default Billing",
"请选择业务国家": "Please select customer operating country", "请选择业务国家": "Please select customer operating country",
...@@ -4695,6 +4695,8 @@ ...@@ -4695,6 +4695,8 @@
"增值服务": "Added services", "增值服务": "Added services",
"开启会员积分系统": "Enable member points system", "开启会员积分系统": "Enable member points system",
"是否确认{val}会员积分系统": "Confirm whether to {val} the member points system", "是否确认{val}会员积分系统": "Confirm whether to {val} the member points system",
"入仓确认": "Entry confirm",
"商品类别": "Product type",
"跟进状态": "Follow-up status", "跟进状态": "Follow-up status",
"上一级跟进单": "Follow-up parent number", "上一级跟进单": "Follow-up parent number",
"跟进结果": "Follow-up result", "跟进结果": "Follow-up result",
......
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
"年度发货量": "年度发货量", "年度发货量": "年度发货量",
"年度发货次数": "年度发货次数", "年度发货次数": "年度发货次数",
"主要竞争对手": "主要竞争对手", "主要竞争对手": "主要竞争对手",
"控无收货人": "控制无收货人", "控无收货人": "控制无收货人",
"默认付款": "默认付款", "默认付款": "默认付款",
"默认开票": "默认开票", "默认开票": "默认开票",
"请选择业务国家": "请选择业务国家", "请选择业务国家": "请选择业务国家",
......
...@@ -446,7 +446,7 @@ ...@@ -446,7 +446,7 @@
:placeholder="$t('请选择产品类别')" :placeholder="$t('请选择产品类别')"
> >
<el-option <el-option
:label="item.titleZh" :label="isChinese ? item.titleZh : item.titleEn"
:value="item.id" :value="item.id"
v-for="item in productTypeList" v-for="item in productTypeList"
:key="item.id" :key="item.id"
......
This diff is collapsed.
This diff is collapsed.
...@@ -289,6 +289,12 @@ ...@@ -289,6 +289,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('入仓确认')" v-show="showSearch">
<el-select clearable v-model="queryParams.arrivalConfirm">
<el-option :label="$t('是')" :value="1" />
<el-option :label="$t('否')" :value="0" />
</el-select>
</el-form-item>
<el-form-item :label="$t('控货无收货人')" v-show="showSearch"> <el-form-item :label="$t('控货无收货人')" v-show="showSearch">
<el-switch v-model="queryParams.noConsignee" /> <el-switch v-model="queryParams.noConsignee" />
</el-form-item> </el-form-item>
...@@ -391,10 +397,6 @@ ...@@ -391,10 +397,6 @@
<!-- 列表 --> <!-- 列表 -->
<el-table ref="multipleTable" v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table ref="multipleTable" v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('客户编号')" align="center" prop="number" > <el-table-column :label="$t('客户编号')" align="center" prop="number" >
<template v-slot="{row}"> <template v-slot="{row}">
{{row.number}} {{row.number}}
...@@ -405,12 +407,6 @@ ...@@ -405,12 +407,6 @@
<p style="display:inline-block;white-space: pre-wrap;">{{$l(row, 'name')}}</p> <p style="display:inline-block;white-space: pre-wrap;">{{$l(row, 'name')}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" :prop=" isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn' "></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status"> <el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
...@@ -425,15 +421,121 @@ ...@@ -425,15 +421,121 @@
</contacts> </contacts>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180"> <el-table-column :label="$t('客户类别')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.CUSTOMER_TYPE"
:value="scope.row.type"
/>
</template>
</el-table-column>
<el-table-column :label="$t('角色')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.CUSTOMER_ROLE"
:value="scope.row.roles"
/>
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
<el-table-column :label="$t('国籍')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column :label="$t('出货渠道')" align="center">
<template slot-scope="{ row }">
{{ channel(row.transportType) }}
</template>
</el-table-column>
<el-table-column :label="$t('客户来源')">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.CUSTOMER_SOURCE"
:value="scope.row.source"
/>
</template>
</el-table-column>
<el-table-column :label="$t('业务国家')">
<template slot-scope="{ row }">
{{ getBusiCountryNames(row.busiCountryIds) }}
</template>
</el-table-column>
<el-table-column :label="$t('常用提货网点')">
<template slot-scope="{ row }">
{{ getPickupPointNames(row.pickupPoints) }}
</template>
</el-table-column>
<el-table-column :label="$t('年度发货量')" align="center">
<template slot-scope="{ row }">
{{ row.weightYearly }}
</template>
</el-table-column>
<el-table-column :label="$t('主营类别')">
<template slot-scope="{ row }">
{{ getProductTypeNames(row.productType) }}
</template>
</el-table-column>
<el-table-column :label="$t('主要竞争对手')" prop="competitorNames">
</el-table-column>
<el-table-column :label="$t('年度发货次数')" align="center">
<template slot-scope="{ row }">
{{ row.numYearly }}
</template>
</el-table-column>
<el-table-column :label="$t('推介人')">
<template slot-scope="{ row }">
{{ getPromoterName(row.promoter) }}
</template>
</el-table-column>
<el-table-column :label="$t('入公海时间')" align="center" width="160">
<template v-slot="{ row }">
{{ parseTime( row.enterOpenSeaTime ? row.enterOpenSeaTime : row.estimateEnterOpenSeaTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('入仓确认')" align="center">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.arrivalConfirm == 1">{{ $t('') }}</el-tag>
<el-tag type="info">{{ $t('') }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('控货无收货人')" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.noConsignee" disabled />
</template>
</el-table-column>
<el-table-column :label="$t('默认付款')" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.defaultPay" disabled />
</template>
</el-table-column>
<el-table-column :label="$t('归属时间')" width="160" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.customerServiceConfirmedTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('首次成交时间')" width="160" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.firstDealTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('获取方式')" align="center">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.CUSTOMER_GET_METHOD"
:value="scope.row.getMethods"
/>
</template>
</el-table-column>
<el-table-column :label="$t('创建人')" prop="createUsername" align="center">
</el-table-column>
<el-table-column :label="$t('创建时间')" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"> <el-table-column :label="$t('最后更新时间')" align="center" width="160">
<template slot-scope="scope">
<span >{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column> <el-table-column width="200px" :label="$t('操作')" align="center" fixed="right">
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="'/customer/query/' + scope.row.id"> <router-link :to="'/customer/query/' + scope.row.id">
<el-button v-has-permi="['ecw:customer:distribution-view']" size="mini" style="margin-right: 10px" type="text" >查看</el-button> <el-button v-has-permi="['ecw:customer:distribution-view']" size="mini" style="margin-right: 10px" type="text" >查看</el-button>
...@@ -812,6 +914,76 @@ export default { ...@@ -812,6 +914,76 @@ export default {
}) })
}).catch(() => {}); }).catch(() => {});
}, },
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.countryList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.countryList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getPickupPointNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.getNodeLists.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getProductTypeNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.productTypeList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getPromoterName(id) {
if (id) {
let strName = ''
for(const item of this.customerSelectFn) {
if (item.id == id) {
strName = item.name
break
}
}
return strName
} else {
return null
}
}
}, },
watch:{ watch:{
selectCustomerList(val){ selectCustomerList(val){
...@@ -825,6 +997,16 @@ export default { ...@@ -825,6 +997,16 @@ export default {
isChinese(){ isChinese(){
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === 'zh_CN'
}, },
channel() {
return (val) => {
return !!val
? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)
.filter((i) => (val.split(",") || []).includes(i.value))
.map((i) => (this.isChinese ? i.label : i.labelEn))
.join("")
: "";
};
},
customerSelectFn() { customerSelectFn() {
if (this.recommended.length > 0) { if (this.recommended.length > 0) {
let i = this.customerSelect.find( let i = this.customerSelect.find(
......
...@@ -308,6 +308,12 @@ ...@@ -308,6 +308,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('入仓确认')" v-show="showSearch">
<el-select clearable v-model="queryParams.arrivalConfirm">
<el-option :label="$t('是')" :value="1" />
<el-option :label="$t('否')" :value="0" />
</el-select>
</el-form-item>
<el-form-item :label="$t('控货无收货人')" v-show="showSearch"> <el-form-item :label="$t('控货无收货人')" v-show="showSearch">
<el-switch v-model="queryParams.noConsignee" /> <el-switch v-model="queryParams.noConsignee" />
</el-form-item> </el-form-item>
...@@ -431,19 +437,21 @@ ...@@ -431,19 +437,21 @@
:data="list" :data="list"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55"> </el-table-column> <el-table-column :label="$t('客户编号')" align="center" fixed>
<el-table-column :label="$t('客户编号')" align="center" prop="number">
<template v-slot="{ row }"> <template v-slot="{ row }">
{{ row.number }} <router-link :to="`/customer/query/${row.id}`" class="link-type">
{{ row.number }}
</router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name"> <el-table-column :label="$t('客户名称')" align="center" fixed>
<template v-slot="{ row }"> <template v-slot="{ row }">
<p style="display: inline-block; white-space: pre-wrap"> <p style="display: inline-block; white-space: pre-wrap">
{{ $l(row, "name") }} {{ $l(row, "name") }}
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<!--
<el-table-column <el-table-column
:label="$t('客户等级')" :label="$t('客户等级')"
align="center" align="center"
...@@ -465,6 +473,15 @@ ...@@ -465,6 +473,15 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
-->
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.CUSTOMER_STATUS"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column <el-table-column
:label="$t('主联系人')" :label="$t('主联系人')"
prop="defaultContactName" prop="defaultContactName"
...@@ -477,38 +494,120 @@ ...@@ -477,38 +494,120 @@
</contacts> </contacts>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('客户类别')" align="center" prop="status">
:label="$t('创建时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <dict-tag
:type="DICT_TYPE.CUSTOMER_TYPE"
:value="scope.row.type"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('角色')" align="center" prop="status">
:label="$t('预计入公海时间')" <template slot-scope="scope">
align="center" <dict-tag
prop="createTime" :type="DICT_TYPE.CUSTOMER_ROLE"
width="180" :value="scope.row.roles"
> />
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
<el-table-column :label="$t('国籍')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column :label="$t('出货渠道')" align="center">
<template slot-scope="{ row }">
{{ channel(row.transportType) }}
</template>
</el-table-column>
<el-table-column :label="$t('客户来源')">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.CUSTOMER_SOURCE"
:value="scope.row.source"
/>
</template>
</el-table-column>
<el-table-column :label="$t('业务国家')">
<template slot-scope="{ row }">
{{ getBusiCountryNames(row.busiCountryIds) }}
</template>
</el-table-column>
<el-table-column :label="$t('常用提货网点')">
<template slot-scope="{ row }">
{{ getPickupPointNames(row.pickupPoints) }}
</template>
</el-table-column>
<el-table-column :label="$t('年度发货量')" align="center">
<template slot-scope="{ row }">
{{ row.weightYearly }}
</template>
</el-table-column>
<el-table-column :label="$t('主营类别')">
<template slot-scope="{ row }">
{{ getProductTypeNames(row.productType) }}
</template>
</el-table-column>
<el-table-column :label="$t('主要竞争对手')" prop="competitorNames">
</el-table-column>
<el-table-column :label="$t('年度发货次数')" align="center">
<template slot-scope="{ row }">
{{ row.numYearly }}
</template>
</el-table-column>
<el-table-column :label="$t('推介人')">
<template slot-scope="{ row }">
{{ getPromoterName(row.promoter) }}
</template>
</el-table-column>
<el-table-column :label="$t('入公海时间')" align="center" width="160">
<template v-slot="{ row }"> <template v-slot="{ row }">
<span>{{ parseTime(row.estimateEnterOpenSeaTime) }}</span> {{ parseTime( row.enterOpenSeaTime ? row.enterOpenSeaTime : row.estimateEnterOpenSeaTime)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('入仓确认')" align="center">
:label="$t('客户经理')" <template slot-scope="scope">
align="center" <el-tag type="success" v-if="scope.row.arrivalConfirm == 1">{{ $t('') }}</el-tag>
prop="customerServiceName" <el-tag type="info">{{ $t('') }}</el-tag>
> </template>
</el-table-column>
<el-table-column :label="$t('控货无收货人')" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.noConsignee" disabled />
</template>
</el-table-column>
<el-table-column :label="$t('默认付款')" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.defaultPay" disabled />
</template>
</el-table-column>
<el-table-column :label="$t('归属时间')" width="160" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.customerServiceConfirmedTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('首次成交时间')" width="160" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.firstDealTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('获取方式')" align="center">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.CUSTOMER_GET_METHOD"
:value="scope.row.getMethods"
/>
</template>
</el-table-column>
<el-table-column :label="$t('创建人')" prop="createUsername" align="center">
</el-table-column>
<el-table-column :label="$t('创建时间')" align="center" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('最后更新时间')" align="center" width="160">
<template slot-scope="scope">
<span >{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column
:label="$t('国家')"
align="center"
prop="country"
:formatter="countryFormatter"
></el-table-column>
<el-table-column <el-table-column
width="200px" width="200px"
:label="$t('操作')" :label="$t('操作')"
...@@ -643,6 +742,16 @@ export default { ...@@ -643,6 +742,16 @@ export default {
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN";
}, },
channel() {
return (val) => {
return !!val
? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)
.filter((i) => (val.split(",") || []).includes(i.value))
.map((i) => (this.isChinese ? i.label : i.labelEn))
.join("")
: "";
};
},
customerSelectFn() { customerSelectFn() {
if (this.recommended.length > 0) { if (this.recommended.length > 0) {
let i = this.customerSelect.find( let i = this.customerSelect.find(
...@@ -1088,6 +1197,62 @@ export default { ...@@ -1088,6 +1197,62 @@ export default {
this.$refs["customerComplaint"].handleAdd(); this.$refs["customerComplaint"].handleAdd();
}); });
}, },
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.countryList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getPickupPointNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.getNodeLists.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getProductTypeNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.productTypeList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getPromoterName(id) {
if (id) {
let strName = ''
for(const item of this.customerSelectFn) {
if (item.id == id) {
strName = item.name
break
}
}
return strName
} else {
return null
}
}
}, },
watch: { watch: {
selectCustomerList(val) { selectCustomerList(val) {
......
This diff is collapsed.
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