Browse Source

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

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

367
pages/market/clue/writing_followUp.vue

@ -1,3 +1,4 @@
<!--添加跟进-->
<template> <template>
<view class="assemble"> <view class="assemble">
<view class="form-style"> <view class="form-style">
@ -132,13 +133,13 @@
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">保存</fui-button> <fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">保存</fui-button>
</view> </view>
<!-- 年月日-选择时间 --> <!-- 年月日-选择时间 -->
<fui-date-picker :show="show_date" type="3" @change="change_date" @cancel="cancel_date"></fui-date-picker> <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> @cancel="cancel"></fui-picker>
</view> </view>
</template> </template>
@ -154,105 +155,78 @@ const rules = [{
export default { export default {
data() { data() {
return { return {
switchChange_type: 1,
rules, 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:{ 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)
// //
// follow_staff_id:'',//
audio_upload:''//() reminder_time:'',//
follow_content:'',//
//
//
//()
//(id)
//########
//
//
//
//
//
}, },
//
options_type: undefined,//
show: false,//
linkage: true,//
options: [],//
//
show_date: false,//|true=,false=
//线-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
//-
} }
}, },
onLoad(options) { onLoad(options) {
@ -265,12 +239,8 @@ export default {
// //
async init() { async init() {
this.getDicFollow_up_type()//- this.getDicFollow_up_type()//-
this.getDicReminder_method()//-
this.getSigning_intention_contact()//
this.getFollow_up_personnel()//
}, },
//- //-
async getDicFollow_up_type() { async getDicFollow_up_type() {
let key = 'follow_up_type' let key = 'follow_up_type'
let res = await commonApi.getDictionary(key) 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) { selectCon(type) {
if (type == 1) { this.options_type = type
// switch (type) {
this.options_date_type = 1 //
this.show_date = true case 'source_channel':
} else if (type == 2) { this.options = this.options_source_channel
// this.show = true
this.options_type = 2 this.linkage = true
this.options = this.options_leixing break;
this.show = true //
this.linkage = true case 'customer_source':
} else if (type == 3) { this.options = this.options_customer_source
this.options_type = 3 this.show = true
this.options = this.options_student this.linkage = true
this.show = true break;
this.linkage = true //
} else if (type == 4) { case 'add_staff_id':
this.options_type = 4 this.options = this.options_add_staff_id
this.options = this.options_status this.show = true
this.show = true this.linkage = true
this.linkage = true break;
} else if (type == 5) { //
this.options_type = 5 case 'entry_type':
this.options = this.options_intention this.options = this.options_entry_type
this.show = true this.show = true
this.linkage = true this.linkage = true
} else if (type == 6) { break;
// //
this.options_date_type = 6 case 'staff_id':
this.show_date = true this.options = this.options_staff_id
} else if (type == 7) { this.show = true
// this.linkage = true
this.options_type = 7 break;
this.options = this.options_renwu //
this.show = true case 'follow_up_time':
this.linkage = true this.show_date = true
} else if (type == 8) { break;
//
this.options_type = 8
this.options = this.options_fangshi
this.show = true
this.linkage = true
} }
}, },
// //-
change_date(e) { changeOptions(e) {
if (this.options_date_type == 1) { console.log('选择器选中',e)
this.show_date = false this.show = false
this.result_date = e.result ?? '' let type = this.options_type
} else if (this.options_date_type == 6) { switch (type) {
this.show_date = false //
this.result_dates = e.result ?? '' 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;
} }
}, },
//
cancel_date() { //-
change_date(e) {
//
this.show_date = false this.show_date = false
this.formData.follow_up_time = e.result ?? ''
}, },
// //
change(e) { cancel_date() {
this.show = false this.show_date = 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> </script>

Loading…
Cancel
Save