Commit 38185abc by 匡雅琴

跟进专员新增

1 parent 773e27dc
......@@ -6,11 +6,9 @@
* @param {*} params
* @returns
*/
import { http_config } from '@/main'
const sessionId = 'mini-a8d84762-da6a-4ff7-b009-eb7fa0c80dfb-rop';
import { http_config, http } from '@/main'
const listFollowerStaffByPage = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
params.sessionId = sessionId
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
......@@ -21,7 +19,6 @@ const listFollowerStaffByPage = params => {
// 获取跟进类型列表
const listEntFollowerType = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
params.sessionId = sessionId
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
......@@ -32,7 +29,6 @@ const listEntFollowerType = params => {
// 删除根据员工
const deleteFollowerStaff = params => {
params.method = 'entmicro.api.staff.deleteFollowerStaff'
params.sessionId = sessionId
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
......@@ -42,7 +38,6 @@ const deleteFollowerStaff = params => {
}
// 删除跟进类型
const deleteFollowerType = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.deleteFollowerType'
return http_config({
url: '/rop-scrm-entmicro/router',
......@@ -53,7 +48,6 @@ const deleteFollowerType = params => {
}
// 查询外部联系人员工
const listEntmicroStaff = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.listEntmicroStaff'
return http_config({
url: '/rop-scrm-entmicro/router',
......@@ -64,7 +58,6 @@ const listEntmicroStaff = params => {
}
// 添加跟进员工
const saveFollowerStaff = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.saveFollowerStaff'
return http_config({
url: '/rop-scrm-entmicro/router',
......@@ -75,7 +68,6 @@ const saveFollowerStaff = params => {
}
// 新增跟进类型
const saveFollowerType = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.saveFollowerType'
return http_config({
url: '/rop-scrm-entmicro/router',
......@@ -86,7 +78,6 @@ const saveFollowerType = params => {
}
// 同步企微外部联系人
const syncEntmicroIsOutsiderStaff = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.syncEntmicroIsOutsiderStaff'
return http_config({
url: '/rop-scrm-entmicro/router',
......@@ -97,7 +88,6 @@ const syncEntmicroIsOutsiderStaff = params => {
}
// 查询组织树
const listDepartmentTree = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.department.listDepartmentTree'
return http_config({
url: '/rop-scrm-entmicro/router',
......@@ -106,6 +96,16 @@ const listDepartmentTree = params => {
sign: true
})
}
// 获取业务类型
const getListEntBusinessType = (params = {}) => {
params.method = 'entmicro.api.staff.listEntBusinessType'
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
listFollowerStaffByPage,
listEntFollowerType,
......@@ -115,6 +115,6 @@ export default {
saveFollowerType,
saveFollowerStaff,
syncEntmicroIsOutsiderStaff,
listDepartmentTree
listDepartmentTree,
getListEntBusinessType
}
\ No newline at end of file
......@@ -36,6 +36,11 @@
</div>
<div class="sale-type-desc">跟进员工类型最多新增30个,已新增{{ empType.length - empTypeF.length }}个</div>
</el-form-item>
<el-form-item label="负责的业务类型">
<el-checkbox-group v-model="selectBusiness" @change="selectType">
<el-checkbox v-for="item in businessType" :key="item" :label="item.id">{{ item.businessName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item style="text-align: center">
<el-button @click="onCancel" size="small">取消</el-button>
<el-button type="primary" @click="onSubmit" size="small">确定</el-button>
......@@ -64,7 +69,9 @@ export default {
empTypeValue: '',
newTag: '',
innerTags: [],
dialog_temp: {}
dialog_temp: {},
businessType: [],
selectBusiness: []
}
},
methods: {
......@@ -72,16 +79,31 @@ export default {
this.newTag = ''
this.innerTags = []
this.empTypeValue = ''
this.selectBusiness = []
if (this.$refs.selectEmpTabel.listTree.length != 0) {
this.$refs.selectEmpTabel.listEntmicroStaff()
this.$refs.selectEmpTabel.clearSelection()
}
},
// 获取业务类型
getBusinessType() {
this.$apis.emp.getListEntBusinessType().then(res => {
console.log(res,'111');
this.businessType = res
})
},
// 选取业务类型
selectType(data) {
console.log(data, 'businessType');
this.selectBusiness = data
},
selectTable(val) {
this.innerTags = val
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
// const merchantId = this.$globalState.session.merchantId
const merchantId = '44209572'
this.$apis.emp.listEntFollowerType({ merchantId }).then(res => {
this.empType = res
this.empTypeF = res.filter(item => item.commonFlag)
})
......@@ -114,7 +136,8 @@ export default {
}
let params = {
followName: this.empTypeValue,
merchantid: this.$globalState.session.merchantId
// merchantid: this.$globalState.session.merchantId
merchantId: '44209572'
}
this.$apis.emp.saveFollowerType(params).then(res => {
this.listEntFollowerType()
......@@ -158,7 +181,7 @@ export default {
this.innerTags.forEach(item => {
userIds.push(item.userId)
})
this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds, this.selectBusiness)
},
onCancel() {
if (this.innerTags.length != 0) {
......@@ -176,7 +199,8 @@ export default {
},
mounted() {
this.listEntFollowerType()
this.listEntFollowerType(),
this.getBusinessType()
}
}
</script>
......
......@@ -24,7 +24,8 @@
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
<!-- <GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton> -->
<el-button size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</el-button>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
......@@ -151,11 +152,13 @@ export default {
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
handSelectdEmp(followerTypeId, userIds, businessTypeId) {
var params = {
followerTypeId,
userIds
userIds,
businessTypeId
}
console.log(params, '1253715427');
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!