|
@@ -1,11 +1,22 @@
|
|
<template>
|
|
<template>
|
|
<div class="hui-flex hui-content">
|
|
<div class="hui-flex hui-content">
|
|
|
|
+ <div class="customer-test">
|
|
|
|
+ <div class="test-item" v-for="(item,index) in $field.field.customerType" :key="item.id">
|
|
|
|
+ <div class="name">{{item.name}}</div>
|
|
|
|
+ <div class="label alibaba color-cyan">{{countItem(item)}}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="customer-line"></div>
|
|
<div class="hui-content-title">
|
|
<div class="hui-content-title">
|
|
<div class="hui-title-item active">客户列表</div>
|
|
<div class="hui-title-item active">客户列表</div>
|
|
</div>
|
|
</div>
|
|
<div class="hui-flex-box hui-flex hui-table">
|
|
<div class="hui-flex-box hui-flex hui-table">
|
|
|
|
+ <list-filter type="customer" @filter="filterInit"></list-filter>
|
|
<div class="hui-content-insert">
|
|
<div class="hui-content-insert">
|
|
<el-button type="primary" size="medium" @click="insertCustomer">新增客户</el-button>
|
|
<el-button type="primary" size="medium" @click="insertCustomer">新增客户</el-button>
|
|
|
|
+ <el-button type="info" size="medium" @click="downloadFile">标准模板下载</el-button>
|
|
|
|
+ <el-button type="info" size="medium" @click="$refs.upload.reloadUpload()">批量导入</el-button>
|
|
|
|
+ <customer-upload ref="upload" v-show="false" @changeFile="init"></customer-upload>
|
|
</div>
|
|
</div>
|
|
<div class="hui-flex-box">
|
|
<div class="hui-flex-box">
|
|
<el-table :data="tableData" row-key="id" border height="100%">
|
|
<el-table :data="tableData" row-key="id" border height="100%">
|
|
@@ -14,7 +25,14 @@
|
|
<div style="text-align: center;">{{scope.$index + 1}}</div>
|
|
<div style="text-align: center;">{{scope.$index + 1}}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="客户类型">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{$field.findTypeName('customerType',scope.row.type)}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="客户名称" prop="name"></el-table-column>
|
|
<el-table-column label="客户名称" prop="name"></el-table-column>
|
|
|
|
+ <el-table-column label="客户行业" prop="customerIndustry"></el-table-column>
|
|
|
|
+ <el-table-column label="需求区间" prop="demand"></el-table-column>
|
|
<el-table-column label="公海客户" width="100">
|
|
<el-table-column label="公海客户" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="hui-table-operation">
|
|
<div class="hui-table-operation">
|
|
@@ -27,8 +45,9 @@
|
|
<el-table-column label="跟进记录" width="100">
|
|
<el-table-column label="跟进记录" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="hui-table-operation">
|
|
<div class="hui-table-operation">
|
|
- <span class="table-operation"
|
|
|
|
- @click="lookCustomer(scope.row,'followUpRecord')">查看</span>
|
|
|
|
|
|
+ <span class="table-operation" @click="lookCustomer(scope.row,'followUpRecord')">
|
|
|
|
+ 查看
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -97,7 +116,8 @@
|
|
import {
|
|
import {
|
|
getCustomerListByPage,
|
|
getCustomerListByPage,
|
|
deleteCustomerById,
|
|
deleteCustomerById,
|
|
- updateCustomer
|
|
|
|
|
|
+ updateCustomer,
|
|
|
|
+ getCustomerCount
|
|
} from '@/httpApi/crm'
|
|
} from '@/httpApi/crm'
|
|
import {
|
|
import {
|
|
testPhone
|
|
testPhone
|
|
@@ -105,7 +125,9 @@
|
|
import edit from '@/components/work/crm/customer/edit'
|
|
import edit from '@/components/work/crm/customer/edit'
|
|
import detail from '@/components/work/crm/customer/detail'
|
|
import detail from '@/components/work/crm/customer/detail'
|
|
import followUpRecordDetail from '@/components/work/crm/customer/followUpRecordDetail'
|
|
import followUpRecordDetail from '@/components/work/crm/customer/followUpRecordDetail'
|
|
-
|
|
|
|
|
|
+ import listFilter from '@/components/common/listFilter'
|
|
|
|
+ import customerUpload from '@/components/work/crm/customer/customerUpload'
|
|
|
|
+ import config from '@/config'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -117,26 +139,51 @@
|
|
detailId: '',
|
|
detailId: '',
|
|
isUpdate: false,
|
|
isUpdate: false,
|
|
drawer: false,
|
|
drawer: false,
|
|
- type: 'customer'
|
|
|
|
|
|
+ type: 'customer',
|
|
|
|
+ filterOption: {},
|
|
|
|
+ countBox: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.init();
|
|
this.init();
|
|
|
|
+ getCustomerCount({
|
|
|
|
+ organizationId: this.$store.getters.organization.id,
|
|
|
|
+ userId: this.$store.getters.user.id
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.state) {
|
|
|
|
+ this.countBox = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
- getCustomerListByPage({
|
|
|
|
|
|
+ let postData = {
|
|
currPage: this.currPage,
|
|
currPage: this.currPage,
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
organizationId: this.$store.getters.organization.id,
|
|
organizationId: this.$store.getters.organization.id,
|
|
userId: this.$store.getters.user.id
|
|
userId: this.$store.getters.user.id
|
|
- }).then(res => {
|
|
|
|
|
|
+ }
|
|
|
|
+ postData = Object.assign(postData, this.filterOption);
|
|
|
|
+ getCustomerListByPage(postData).then(res => {
|
|
if (res.state) {
|
|
if (res.state) {
|
|
this.tableData = res.data.dataList;
|
|
this.tableData = res.data.dataList;
|
|
this.totalCount = res.data.totalCount;
|
|
this.totalCount = res.data.totalCount;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ downloadFile() {
|
|
|
|
+ window.location.href = config.baseURL + '/manager/client/downloadModel';
|
|
|
|
+ },
|
|
|
|
+ countItem(item) {
|
|
|
|
+ let list = this.countBox.filter(node => node.type === item.id);
|
|
|
|
+ if (list.length === 0) return 0;
|
|
|
|
+ return list[0].number;
|
|
|
|
+ },
|
|
|
|
+ filterInit(option) {
|
|
|
|
+ this.filterOption = option;
|
|
|
|
+ this.currPage = 1;
|
|
|
|
+ this.init();
|
|
|
|
+ },
|
|
currentChange(currPage) {
|
|
currentChange(currPage) {
|
|
this.currPage = currPage;
|
|
this.currPage = currPage;
|
|
this.init();
|
|
this.init();
|
|
@@ -213,11 +260,38 @@
|
|
components: {
|
|
components: {
|
|
edit,
|
|
edit,
|
|
detail,
|
|
detail,
|
|
- followUpRecordDetail
|
|
|
|
|
|
+ followUpRecordDetail,
|
|
|
|
+ listFilter,
|
|
|
|
+ customerUpload
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
+ .customer-test {
|
|
|
|
+ padding: 15px 20px;
|
|
|
|
+ display: flex;
|
|
|
|
+
|
|
|
|
+ .test-item {
|
|
|
|
+ border-right: 1px solid $--color-border;
|
|
|
|
+ width: 160px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+
|
|
|
|
+ .name {
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ opacity: 0.8;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ .label {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ padding-top: 5px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .customer-line {
|
|
|
|
+ height: 12px;
|
|
|
|
+ background: $--background;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|