Browse Source

feat(market): 优化线索添加页面数据处理

- 调整学员姓名和手机号的 prop属性
- 初始化 formData 对象,添加所有必要字段
- 修改客户标签的处理逻辑,添加 checked属性
- 优化客户标签选择后的数据处理
master
liutong 1 year ago
parent
commit
52302fd342
  1. 36
      pages/market/clue/add_clues.vue

36
pages/market/clue/add_clues.vue

@ -11,13 +11,13 @@
<view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style">
<fui-form-item label="学员姓名" asterisk asteriskPosition="right" labelSize='26' prop="name" background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-form-item label="学员姓名" asterisk asteriskPosition="right" labelSize='26' prop="student_name" background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;" >
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.student_name" backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view>
</fui-form-item>
<fui-form-item label="学员手机号" asterisk asteriskPosition="right" labelSize='26' prop="name" background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-form-item label="学员手机号" asterisk asteriskPosition="right" labelSize='26' prop="student_phone" background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;" >
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.student_phone" backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view>
@ -173,8 +173,23 @@ import commonApi from '@/api/common.js';
switchChange_type: 1,
rules,
formData: {
student_name:'',//*
student_phone:'',//*
age:'',//*
school_name:'',//
grade:'',//
class_name:'',//
customer_source:'',//*
add_staff_id:'',//id*
contact_name:'',//*
province_id:'',//-
city_id:'',//-
district_id:'',//-
full_address:'',//
community_name:'',//
customer_tags_name:'',//,,
customer_tags:[],
customer_tags:['2','3'],//
},
show_date: false,
result_date: '',
@ -289,15 +304,18 @@ import commonApi from '@/api/common.js';
options_customer_tags:[
{
text: '标签1',
value: '1'
value: '1',
checked:false,//"true=,false=
},
{
text: '标签2',
value: '2'
value: '2',
checked:false,//
},
{
text: '标签3',
value: '3'
value: '3',
checked:false,//
}
],//
@ -439,6 +457,12 @@ import commonApi from '@/api/common.js';
e.options.forEach((v,k)=>{
customer_tags_arr.push(v.value)
customer_tags_name_arr.push(v.text)
//v.value this.options_customer_tagscheckedtrue
this.options_customer_tags.forEach((v,k)=>{
if(v.value == v.value){
v.checked = true
}
})
})
this.formData.customer_tags_name = customer_tags_name_arr.join(',')//

Loading…
Cancel
Save