|
|
@@ -69,12 +69,14 @@
|
|
|
<div class="customer-meta">
|
|
|
<div class="customer-name-row">
|
|
|
<div class="customer-name">{{ customer.customerName }}</div>
|
|
|
- <span class="customer-badge">{{ customer.tag || '潜客' }}</span>
|
|
|
+ <span class="customer-badge" v-if="customer.customerStatusDictValue">{{ getStatusLabel(customer.customerStatusDictValue) }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="customer-subtitle">
|
|
|
+ <span><i class="fas fa-user" style="margin-right: 6px"></i> {{ customer.liaison.name }}{{ customer.liaison.departmentPosition ? ' · ' + customer.liaison.departmentPosition : '' }}</span>
|
|
|
</div>
|
|
|
- <div class="customer-subtitle">{{ customer.role || '采购总监' }} · {{ customer.company }}</div>
|
|
|
<div class="customer-info-row">
|
|
|
<span><i class="fas fa-map-marker-alt"></i> {{ customer.continent }} - {{ customer.country }}</span>
|
|
|
- <span><i class="fas fa-dollar-sign"></i> {{ customer.annualPurchase }}</span>
|
|
|
+ <span v-if="customer.customerCompany.industry">{{ customer.customerCompany.industry }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -83,9 +85,9 @@
|
|
|
<div class="customer-score">{{ customer.score }}</div>
|
|
|
<div class="customer-score-label">意向分</div>
|
|
|
</div>
|
|
|
- <div class="right-btn">
|
|
|
- <el-icon v-if="modalType == 'add'" @click="addCustomer(customer)"><Plus /></el-icon>
|
|
|
- <el-icon v-else @click="deleteCustomer(customer)"><Delete /></el-icon>
|
|
|
+ <div class="right-btn" @click="handleBtn(customer)">
|
|
|
+ <el-icon v-if="modalType == 'add'"><Plus /></el-icon>
|
|
|
+ <el-icon v-else><Delete /></el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -158,6 +160,8 @@
|
|
|
customerParams.value.country = value ? value[1] : ''
|
|
|
}
|
|
|
|
|
|
+ const getStatusLabel = (type) => ({ 1: '暂无需求', 2: '潜在客户', 3: '意向客户', 4: '忠诚客户', 11: '了解产品', 22: '正在跟进', 33: '寄样试用', 44: '意向购买', 55: '准备付款', 66: '暂时搁置' }[type] || type)
|
|
|
+
|
|
|
const customers = ref([])
|
|
|
const total = ref(0)
|
|
|
const getCustomerData = () => {
|
|
|
@@ -206,10 +210,19 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const handleBtn = (customer) => {
|
|
|
+ if(modalType.value == 'add'){
|
|
|
+ addCustomer(customer)
|
|
|
+ }else{
|
|
|
+ deleteCustomer(customer)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
const deleteCustomer = (data) => {
|
|
|
- customers.value = customers.value.filter(item => item.id != data.id)
|
|
|
+ filterData.value = filterData.value.filter(item => item.id != data.id)
|
|
|
+ customers.value = filterData.value.slice((customerParams.value.pageIndex - 1) * customerParams.value.pageSize, customerParams.value.pageIndex * customerParams.value.pageSize)
|
|
|
allData.value = allData.value.filter(item => item.id != data.id)
|
|
|
- total.value = allData.value.length
|
|
|
+ total.value = filterData.value.length
|
|
|
emits('delete', data)
|
|
|
}
|
|
|
|