From 22f2c6c9b87c36cd0c22fc40f463e80abae66325 Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Sun, 18 May 2025 19:16:07 +0800
Subject: [PATCH] =?UTF-8?q?feat(components):=20=E9=87=8D=E6=9E=84=E5=AE=A2?=
=?UTF-8?q?=E6=88=B7=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 更新了客户添加页面的布局和样式
- 增加了新的字段和选项,如来源、顾问等
- 优化了表单提交流程,分为基础信息和六要素两个步骤
- 重新设计了下拉选择器和日期选择器的使用方式- 调整了部分字段的命名和展示逻辑
---
components/AQ/AQTabber.vue | 23 +-
pages/market/clue/add_clues.vue | 1010 ++++++++++++++++---------------
2 files changed, 529 insertions(+), 504 deletions(-)
diff --git a/components/AQ/AQTabber.vue b/components/AQ/AQTabber.vue
index 2a07c49..b0508f7 100644
--- a/components/AQ/AQTabber.vue
+++ b/components/AQ/AQTabber.vue
@@ -7,16 +7,16 @@
快捷新增
-
-
-
- 添加跟进记录
-
-
-
- 转交跟进任务
-
-
+
+
+
+
+
+
+
+
+
+
添加客户
@@ -196,7 +196,8 @@
}
.fui-custom__wrap {
width: 100%;
- height: 600rpx;
+ //height: 600rpx;
+ height: 450rpx;
}
.title{
font-size: 36rpx;
diff --git a/pages/market/clue/add_clues.vue b/pages/market/clue/add_clues.vue
index ef1aac6..76541c0 100644
--- a/pages/market/clue/add_clues.vue
+++ b/pages/market/clue/add_clues.vue
@@ -1,209 +1,378 @@
-
-
-
-
- 查重
-
-
-
-
- 基础信息
-
-
-
-
- 点击选择
-
-
- {{str_courses_id}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 点击选择
-
-
- {{str_source_channel}}
-
-
-
-
-
-
-
-
- 点击选择
-
-
- {{ str_customer_source }}
-
-
-
-
-
-
-
-
- 点击选择
-
- {{str_add_staff_id}}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 查重
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 男
-
-
-
-
-
- 女
+
+
+
+ 基础信息
+
+
+
+
+
+
+ {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
+
+
+
+
+
+
+
+ {{ (formData.source) ? picker_config.source.text : '点击选择' }}
+
+
+
+
+
+
+
+ {{ (formData.consultant) ? picker_config.consultant.text : '点击选择' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 男
+
+
+
+
+
+ 女
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 跟进任务
-
-
-
-
-
-
-
-
-
- 点击选择
+
+
+
+
+
- {{str_entry_type}}
+
+
+
+
+
-
-
-
-
-
-
-
- 点击选择
+
+
+
+
+
+ {{ (formData.purchasing_power) ? picker_config.purchasing_power.text : '点击选择' }}
+
- {{str_staff_id}}
+
+
+
+
+
+ {{ (formData.cognitive_idea) ? picker_config.cognitive_idea.text : '点击选择' }}
+
-
-
-
-
-
-
-
- 点击选择
+
+
+
+
+
+ {{ (formData.optional_class_time) ? formData.optional_class_time : '点击选择' }}
+
- {{formData.follow_up_time}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (formData.initial_intent) ? picker_config.initial_intent.text : '点击选择' }}
+
+
+
+
+
+
+
+ {{ (formData.campus) ? picker_config.campus.text : '点击选择' }}
+
+
+
+
+
+
+
+ {{ (formData.status) ? picker_config.status.text : '点击选择' }}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+ 下一步
-
-
- 保存
+
+
+ 六要素
+
+
-
+
-
+
+
@@ -364,204 +533,104 @@ export default {
//表单
formData: {
- courses_id:'',//课程id
- title:'',//线索标题
+ // 客户基础信息
source_channel:'',//来源渠道
- customer_source:'',//客户来源
- add_staff_id:'',//顾问id(添加这条数据的工作人员id)
- student_name:'',//学生姓名
- age:'',//学生年龄
- sex:'',//性别|0=保密,1=男,2=女
- student_phone:'',//学生电话
- //### 跟进任务
- is_follow:'',//是否跟进任务|1跟进 2不跟进
- entry_type:'',//跟进类型
- staff_id:'',//跟进人员id
- follow_up_time:'',//跟进时间
- follow_up_content:'',//备注
- },
- //选择器组件
- options_type: undefined,//选择器类型
- show: false,//是否显示下拉选择器
- linkage: true,//是否联动选择
- options: [],//下拉选择器可选值列表
+ source:'',//来源
- //课程id选择-相关
- //字典-课程选择
- options_courses_id: [
- // {
- // 'value': 1,
- // 'text': '类型1'
- // }
- ],//课程id选择列表
- str_courses_id:'',//文本显示-课程id选择
-
- //来源渠道-相关
- //字典-来源渠道
- options_source_channel: [
- // {
- // 'value': 1,
- // 'text': '类型1'
- // }
- ],
- str_source_channel:'',//文本显示-来源渠道
+ consultant:'',//顾问
- //客户来源-相关
- //字典-客户来源
- options_customer_source: [
- // {
- // 'value': 1,
- // 'text': '类型1'
- // }
- ],
- str_customer_source:'',//文本显示-客户来源
+ name:'',//姓名
+ age:'',//年龄
+ gender:'male',//性别|male-男性, female-女性, other-其他
+ phone_number:'',//联系电话
+ demand:'',//需求
- //顾问-相关
- //字典-顾问
- options_add_staff_id: [
- // {
- // 'value': 1,
- // 'text': '类型1'
- // }
- ],
- str_add_staff_id:'',//文本显示-顾问
+ purchasing_power:'',//购买力
+ cognitive_idea:'',//认知理念
- is_follow:true,//是否创建跟进任务
+ optional_class_time:'',//可选上课时间
+ distance:'',//距离
+ decision_maker:'',//决策人
- //跟进类型-相关
- //字典-跟进类型
- options_entry_type: [
- {
- 'value': 1,
- 'text': '市场人员'
+ initial_intent:'',//客户初步意向度: high-高, medium-中, low-低
+
+ campus:'',//所属校区
+
+ status:'',//客户状态: active-活跃, inactive-不活跃, pending-待定
+
+ //六要素信息
+ },
+
+ //下拉选择器相关
+ picker_input_name:'',//下拉组件的input_name
+ picker_show:false,//下拉组件是否展示
+ picker_linkage:true,//选择器是否为联动选择
+ picker_options:[
+ // {
+ // text:'张三',
+ // value:'1'
+ // },
+ ],//选择器可选值列表
+ picker_config:{
+ //来源渠道
+ source_channel:{
+ text:'',//回显中文名字
+ options:[
+ {
+ text:'张三',
+ value:'1'
+ },
+ {
+ text:'fg方法',
+ value:'2'
+ },
+ ],//可选值列表
},
- {
- 'value': 2,
- 'text': '销售人员'
+ //来源
+ source:{
+ text:'',
+ options:[],
+ },
+ //顾问
+ consultant:{
+ text:'',
+ options:[],
+ },
+ //购买力
+ purchasing_power:{
+ text:'',
+ options:[],
+ },
+ //认知理念
+ cognitive_idea:{
+ text:'',
+ options:[],
+ },
+ //客户初步意向度
+ initial_intent:{
+ text:'',
+ options:[],
+ },
+ //所属校区
+ campus:{
+ text:'',
+ options:[],
+ },
+ //客户状态
+ status:{
+ text:'',
+ options:[],
}
- ],
- str_entry_type:'',//文本显示-跟进类型
+ },//选择器选项配置
+ // 年月日选择组件
+ data_picker_input_name:'',//时间组件的input_name
+ date_picker_show:false,//时间选择器是否展示
- //跟进人员-相关
- //字典-跟进人员
- options_staff_id_5: [
- // {
- // 'value': 1,
- // 'text': '类型1'
- // }
- ],//市场人员列表
- options_staff_id_6: [
- // {
- // 'value': 1,
- // 'text': '类型1'
- // }
- ],//销售人员列表
- str_staff_id:'',//文本显示-跟进人员
-
-
- //跟进时间-相关
-
-
-
-
- show_date: false,
- result_date: '',
- result_leixing: '',
- result_student: '',
- result_status: '',
- result_intention: '',
-
- result_dates: '',
- result_renwu: '',
- result_fangshi: '',
-
-
-
-
- options_leixing: [{
- 'value': 1,
- 'text': '类型1'
- }, {
- 'value': 2,
- 'text': '类型2'
- }, {
- 'value': 3,
- 'text': '类型3'
- }],
- 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': '微信'
- }],
-
-
- result_customer_source: '',//选中项的中文名称
- result_add_staff_id: '',//选中项的中文名称
- staff_id_name:'',//跟进人员的名字
-
- //客户标签
- show_customer_tags: false,
- options_customer_tags: [
- // {
- // text: '标签3',
- // value: '3',
- // checked: false,//是否选中
- // }
- ],//客户标签可选值
//地区三级联动
show_area: false,
@@ -574,10 +643,24 @@ export default {
student_name:'',//检索关键字
clientUserList:[],//查重用户列表
showDuplicateCheck:false,//是否显示查重弹出层
+
+
+ //tab切换
+ optionTableId:0,
+ optionTable: [
+ {
+ id: 0,
+ name: '添加客户'
+ },
+ {
+ id: 1,
+ name: '添加六要素'
+ }
+ ],
}
},
onShow() {
- this.init()
+ // this.init()
},
methods: {
//初始化
@@ -978,125 +1061,7 @@ export default {
})
}, 1000)
},
- //选择弹窗
- selectCon(type) {
- this.options_type = type
- switch (type) {
- //课程id选择
- case 'courses_id':
- this.options = this.options_courses_id
- this.show = true
- this.linkage = true
- break;
- //来源渠道
- case 'source_channel':
- this.options = this.options_source_channel
- this.show = true
- this.linkage = true
- break;
- //客户来源
- case 'customer_source':
- this.options = this.options_customer_source
- this.show = true
- this.linkage = true
- break;
- //顾问
- case 'add_staff_id':
- this.options = this.options_add_staff_id
- this.show = true
- this.linkage = true
- break;
- // 跟进类型
- case 'entry_type':
- this.options = this.options_entry_type
- this.show = true
- this.linkage = true
- break;
- // 跟进人员
- case '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;
- //跟进时间
- case 'follow_up_time':
- this.show_date = true
- break;
- }
- },
- //监听选择框
- change(e) {
- console.log('选择器选中',e)
- this.show = false
- let type = this.options_type
- switch (type) {
- //课程id选择
- case 'courses_id':
- this.str_courses_id = e.text//选中的text值
- this.formData.courses_id = e.value//选中value值
- break;
- //来源渠道
- 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值
-
- //清空跟进人员选择
- this.formData.staff_id = ''
- this.str_staff_id = ''
- 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) {
- //跟进时间
- this.show_date = false
- let val = (e.result ?? '')
- if(val){
- val = val + ':00'
- }
- this.formData.follow_up_time = val
- },
- //关闭选择跟进时间
- cancel_date() {
- this.show_date = false
- },
//多选客户标签-选中后回调
@@ -1130,10 +1095,6 @@ export default {
this.formData.full_address = `${e.text[0]}-${e.text[1]}-${e.text[2]}`
},
- //关闭选择框
- cancel() {
- this.show = false
- },
//开关选择
switchChange(e) {
if (e.detail.value) {
@@ -1145,7 +1106,7 @@ export default {
//性别选择器
changeSex(e){
- this.formData.sex = e.detail.value
+ this.formData.gender = e.detail.value
},
//监听-是否创建跟进任务
@@ -1165,6 +1126,69 @@ export default {
this.formData.follow_up_content = ''//备注
}
},
+
+
+ //切换tag列表
+ async segmented(e) {
+ console.log(e)
+ //e.id|0=基础信息 1=六要素
+ let status = e.id
+ this.optionTableId = String(status)
+ },
+
+
+ //######-----下拉选择器组件相关-----######
+ //打开下拉选择器
+ openCicker(input_name, linkage = true) {
+ this.picker_show = true
+
+ this.picker_input_name = input_name
+
+ console.log('xxx',this.picker_config[input_name]?.options || 6666)
+
+ this.picker_options = this.picker_config[input_name]['options']
+
+ this.picker_linkage = linkage
+ },
+ //监听-下拉选择器
+ changeCicker(e) {
+ console.log('监听-下拉选择器', this.picker_input_name, e)
+ let input_name = this.picker_input_name
+ this.formData[input_name] = e.value
+ this.picker_config[input_name]['text'] = e.text
+ this.cancelCicker()
+ },
+ //关闭下拉选择器
+ cancelCicker() {
+ this.picker_show = false
+ this.picker_input_name = ''
+ this.picker_options = []
+ },
+
+
+ //######-----时间选择器组件相关-----######
+ //打开下拉选择器
+ openDate(input_name) {
+ this.date_picker_show = true
+ this.data_picker_input_name = input_name
+ },
+ //选择跟进时间
+ change_date(e) {
+ //跟进时间
+ let val = (e.result ?? '')
+ if(val){
+ val = val + ':00'
+ }
+
+ let input_name = this.data_picker_input_name
+ this.formData[input_name] = val
+
+ this.cancel_date()
+ },
+ //关闭选择跟进时间
+ cancel_date() {
+ this.date_picker_show = false
+ },
}
}