Browse Source

feat(market): 新增客户信息页面字典数据加载功能

- 添加了多个字典数据加载方法,包括跟进人员、购买力、认知理念、情感粘度、意向分类等
- 优化了字典数据的存储和展示逻辑,提高了页面的可维护性和用户体验- 新增了跟进人员(全部、市场、销售)的字典数据加载功能,为不同角色的用户提供了更精准的数据支持
master
liutong 12 months ago
parent
commit
2490bf74ce
  1. 160
      pages/market/clue/writing_followUp.vue

160
pages/market/clue/writing_followUp.vue

@ -412,7 +412,7 @@ export default {
str_entry_type:'',
//-
//-
//-()
options_staff_id:[],
//-
str_staff_id:'',
@ -442,7 +442,7 @@ export default {
str_initial_customer_intent:'',
//-
//-
//-()
options_initial_relationship_intent:[],
//-
str_initial_relationship_intent:'',
@ -465,8 +465,27 @@ export default {
methods: {
//
async init() {
this.getSalesList()//-线
this.getDicFollow_up_type()//-
//-线
this.getSalesList()
//-
this.getDic_entry_type()
//-
this.getDic_purchasing_power()
//-
this.getDic_cognitive_concept()
//-
this.getDic_emotional_intensity()
//-
this.getDic_initial_customer_intent()
//-
this.getDic_initial_relationship_intent()
//-()
this.getDic_staff_id('')
//-()
this.getDic_staff_id('5')
//-()
this.getDic_staff_id('6')
},
//-线
@ -489,19 +508,75 @@ export default {
})
},
//-
//-()
//--()
//--()
async getDic_entry_type() {
//(:1=,2=)
this.options_entry_type = [
{
value: 1,
text: '市场人员',
},
{
value: 2,
text: '销售人员',
},
]
},
//-
async getDic_purchasing_power() {
this.options_purchasing_power = [
{
value: 1,
text: '低',
},
{
value: 2,
text: '中',
},
{
value: 3,
text: '高',
},
]
},
//-
async getDic_cognitive_concept() {
// |1=,2=,3=
this.options_cognitive_concept = [
{
value: 1,
text: '低',
},
{
value: 2,
text: '中',
},
{
value: 3,
text: '高',
},
]
},
//-
async getDic_emotional_intensity() {
// |1=,2=,3=
this.options_emotional_intensity = [
{
value: 1,
text: '低',
},
{
value: 2,
text: '中',
},
{
value: 3,
text: '高',
},
]
},
//-
//-
//-
async getDicFollow_up_type() {
let key = 'follow_up_type'
async getDic_initial_customer_intent() {
let key = 'initial_customer_intent'
let res = await commonApi.getDictionary(key)
if (res.code != 1) {
uni.showToast({
@ -512,14 +587,69 @@ export default {
}
this.follow_up_type = res.data.dictionary
this.options_leixing = []
this.options_initial_customer_intent = []
res.data.dictionary.forEach((v, k) => {
this.options_initial_customer_intent.push({
value: v.value,
text: v.name,
})
})
},
//-
async getDic_initial_relationship_intent() {
let key = 'initial_relationship_intent'
let res = await commonApi.getDictionary(key)
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.options_initial_relationship_intent = []
res.data.dictionary.forEach((v, k) => {
this.options_leixing.push({
this.options_initial_relationship_intent.push({
value: v.value,
text: v.name,
})
})
},
//-()
// role_id|5=,6=
async getDic_staff_id(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_follow_staff_id_sc = arr
console.log('市场',arr)
}else if(role_id == 6){
this.options_follow_staff_id_xs = arr
console.log('销售',arr)
}else{
//
this.options_staff_id = arr
console.log('全部',arr)
}
},
//
async validatorForm(data) {

Loading…
Cancel
Save