Commit 811c4456 by 杨明

Merge branch 'v2.1.0' of http://192.168.3.233:8090/saas/scrm-micro-custom into yangm_dev_v2.1.0

2 parents a5c302f9 971b9344
......@@ -26,7 +26,7 @@
</div>
<img src="./assets/logo.png" alt="" srcset="" />
</div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo">
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation">
<router-view></router-view>
</keep-alive>
</div>
......
......@@ -31,4 +31,42 @@ export function getBaseInfo(params) {
data: params,
sign: true
})
}
// 企微后台获取已选择跟进员工
export function getfollowstaff(params) {
params.method = 'scrm.api.wwbench.clue.staff.get'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取可选跟进员工
function selectableStaff(params) {
params.method = 'scrm.api.wwbench.clue.consultant.list'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
// 企微后台新增或编辑跟进员工
export function editfollowstaff(params) {
params.method = 'scrm.api.wwbench.clue.staff.insertOrUpdate'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
selectableStaff
}
\ No newline at end of file
......@@ -3,13 +3,17 @@
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
<el-input v-model="tableSearchForm.username" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
<GLTable :hasNum="false" v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div slot="options" slot-scope="scope">
<el-radio :label="scope.scope.userOneid" v-model="selectId"></el-radio>
</div>
</GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
......@@ -25,7 +29,8 @@ export default {
name: 'selectEmp',
data() {
return {
loading: false,
selectId: null,
// loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
......@@ -34,10 +39,13 @@ export default {
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
tableColumns: [
{
label: '',
prop: '',
addHtml: 'options'
},
{
label: '姓名',
prop: 'staffName'
},
......@@ -47,84 +55,77 @@ export default {
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
prop: 'followerName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: []
selectEmp: [],
typeselect: '',
selectUuid: ''
}
},
methods: {
jumpUrl() {
util.openUrl(location.origin + '/settings/followUp/index')
},
getFollower() {
var params = {
selectableStaff(type) {
this.typeselect = type
let params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
pageNum: this.$refs.table.page.pageNum,
type
}
this.$apis.channel.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectEmp.forEach((itm, index) => {
if (itm.staffId == item.relationId) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
this.selectEmp.splice(index, 1)
}
})
})
this.$apis.leadManage.selectableStaff(params).then(res => {
this.tableData = res.list
this.tableTotal = res.total
})
},
init(item) {
init(type, uuid) {
this.selectId = uuid
this.tableSearchForm = {}
this.selectEmp = JSON.parse(JSON.stringify(item))
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
this.selectableStaff(type)
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
let type = this.typeselect
this.selectableStaff(type)
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300),
handleSelect: utils.debounce(function() {
this.loading = true
let selectEmp = this.selectEmp.map(item => {
return {
relationId: item.staffId,
staffName: item.staffName
}
})
const selectItem = this.selectItem.concat(selectEmp)
if (selectItem.length == 0) {
if (!this.selectId) {
this.$message.error('请选择员工')
return
}
this.loading = false
let list = this.tableData.filter(item => {
return item['userOneid'] == this.selectId
})
let selectEmp = {
userId: list[0].userId,
userName: list[0].staffName,
userUuid: list[0].userOneid
}
this.dialogVisible = false
this.$emit('selectTable', this.selectItem.concat(selectEmp))
this.$refs.table.$refs.salelistMutiTable.clearSelection()
this.$emit('selectTable', selectEmp)
}, 300)
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-radio__label {
display: none;
}
.dialog-jump {
color: #5850ff;
float: left;
......@@ -146,4 +147,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -10,20 +10,7 @@
</el-form-item>
</el-form>
<div class="table-box">
<GLTable
:key="key"
v-if="dialogVisible"
ref="followTable"
:layout="layout"
:tableData="tableData"
:hasNum="false"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
@row-click="rowClick"
></GLTable>
<GLTable :key="key" v-if="dialogVisible" ref="followTable" :layout="layout" :tableData="tableData" :hasNum="false" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable" @row-click="rowClick"></GLTable>
<div class="form-tips">必须配置至少1个跟进专员</div>
</div>
<span slot="footer" class="dialog-footer">
......@@ -153,7 +140,7 @@ export default {
}, 300)
}
}
</script>
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
......@@ -189,4 +176,4 @@ export default {
.table-box {
position: relative;
}
</style>
\ No newline at end of file
</style>
......@@ -9,7 +9,7 @@
<span>线索列表</span>
<span @click="handleToggle()">功能介绍</span>
</div>
<el-button size="small" @click="goAllocation">线索分配</el-button>
<GLButton fn="线索分配" size="small" @click="goAllocation">线索分配</GLButton>
</div>
<GLTable :hasNum="true" @setTableFinishFun="setTableFinishFun" ref="leadManage" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<!-- 线索类型 -->
......@@ -19,7 +19,7 @@
<!-- 线索状态 -->
<template slot="status" slot-scope="scope">
<span>
{{ scope.scope.status == 1 ? '跟进中' : scope.scope.customerSex == 2 ? '已完成' : '' }}
{{ scope.scope.status == 1 ? '跟进中' : scope.scope.status == 2 ? '已完成' : '' }}
</span>
</template>
<!-- 跟进员工 -->
......@@ -30,8 +30,8 @@
</el-tag>
</template>
<template slot="options" slot-scope="scope">
<!-- <GLButton class="blue-text leftDistance" type="text" fn="查看" @click="goBasicInfo">查看</GLButton> -->
<el-button type="primary" size="small" @click="goBasicInfo(scope.scope)">查看</el-button>
<GLButton class="blue-text" type="text" fn="线索详情" @click="goBasicInfo(scope.scope)">查看</GLButton>
<!-- <el-button class="blue-text" type="primary" size="small" @click="goBasicInfo(scope.scope)">查看</el-button> -->
</template>
</GLTable>
</div>
......@@ -88,7 +88,8 @@ export default {
type: 'input',
inputType: 'text',
name: 'keyword',
label: '关键字'
label: '关键字',
placeholder: '请输入客户名称/手机号'
},
{
type: 'select',
......@@ -109,13 +110,15 @@ export default {
label: '已完成',
value: 2
}
]
],
placeholder: '请选择'
},
{
type: 'input',
inputType: 'text',
name: 'userName',
label: '跟进人'
label: '跟进人',
placeholder: '请输入跟进人名称'
},
{
type: 'select',
......@@ -152,11 +155,12 @@ export default {
label: '维保预约',
value: 6
}
]
],
placeholder: '请选择'
}
],
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'list',
tableColumns: [
......@@ -186,7 +190,8 @@ export default {
{
label: '跟进人',
prop: 'userName',
addHtml: 'userName'
addHtml: 'userName',
minWidth: 120
},
{
label: '创建时间',
......@@ -257,14 +262,21 @@ export default {
<style lang="scss" scoped>
.scrm-sub-client-container {
/deep/ .el-table .cell {
text-overflow: clip;
}
/deep/ .el-table .cell,
.el-table th div {
text-overflow: clip;
}
.pageContent {
padding: 6px 20px 30px;
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
/deep/ .el-icon-user-solid {
color: #75acff;
margin-right: 3px;
// margin-right: 3px;
font-size: 14px;
}
.leadList {
......@@ -292,6 +304,9 @@ export default {
}
}
}
.blue-text{
color:#5850ff ;
}
}
/deep/.el-dialog__body {
padding: 30px 70px;
......
......@@ -2,7 +2,8 @@
<div>
<div class="scrm-sub-client-container">
<div class="pageContent" :style="{ height: clientHeight + 'px' }">
<div class="drainage-form-item" v-for="(item, index) in followStaffList" :key="index">
<!-- 售前线索跟进员工 -->
<div class="drainage-form-item">
<label>
售前线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售前专员,并选择员工来跟进新车询价、试驾预约线索。">
......@@ -11,7 +12,7 @@
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp">
<el-button size="small" @click="handleAddEmp(1)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
......@@ -20,10 +21,37 @@
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="dracImFollowStaffResponses.length == 1">
<el-tag effect="plain" type="info" v-for="(tag, idx) in dracImFollowStaffResponses" :key="idx" :disable-transitions="false">
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.beforeUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
{{ this.choicedStaff.beforeUserName }}
</el-tag>
</div>
</div>
</div>
<!-- 售后线索跟进员工 -->
<div class="drainage-form-item">
<label>
售后线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售前专员,并选择员工来跟进维保预约、救援服务线索。">
<img src="@/assets/leadManage/question.png" slot="reference" class="count-item-question" />
</el-popover>
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp(2)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
<span class="drainage-coutom-count">
只能选择
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.afterUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ choicedStaff.afterUserName }}
</el-tag>
</div>
</div>
......@@ -39,49 +67,71 @@
</template>
<script>
import { getfollowstaff, editfollowstaff } from '@/api/modules/leadManage'
import selectEmp from '@/components/selectEmp'
export default {
name: 'leadAllocation',
components: { selectEmp },
data() {
return {
followStaffList: ['1', '2'],
followStaffVal: '',
followStaffBefore: {}, //售前员工
followStaffAfter: {}, //售后员工
choicedStaff: {
afterUserId: '',
afterUserName: '',
afterUserUuid: '',
beforeUserId: '',
beforeUserName: '',
beforeUserUuid: ''
}, //已选择的员工
clientHeight: '',
dracImFollowStaffResponses: [
{
staffName: 'nihao',
id: 212
}
]
type: '',
followStaffLists: [], //跟进员工列表
}
},
created() {
this.getStaff()
},
mounted() {
this.clientHeight = document.documentElement.clientHeight - 180
},
methods: {
// 删除标签
handleTagClose(tag) {
// console.log(tag)
this.allocationList.splice(this.allocationList.indexOf(tag), 1)
getStaff() {
getfollowstaff({}).then(res => {
this.choicedStaff = res
})
},
goback() {
this.$router.push({ path: '/leadManage/index' })
},
comEmployee() {
console.log('1111')
let params = this.choicedStaff
editfollowstaff(params).then(res => {
if (!res) {
return
}
this.goback()
this.$message.success('修改成功')
})
},
//选择跟进员工
handleAddEmp() {
this.$refs.selectEmpForm.init(this.dracImFollowStaffResponses)
handleAddEmp(type) {
this.type = type
if (this.type == 1) {
this.$refs.selectEmpForm.init(type, this.choicedStaff.beforeUserUuid)
}
if (this.type == 2) {
this.$refs.selectEmpForm.init(type, this.choicedStaff.afterUserUuid)
}
},
selectTable(item) {
this.dracImFollowStaffResponses = item.map(item => {
return {
staffId: item.relationId,
staffName: item.staffName
}
})
if (this.type == 1) {
;(this.choicedStaff.beforeUserId = item.userId), (this.choicedStaff.beforeUserName = item.userName), (this.choicedStaff.beforeUserUuid = item.userUuid)
}
if (this.type == 2) {
;(this.choicedStaff.afterUserId = item.userId), (this.choicedStaff.afterUserName = item.userName), (this.choicedStaff.afterUserUuid = item.userUuid)
}
console.log(this.choicedStaff)
}
}
}
......
......@@ -191,7 +191,6 @@ export default {
}
this.leadBaseList = dataObj
this.leadFollowRecord = res.followList
console.log(res)
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!