|
|
@@ -52,6 +52,33 @@
|
|
|
<el-option label="D级" value="4" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="" prop="customerClassify">
|
|
|
+ <el-select v-model="customerClassify" clearable placeholder="客户分类">
|
|
|
+ <el-option label="公海客户" value="1" />
|
|
|
+ <el-option label="无效客户" value="2" />
|
|
|
+ <el-option label="重点客户" value="3" />
|
|
|
+ <el-option label="成交客户" value="4" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" prop="customerSourceDictValue">
|
|
|
+ <el-select v-model="customerParams.customerSourceDictValue" clearable placeholder="客户来源">
|
|
|
+ <el-option label="搜索引擎(例:Google)" value="1" />
|
|
|
+ <el-option label="公司网站live chat咨询" value="2" />
|
|
|
+ <el-option label="公司网站留言" value="3" />
|
|
|
+ <el-option label="sales信箱" value="4" />
|
|
|
+ <el-option label="德国Embedded展会" value="5" />
|
|
|
+ <el-option label="CES展会" value="6" />
|
|
|
+ <el-option label="B2ClT" value="7" />
|
|
|
+ <el-option label="CEBIT展会" value="8" />
|
|
|
+ <el-option label="中国制造网" value="9" />
|
|
|
+ <el-option label="Computex展会" value="10" />
|
|
|
+ <el-option label="客户介绍" value="11" />
|
|
|
+ <el-option label="社交媒体(例:Linkedln)" value="12" />
|
|
|
+ <el-option label="SalesForce" value="13" />
|
|
|
+ <el-option label="香港电子展" value="14" />
|
|
|
+ <el-option label="官网注册用户" value="15" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div class="btn-div">
|
|
|
<button class="btn btn-primary" @click="searchCustomer">
|
|
|
@@ -82,7 +109,7 @@
|
|
|
</div>
|
|
|
<div class="customer-card-right">
|
|
|
<div class="card-right" v-if="customer.customerAnalysisResult">
|
|
|
- <div class="customer-score">{{ customer.customerAnalysisResult.potentialScore }}</div>
|
|
|
+ <div class="customer-score">{{ customer.customerAnalysisResult.potentialScore || 0 }}</div>
|
|
|
<div class="customer-score-label">意向分</div>
|
|
|
</div>
|
|
|
<div class="right-btn" @click="handleBtn(customer)">
|
|
|
@@ -142,13 +169,17 @@
|
|
|
customerStatusDictValue: '',
|
|
|
customerTypeDictValue: '',
|
|
|
customerLevelDictValue: '',
|
|
|
- liaisonName: ''
|
|
|
+ liaisonName: '',
|
|
|
+ customerSourceDictValue: ''
|
|
|
}
|
|
|
+ customerClassify.value = ''
|
|
|
if(type == 'detail'){
|
|
|
filterData.value = data
|
|
|
allData.value = data
|
|
|
customers.value = data.slice(0, 10)
|
|
|
total.value = data.length
|
|
|
+ }else{
|
|
|
+ getCustomerData()
|
|
|
}
|
|
|
showCustomerPreview.value = true
|
|
|
}
|
|
|
@@ -161,8 +192,10 @@
|
|
|
customerStatusDictValue: '',
|
|
|
customerTypeDictValue: '',
|
|
|
customerLevelDictValue: '',
|
|
|
- liaisonName: ''
|
|
|
+ liaisonName: '',
|
|
|
+ customerSourceDictValue: ''
|
|
|
})
|
|
|
+ const customerClassify = ref('')
|
|
|
const regionValue = ref([])
|
|
|
const getRegion = (value) => {
|
|
|
customerParams.value.country = value ? value[1] : ''
|
|
|
@@ -173,7 +206,18 @@
|
|
|
const customers = ref([])
|
|
|
const total = ref(0)
|
|
|
const getCustomerData = () => {
|
|
|
- getTradeCustomer(customerParams.value).then(res => {
|
|
|
+ let params = JSON.parse(JSON.stringify(customerParams.value))
|
|
|
+ if(customerClassify.value == 1) {
|
|
|
+ params.hasPublicCustomer = 1
|
|
|
+ }else if(customerClassify.value == 2) {
|
|
|
+ params.hasGarbageCustomer = 1
|
|
|
+ }else if(customerClassify.value == 3) {
|
|
|
+ params.hasFollowCustomer = 1
|
|
|
+ }else if(customerClassify.value == 4) {
|
|
|
+ params.hasOrderForm = 1
|
|
|
+ params.hasPublicCustomer = 0
|
|
|
+ }
|
|
|
+ getTradeCustomer(params).then(res => {
|
|
|
customers.value = res.result.records || []
|
|
|
total.value = res.result.total || 0
|
|
|
})
|
|
|
@@ -199,7 +243,12 @@
|
|
|
const typeMatch = customerParams.value.customerTypeDictValue ? (item.customerTypeDictValue == customerParams.value.customerTypeDictValue) : true
|
|
|
const levelMatch = customerParams.value.customerLevelDictValue ? (item.customerLevelDictValue == customerParams.value.customerLevelDictValue) : true
|
|
|
const countryMatch = customerParams.value.country ? (item.country == customerParams.value.country) : true
|
|
|
- return blurryMatch && liaisonMatch && statusMatch && typeMatch && levelMatch && countryMatch
|
|
|
+ const sourceMatch = customerParams.value.customerSourceDictValue ? (item.customerSourceDictValue == customerParams.value.customerSourceDictValue) : true
|
|
|
+ const publicMatch = customerClassify.value == 1 ? (item.hasPublicCustomer == 1) : true
|
|
|
+ const garbageMatch = customerClassify.value == 2 ? (item.hasGarbageCustomer == 1) : true
|
|
|
+ const followMatch = customerClassify.value == 3 ? (item.hasFollowCustomer == 1) : true
|
|
|
+ const orderFormMatch = customerClassify.value == 4 ? (item.hasOrderForm == 1 && item.hasPublicCustomer == 0) : true
|
|
|
+ return blurryMatch && liaisonMatch && statusMatch && typeMatch && levelMatch && countryMatch && sourceMatch && publicMatch && garbageMatch && followMatch && orderFormMatch
|
|
|
})
|
|
|
customers.value = filterData.value.slice(0, 10)
|
|
|
total.value = filterData.value.length
|
|
|
@@ -209,9 +258,9 @@
|
|
|
const resetCustomerParams = () => {
|
|
|
customerFormRef.value.resetFields()
|
|
|
regionValue.value = []
|
|
|
+ customerClassify.value = ''
|
|
|
if(modalType.value == 'add'){
|
|
|
- customers.value = []
|
|
|
- total.value = 0
|
|
|
+ getCustomerData()
|
|
|
}else{
|
|
|
filterData.value = allData.value
|
|
|
customers.value = allData.value.slice(0, 10)
|