Browse Source

feat(market): 根据跟进类型区分市场人员和销售人员

- 新增市场人员和销售人员的字典列表
- 根据跟进类型动态显示不同人员列表
- 优化跟进人员选择逻辑,增加空值重置
-调整数据结构和方法以支持新的功能
master
liutong 12 months ago
parent
commit
329d1dff5c
  1. 70
      pages/market/clue/add_clues.vue

70
pages/market/clue/add_clues.vue

@ -423,12 +423,18 @@ export default {
//-
//-
options_staff_id: [
options_staff_id_5: [
// {
// 'value': 1,
// 'text': '1'
// }
],
],//
options_staff_id_6: [
// {
// 'value': 1,
// 'text': '1'
// }
],//
str_staff_id:'',//-
@ -555,9 +561,15 @@ export default {
this.getDict_source_channel()//-
this.getDict_customer_source()//-
this.getDict_customer_tags()//-
this.getStaffList()//
this.getRoleStaffList(5)//
this.getRoleStaffList(6)//
this.getAreaTree()//
},
async getUserInfo(){
@ -575,9 +587,6 @@ export default {
this.formData.add_staff_id = res.data.staff_id//id
this.str_add_staff_id = res.data.name//
this.formData.staff_id = res.data.staff_id//id
this.str_staff_id = res.data.name//
},
@ -600,7 +609,37 @@ export default {
})
})
this.options_add_staff_id = arr
this.options_staff_id = arr
},
// role_id|5=,6=
async getRoleStaffList(role_id) {
let res = await memberApi.staffList({
type: 2,
role_id:role_id
})
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
let arr = []
res.data.forEach((v,k)=>{
arr.push({
text: v.name,
value: v.id,
})
})
if(role_id == 5){
this.options_staff_id_5 = arr
console.log('市场',arr)
}else{
this.options_staff_id_6 = arr
console.log('销售',arr)
}
},
//
@ -891,7 +930,20 @@ export default {
break;
//
case 'staff_id':
this.options = this.options_staff_id
if(!this.formData.entry_type){
uni.showToast({
title: '请先选择跟进类型',
icon: 'none'
})
return
}
if(this.formData.entry_type == 1){
//
this.options = this.options_staff_id_5
}else{
//
this.options = this.options_staff_id_6
}
this.show = true
this.linkage = true
break;
@ -926,6 +978,10 @@ export default {
case 'entry_type':
this.str_entry_type = e.text//text
this.formData.entry_type = e.value//value
//
this.formData.staff_id = ''
this.str_staff_id = ''
break;
//
case 'staff_id':

Loading…
Cancel
Save