Browse Source

refactor(market): 重构线索跟进页面

- 添加了页面标题注释
- 优化了表单数据结构,明确了各个字段的用途
- 重新组织了下拉选择器和时间选择器的逻辑
- 移除了未使用的代码和冗余的数据
-调整了页面布局和样式
master
liutong 12 months ago
parent
commit
7768348531
  1. 343
      pages/market/clue/writing_followUp.vue

343
pages/market/clue/writing_followUp.vue

@ -1,3 +1,4 @@
<!--添加跟进-->
<template>
<view class="assemble">
<view class="form-style">
@ -132,13 +133,13 @@
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">保存</fui-button>
</view>
<!-- 年月日-选择时间 -->
<fui-date-picker :show="show_date" type="3" @change="change_date" @cancel="cancel_date"></fui-date-picker>
<!-- 选择器 -->
<fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="change"
<!-- 下拉选择器 -->
<fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="changeOptions"
@cancel="cancel"></fui-picker>
</view>
</template>
@ -154,105 +155,78 @@ const rules = [{
export default {
data() {
return {
switchChange_type: 1,
rules,
show_date: false,
result_date: '',
result_leixing: '',
result_student: '',
result_status: '',
result_intention: '',
result_dates: '',
result_renwu: '',
result_fangshi: '',
show: false,
options: [],
linkage: true,
options_type: undefined,
options_leixing: [],//
options_student: [{
'value': 1,
'text': '张三'
}, {
'value': 2,
'text': '李四'
}, {
'value': 3,
'text': '王五'
}],
options_status: [{
'value': 1,
'text': '状态1'
}, {
'value': 2,
'text': '状态2'
}, {
'value': 3,
'text': '状态3'
}],
options_intention: [{
'value': 1,
'text': '张三1'
}, {
'value': 2,
'text': '李四2'
}, {
'value': 3,
'text': '王五3'
}],
options_kehu: [{
'value': 1,
'text': '张三'
}, {
'value': 2,
'text': '李四'
}, {
'value': 3,
'text': '王五'
}],
options_renwu: [{
'value': 1,
'text': '是'
}, {
'value': 2,
'text': '否'
}],
options_fangshi: [{
'value': 1,
'text': '短信'
}, {
'value': 2,
'text': '微信'
}],
follow_up_type: [],//
signing_intention_contact: [],//
follow_up_personnel: [],//
reminder_method: [],//
//
formData:{
//##### #####
sales_id:'',//线(线id)
entry_type:'',//(1=,2=)
staff_id:'',//
follow_up_time:'',//(2025-03-20 16:04:50)
requirement:'',//
purchasing_power:'',//(1=,2=,3=)
cognitive_concept:'',//|1=,2=,3=
schooltime:'',//(2025-03-20 16:04:50)
distance:'',//
decision_maker:'',//
emotional_intensity:'',//|1=,2=,3=
//##### #####
initial_customer_intent:'',//(|A+,A,A-,B+B,B-,C)
initial_relationship_intent:'',//(|A,B,C)
follow_up_content:'',//
//##### #####
is_warn:'1',//( 1 2)
//
//
audio_upload:''//()
follow_staff_id:'',//
reminder_time:'',//
follow_content:'',//
},
//
options_type: undefined,//
show: false,//
linkage: true,//
options: [],//
//
show_date: false,//|true=,false=
//线-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//
//
//()
//(id)
//########
//
//
//
//
//
},
}
},
onLoad(options) {
@ -265,12 +239,8 @@ export default {
//
async init() {
this.getDicFollow_up_type()//-
this.getDicReminder_method()//-
this.getSigning_intention_contact()//
this.getFollow_up_personnel()//
},
//-
//-
async getDicFollow_up_type() {
let key = 'follow_up_type'
let res = await commonApi.getDictionary(key)
@ -291,130 +261,103 @@ export default {
})
})
},
//-
async getDicReminder_method() {
let key = 'reminder_method'
let res = await commonApi.getDictionary(key)
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.reminder_method = res.data.dictionary
},
//
async getSigning_intention_contact() {
//
async validatorForm(data) {
},
//
async getFollow_up_personnel() {
//
async submit() {
},
submit() {
console.log(this.formData)
this.$refs.form.validator(null, null, true).then(res => {
console.log(res)
if (res.isPassed) {
console.log('校验通过!')
} else {
console.log('向上滑动页面查看错误提示!')
}
}).catch(err => {
console.log(err)
})
},
//
selectCon(type) {
if (type == 1) {
//
this.options_date_type = 1
this.show_date = true
} else if (type == 2) {
//
this.options_type = 2
this.options = this.options_leixing
this.options_type = type
switch (type) {
//
case 'source_channel':
this.options = this.options_source_channel
this.show = true
this.linkage = true
} else if (type == 3) {
this.options_type = 3
this.options = this.options_student
break;
//
case 'customer_source':
this.options = this.options_customer_source
this.show = true
this.linkage = true
} else if (type == 4) {
this.options_type = 4
this.options = this.options_status
break;
//
case 'add_staff_id':
this.options = this.options_add_staff_id
this.show = true
this.linkage = true
} else if (type == 5) {
this.options_type = 5
this.options = this.options_intention
break;
//
case 'entry_type':
this.options = this.options_entry_type
this.show = true
this.linkage = true
} else if (type == 6) {
//
this.options_date_type = 6
this.show_date = true
} else if (type == 7) {
//
this.options_type = 7
this.options = this.options_renwu
this.show = true
this.linkage = true
} else if (type == 8) {
//
this.options_type = 8
this.options = this.options_fangshi
break;
//
case 'staff_id':
this.options = this.options_staff_id
this.show = true
this.linkage = true
break;
//
case 'follow_up_time':
this.show_date = true
break;
}
},
//-
changeOptions(e) {
console.log('选择器选中',e)
this.show = false
let type = this.options_type
switch (type) {
//
case 'source_channel':
this.str_source_channel = e.text//text
this.formData.source_channel = e.value//value
break;
//
case 'customer_source':
this.str_customer_source = e.text//text
this.formData.customer_source = e.value//value
break;
//
case 'add_staff_id':
this.str_add_staff_id = e.text//text
this.formData.add_staff_id = e.value//value
break;
//
case 'entry_type':
this.str_entry_type = e.text//text
this.formData.entry_type = e.value//value
break;
//
case 'staff_id':
this.str_staff_id = e.text//text
this.formData.staff_id = e.value//value
break;
//
case 'follow_up_time':
break;
}
},
//
//-
change_date(e) {
if (this.options_date_type == 1) {
this.show_date = false
this.result_date = e.result ?? ''
} else if (this.options_date_type == 6) {
//
this.show_date = false
this.result_dates = e.result ?? ''
}
this.formData.follow_up_time = e.result ?? ''
},
//
//
cancel_date() {
this.show_date = false
},
//
change(e) {
this.show = false
console.log(e)
if (this.options_type == 2) {
this.result_leixing = e.result
} else if (this.options_type == 3) {
this.result_student = e.result
} else if (this.options_type == 4) {
this.result_status = e.result
} else if (this.options_type == 5) {
this.result_intention = e.result
} else if (this.options_type == 7) {
this.result_renwu = e.result
} else if (this.options_type == 8) {
this.result_fangshi = e.result
}
},
//
cancel() {
this.show = false
},
//
switchChange(e) {
if (e.detail.value) {
this.switchChange_type = 1
} else {
this.switchChange_type = 2
}
}
}
}
</script>

Loading…
Cancel
Save