Commit 38185abc by 匡雅琴

跟进专员新增

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