|
|
@ -12,6 +12,21 @@ |
|
|
|
|
|
|
|
|
<view class="title" style="margin-top: 20rpx;">基础信息</view> |
|
|
<view class="title" style="margin-top: 20rpx;">基础信息</view> |
|
|
<view class="input-style"> |
|
|
<view class="input-style"> |
|
|
|
|
|
<fui-form-item label="选择课程" asterisk asteriskPosition="right" labelSize='26' prop="" background='#434544' |
|
|
|
|
|
labelColor='#fff' :bottomBorder='false'> |
|
|
|
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
|
|
|
|
|
|
|
|
|
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(`courses_id`)" |
|
|
|
|
|
v-if="!formData.courses_id">点击选择 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(`courses_id`)" v-else> |
|
|
|
|
|
{{str_courses_id}} |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
</fui-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<fui-form-item label="线索标题" asterisk asteriskPosition="right" labelSize='26' prop="title" |
|
|
<fui-form-item label="线索标题" asterisk asteriskPosition="right" labelSize='26' prop="title" |
|
|
background='#434544' labelColor='#fff' :bottomBorder='false'> |
|
|
background='#434544' labelColor='#fff' :bottomBorder='false'> |
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
@ -349,6 +364,7 @@ export default { |
|
|
|
|
|
|
|
|
//表单 |
|
|
//表单 |
|
|
formData: { |
|
|
formData: { |
|
|
|
|
|
courses_id:'',//课程id |
|
|
title:'',//线索标题 |
|
|
title:'',//线索标题 |
|
|
source_channel:'',//来源渠道 |
|
|
source_channel:'',//来源渠道 |
|
|
customer_source:'',//客户来源 |
|
|
customer_source:'',//客户来源 |
|
|
@ -371,6 +387,16 @@ export default { |
|
|
linkage: true,//是否联动选择 |
|
|
linkage: true,//是否联动选择 |
|
|
options: [],//下拉选择器可选值列表 |
|
|
options: [],//下拉选择器可选值列表 |
|
|
|
|
|
|
|
|
|
|
|
//课程id选择-相关 |
|
|
|
|
|
//字典-课程选择 |
|
|
|
|
|
options_courses_id: [ |
|
|
|
|
|
// { |
|
|
|
|
|
// 'value': 1, |
|
|
|
|
|
// 'text': '类型1' |
|
|
|
|
|
// } |
|
|
|
|
|
],//课程id选择列表 |
|
|
|
|
|
str_courses_id:'',//文本显示-课程id选择 |
|
|
|
|
|
|
|
|
//来源渠道-相关 |
|
|
//来源渠道-相关 |
|
|
//字典-来源渠道 |
|
|
//字典-来源渠道 |
|
|
options_source_channel: [ |
|
|
options_source_channel: [ |
|
|
@ -558,6 +584,7 @@ export default { |
|
|
async init() { |
|
|
async init() { |
|
|
//获取登录用户信息 |
|
|
//获取登录用户信息 |
|
|
this.getUserInfo() |
|
|
this.getUserInfo() |
|
|
|
|
|
this.getDict_courses_id()//获取字典-课程id选择 |
|
|
this.getDict_source_channel()//获取字典-来源渠道 |
|
|
this.getDict_source_channel()//获取字典-来源渠道 |
|
|
this.getDict_customer_source()//获取字典-客户来源 |
|
|
this.getDict_customer_source()//获取字典-客户来源 |
|
|
this.getDict_customer_tags()//获取字典-客户标签 |
|
|
this.getDict_customer_tags()//获取字典-客户标签 |
|
|
@ -589,6 +616,28 @@ export default { |
|
|
this.str_add_staff_id = res.data.name//顾问名字 |
|
|
this.str_add_staff_id = res.data.name//顾问名字 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//获取字典-课程id选择 |
|
|
|
|
|
async getDict_courses_id(){ |
|
|
|
|
|
let res = await marketApi.selectCourseList({}) |
|
|
|
|
|
if(res.code != 1){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let dictionary = res.data |
|
|
|
|
|
let arr = [] |
|
|
|
|
|
dictionary.forEach((v,k)=>{ |
|
|
|
|
|
arr.push({ |
|
|
|
|
|
text: v.name, |
|
|
|
|
|
value: v.id, |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
this.options_courses_id = arr |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取人员列表 |
|
|
//获取人员列表 |
|
|
async getStaffList() { |
|
|
async getStaffList() { |
|
|
@ -811,6 +860,14 @@ export default { |
|
|
|
|
|
|
|
|
//表单验证 |
|
|
//表单验证 |
|
|
async validatorForm(data) { |
|
|
async validatorForm(data) { |
|
|
|
|
|
//课程id |
|
|
|
|
|
if(!data.courses_id){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '请选择课程', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
//线索标题 |
|
|
//线索标题 |
|
|
if(!data.title){ |
|
|
if(!data.title){ |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
@ -925,6 +982,12 @@ export default { |
|
|
selectCon(type) { |
|
|
selectCon(type) { |
|
|
this.options_type = type |
|
|
this.options_type = type |
|
|
switch (type) { |
|
|
switch (type) { |
|
|
|
|
|
//课程id选择 |
|
|
|
|
|
case 'courses_id': |
|
|
|
|
|
this.options = this.options_courses_id |
|
|
|
|
|
this.show = true |
|
|
|
|
|
this.linkage = true |
|
|
|
|
|
break; |
|
|
//来源渠道 |
|
|
//来源渠道 |
|
|
case 'source_channel': |
|
|
case 'source_channel': |
|
|
this.options = this.options_source_channel |
|
|
this.options = this.options_source_channel |
|
|
@ -980,6 +1043,11 @@ export default { |
|
|
this.show = false |
|
|
this.show = false |
|
|
let type = this.options_type |
|
|
let type = this.options_type |
|
|
switch (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': |
|
|
case 'source_channel': |
|
|
this.str_source_channel = e.text//选中的text值 |
|
|
this.str_source_channel = e.text//选中的text值 |
|
|
|