diff --git a/api/market.js b/api/market.js
index aa1bb49..e4f0a7a 100644
--- a/api/market.js
+++ b/api/market.js
@@ -141,6 +141,16 @@ export default {
})
},
+ //销售端首页
+ selectCourseList(data = {}) {
+ let url = '/member/select_course_list'
+ return http.get(url, data).then(res => {
+ return res;
+ })
+ },
+
+
+
diff --git a/pages/market/clue/add_clues.vue b/pages/market/clue/add_clues.vue
index 2a75992..ad36153 100644
--- a/pages/market/clue/add_clues.vue
+++ b/pages/market/clue/add_clues.vue
@@ -12,6 +12,21 @@
基础信息
+
+
+
+ 点击选择
+
+
+ {{str_courses_id}}
+
+
+
+
+
+
@@ -349,6 +364,7 @@ export default {
//表单
formData: {
+ courses_id:'',//课程id
title:'',//线索标题
source_channel:'',//来源渠道
customer_source:'',//客户来源
@@ -371,6 +387,16 @@ export default {
linkage: true,//是否联动选择
options: [],//下拉选择器可选值列表
+ //课程id选择-相关
+ //字典-课程选择
+ options_courses_id: [
+ // {
+ // 'value': 1,
+ // 'text': '类型1'
+ // }
+ ],//课程id选择列表
+ str_courses_id:'',//文本显示-课程id选择
+
//来源渠道-相关
//字典-来源渠道
options_source_channel: [
@@ -558,6 +584,7 @@ export default {
async init() {
//获取登录用户信息
this.getUserInfo()
+ this.getDict_courses_id()//获取字典-课程id选择
this.getDict_source_channel()//获取字典-来源渠道
this.getDict_customer_source()//获取字典-客户来源
this.getDict_customer_tags()//获取字典-客户标签
@@ -589,6 +616,28 @@ export default {
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() {
@@ -811,6 +860,14 @@ export default {
//表单验证
async validatorForm(data) {
+ //课程id
+ if(!data.courses_id){
+ uni.showToast({
+ title: '请选择课程',
+ icon: 'none'
+ })
+ return false
+ }
//线索标题
if(!data.title){
uni.showToast({
@@ -925,6 +982,12 @@ export default {
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
@@ -980,6 +1043,11 @@ export default {
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值