Commit 10e49ec3 by chenwq

feat(销售管理): 添加组织架构管理页面和客户分类标签

- 新增组织架构管理页面,包含大区列表展示功能
- 在客户管理页面添加分类标签页,便于按状态筛选客户
- 添加regionPage接口用于获取大区数据
1 parent 53791632
......@@ -5,3 +5,9 @@ export function potentialCustomersPage(data) {
data.method = 'dj.api.smartcarlife.sale.potentialCustomers.page'
return request(data, "post")
}
// 分页查询大区
export function regionPage(data) {
data.method = 'dj.api.smartcarlife.sale.region.page'
return request(data, "post")
}
......@@ -15,9 +15,15 @@
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<div style="margin-bottom: 10px;">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
</el-tab-pane>
</el-tabs>
<!-- <div>
<auth-button category="Button" />
</div> -->
</div>
<d2-table ref="tmplTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
<div slot="brandList" slot-scope="scope">
<el-tooltip v-if="scope.scope.brandList && scope.scope.brandList.length" effect="dark" placement="top">
......@@ -56,6 +62,29 @@ export default {
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: "0",
tabPaneList: [
{
label: "全部",
name: "0"
},
{
label: '跟进中',
name: "1"
},
{
label: '已签约',
name: "3"
},
{
label: '已绑定',
name: "4"
},
{
label: '未签约',
name: "2"
}
],
labelWidth: '110px',
searchForm: {
createdDate: '',
......
<!-- 销售管理 - 组织架构管理 - 列表 -->
<template>
<div>
<d2-container>
<div class="d2-container-content" style="margin-top: 0;">
<d2-table ref="organizeTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { busTypeOpt, cooperModeOpt, flowSituateOpt } from '../constant/baseData'
import { regionPage } from '@api/salesManagement'
export default {
name: 'Customer',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
getListApi: regionPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '创建时间',
prop: 'createdDate',
width: '150px'
}, {
label: '大区名称',
prop: 'regionName'
}, {
label: '创建人',
prop: 'createdBy'
}, {
label: '大区经理',
prop: 'userList',
formatter: (cellValue) => {
// 人员类型(1.大区经理,2.销售人员)
return cellValue.userList.length ? cellValue.userList.filter(item => item.userType == 1).map(item => item.userName).join(',') : '--'
}
}, {
label: '销售人员',
prop: 'userList',
formatter: (cellValue) => {
// 人员类型(1.大区经理,2.销售人员)
return cellValue.userList.length ? cellValue.userList.filter(item => item.userType == 2).map(item => item.userName).join(',') : '--'
}
}]
},
baseData: {
tmplTypeList: [],
provinceInfoList: [],
cityList: [],
brandList: [],
busTypeOpt: busTypeOpt,
cooperModeOpt: cooperModeOpt,
flowSituateOpt: flowSituateOpt
}
}
},
mounted() {
},
methods: {
handleEdit(row = {}) {
const editType = row?.id ? 'edit' : 'add'
this.$router.push({
name: "editOrganize",
query: {
editType: editType,
id: row?.id || ''
}
})
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.fields-txt {
width: 346px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!