|
|
|
@ -24,7 +24,8 @@ |
|
|
|
<view class="form-style"> |
|
|
|
<fui-form ref="form" top="0" :model="formData" :show="false"> |
|
|
|
|
|
|
|
<view class="title" style="margin-top: 20rpx; display: flex; justify-content: space-between; align-items: center;"> |
|
|
|
<view class="title" |
|
|
|
style="margin-top: 20rpx; display: flex; justify-content: space-between; align-items: center;"> |
|
|
|
<text>基础信息</text> |
|
|
|
<view class="quick-fill-btn" @click="openQuickFill"> |
|
|
|
<text style="color: #29d3b4; font-size: 24rpx;">快速填写</text> |
|
|
|
@ -233,46 +234,6 @@ |
|
|
|
></fui-input> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
|
|
|
|
<!--需求--> |
|
|
|
<fui-form-item |
|
|
|
label="需求" |
|
|
|
|
|
|
|
labelSize='26' |
|
|
|
prop="title" |
|
|
|
background='#434544' |
|
|
|
labelColor='#fff' |
|
|
|
:bottomBorder='false'> |
|
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
|
<fui-input |
|
|
|
:borderBottom="false" |
|
|
|
:padding="[0]" |
|
|
|
placeholder="点击填写" |
|
|
|
v-model="formData.demand" |
|
|
|
backgroundColor="#434544" |
|
|
|
size="26" |
|
|
|
color="#fff" |
|
|
|
></fui-input> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
<!--决策人--> |
|
|
|
<fui-form-item |
|
|
|
label="决策人" |
|
|
|
|
|
|
|
labelSize='26' |
|
|
|
prop="title" |
|
|
|
background='#434544' |
|
|
|
labelColor='#fff' |
|
|
|
:bottomBorder='false'> |
|
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
|
<view |
|
|
|
class="input-title" |
|
|
|
style="margin-right:14rpx;" |
|
|
|
@click="openCicker(`decision_maker`)"> |
|
|
|
{{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
<!--客户初步意向度--> |
|
|
|
<fui-form-item |
|
|
|
label="客户初步意向度" |
|
|
|
@ -317,7 +278,8 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="fui-btn__box"> |
|
|
|
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="nextStep('1')">下一步</fui-button> |
|
|
|
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="nextStep('1')">下一步 |
|
|
|
</fui-button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
@ -328,9 +290,29 @@ |
|
|
|
|
|
|
|
<view class="title" style="margin-top: 20rpx;">六要素信息</view> |
|
|
|
<view class="input-style"> |
|
|
|
<!--需求--> |
|
|
|
<fui-form-item |
|
|
|
label="一、需求" |
|
|
|
labelSize='26' |
|
|
|
prop="title" |
|
|
|
background='#434544' |
|
|
|
labelColor='#fff' |
|
|
|
:bottomBorder='false'> |
|
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
|
<fui-input |
|
|
|
:borderBottom="false" |
|
|
|
:padding="[0]" |
|
|
|
placeholder="点击填写" |
|
|
|
v-model="formData.demand" |
|
|
|
backgroundColor="#434544" |
|
|
|
size="26" |
|
|
|
color="#fff" |
|
|
|
></fui-input> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
<!--购买力--> |
|
|
|
<fui-form-item |
|
|
|
label="购买力" |
|
|
|
label="二、购买力" |
|
|
|
labelSize='26' |
|
|
|
prop="" |
|
|
|
background='#434544' |
|
|
|
@ -348,7 +330,8 @@ |
|
|
|
</fui-form-item> |
|
|
|
<!--认知理念--> |
|
|
|
<fui-form-item |
|
|
|
label="认知理念" |
|
|
|
label="三、认知理念" |
|
|
|
label-width="210" |
|
|
|
labelSize='26' |
|
|
|
prop="" |
|
|
|
background='#434544' |
|
|
|
@ -364,9 +347,13 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
<view style="color: #ffffff;width: 100%;text-align: left;margin: 10px;"> |
|
|
|
四、时间/距离 |
|
|
|
</view> |
|
|
|
|
|
|
|
<!--可选上课时间--> |
|
|
|
<fui-form-item |
|
|
|
label="可选上课时间" |
|
|
|
label="1、可选上课时间" |
|
|
|
labelWidth="240" |
|
|
|
labelSize='26' |
|
|
|
prop="" |
|
|
|
@ -375,17 +362,26 @@ |
|
|
|
:bottomBorder='false' |
|
|
|
> |
|
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
|
<view |
|
|
|
class="input-title" |
|
|
|
style="margin-right:14rpx;" |
|
|
|
@click="openDate(`optional_class_time`)"> |
|
|
|
{{ (formData.optional_class_time) ? formData.optional_class_time : '点击选择' }} |
|
|
|
</view> |
|
|
|
<fui-input |
|
|
|
:borderBottom="false" |
|
|
|
:padding="[0]" |
|
|
|
placeholder="填写可选上课时间" |
|
|
|
v-model="formData.optional_class_time" |
|
|
|
backgroundColor="#434544" |
|
|
|
size="26" |
|
|
|
color="#fff" |
|
|
|
></fui-input> |
|
|
|
<!-- <view--> |
|
|
|
<!-- class="input-title"--> |
|
|
|
<!-- style="margin-right:14rpx;"--> |
|
|
|
<!-- @click="openDate(`optional_class_time`)">--> |
|
|
|
<!-- {{ (formData.optional_class_time) ? formData.optional_class_time : '点击选择' }}--> |
|
|
|
<!-- </view>--> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
<!--承诺到访时间--> |
|
|
|
<fui-form-item |
|
|
|
label="承诺到访时间" |
|
|
|
label="2、承诺到访时间" |
|
|
|
labelSize='26' |
|
|
|
labelWidth="240" |
|
|
|
prop="" |
|
|
|
@ -404,8 +400,9 @@ |
|
|
|
</fui-form-item> |
|
|
|
<!--距离--> |
|
|
|
<fui-form-item |
|
|
|
label="距离" |
|
|
|
label="3、距离" |
|
|
|
labelSize='26' |
|
|
|
label-width="210" |
|
|
|
prop="title" |
|
|
|
background='#434544' |
|
|
|
labelColor='#fff' |
|
|
|
@ -418,7 +415,28 @@ |
|
|
|
{{ (formData.distance) ? picker_config.distance.text : '点击选择' }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</fui-form-item> |
|
|
|
<!-- 决策人 --> |
|
|
|
<fui-form-item label="五、决策人" labelSize='26' prop="decision_maker" background='#434544' labelColor='#fff' |
|
|
|
:bottomBorder='false'> |
|
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
|
<view class="input-title" style="margin-right:14rpx;" @click="openCicker('decision_maker')"> |
|
|
|
{{ formData.decision_maker ? picker_config.decision_maker.text : '点击选择' }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
<!-- 情感粘度 --> |
|
|
|
<fui-form-item |
|
|
|
label="六、情感粘度" |
|
|
|
labelSize='26' |
|
|
|
label-width="210" |
|
|
|
prop="emotional_stickiness_score" background='#434544' labelColor='#fff' |
|
|
|
:bottomBorder='false'> |
|
|
|
<view class="input-title" style="margin-right:14rpx;"> |
|
|
|
<view class="input-title" style="margin-right:14rpx;" @click="openCicker('emotional_stickiness_score')"> |
|
|
|
{{ formData.emotional_stickiness_score ? picker_config.emotional_stickiness_score.text : '点击选择' }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</fui-form-item> |
|
|
|
<!--沟通备注--> |
|
|
|
<fui-form-item |
|
|
|
@ -449,11 +467,10 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 年月日-选择时间 --> |
|
|
|
<fui-date-picker |
|
|
|
:show="date_picker_show" |
|
|
|
type="3" |
|
|
|
type="5" |
|
|
|
:startYear="2020" |
|
|
|
:endYear="2030" |
|
|
|
:value="getCurrentDate()" |
|
|
|
@ -492,7 +509,9 @@ |
|
|
|
<!--数据列表--> |
|
|
|
<view class="ul" v-else> |
|
|
|
<view class="duplicate-notice"> |
|
|
|
<text style="color: #ff6b35; font-size: 28rpx; margin-bottom: 20rpx;">检测到手机号重复,是否为现有用户添加新学员?</text> |
|
|
|
<text style="color: #ff6b35; font-size: 28rpx; margin-bottom: 20rpx;"> |
|
|
|
检测到手机号重复,是否为现有用户添加新学员? |
|
|
|
</text> |
|
|
|
<fui-button |
|
|
|
background="#29d3b4" |
|
|
|
color="#fff" |
|
|
|
@ -588,13 +607,9 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import apiRoute from '@/api/apiRoute.js'; |
|
|
|
import commonApi from '@/api/common.js'; |
|
|
|
import marketApi from '@/api/market.js'; |
|
|
|
import memberApi from '@/api/member.js'; |
|
|
|
import util from '@/common/util.js'; |
|
|
|
import dictUtil from '@/common/dictUtil.js'; |
|
|
|
import dictUtilSimple from '@/common/dictUtilSimple.js'; |
|
|
|
import apiRoute from '@/api/apiRoute.js' |
|
|
|
import util from '@/common/util.js' |
|
|
|
import dictUtilSimple from '@/common/dictUtilSimple.js' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -634,6 +649,7 @@ export default { |
|
|
|
optional_class_time: '',//可选上课时间 |
|
|
|
campus: '', |
|
|
|
referral_resource_id: '',//转介绍资源ID |
|
|
|
emotional_stickiness_score: '',//情感粘性 |
|
|
|
}, |
|
|
|
campus_list: [], |
|
|
|
//下拉选择器相关 |
|
|
|
@ -702,6 +718,10 @@ export default { |
|
|
|
text: '', |
|
|
|
options: [], |
|
|
|
}, |
|
|
|
emotional_stickiness_score: { |
|
|
|
text: '', |
|
|
|
options: [], |
|
|
|
}, |
|
|
|
},//选择器选项配置 |
|
|
|
|
|
|
|
// 年月日选择组件 |
|
|
|
@ -709,8 +729,6 @@ export default { |
|
|
|
date_picker_show: false,//时间选择器是否展示 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//登录用户信息 |
|
|
|
userInfo: {}, |
|
|
|
|
|
|
|
@ -725,12 +743,12 @@ export default { |
|
|
|
optionTable: [ |
|
|
|
{ |
|
|
|
id: 0, |
|
|
|
name: '添加客户' |
|
|
|
name: '添加客户', |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 1, |
|
|
|
name: '添加六要素' |
|
|
|
} |
|
|
|
name: '添加六要素', |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|
// 转介绍资源相关 |
|
|
|
@ -747,20 +765,13 @@ export default { |
|
|
|
onShow() { |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
onUnload() { |
|
|
|
// 清理定时器 |
|
|
|
if (this.referralSearchTimer) { |
|
|
|
clearTimeout(this.referralSearchTimer) |
|
|
|
this.referralSearchTimer = null |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 预加载字典数据 |
|
|
|
async preloadDictData() { |
|
|
|
const dictKeys = [ |
|
|
|
'SourceChannel', 'source', 'customer_purchasing_power', |
|
|
|
'preliminarycustomerintention', 'cognitive_concept', |
|
|
|
'kh_status', 'decision_maker', 'distance' |
|
|
|
'kh_status', 'decision_maker', 'distance','emotional_stickiness_score' |
|
|
|
] |
|
|
|
|
|
|
|
// 静默预加载,不阻塞页面显示 |
|
|
|
@ -808,7 +819,7 @@ export default { |
|
|
|
if (!this.quickFillText.trim()) { |
|
|
|
uni.showToast({ |
|
|
|
title: '请输入要解析的文本', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -820,7 +831,7 @@ export default { |
|
|
|
{ key: 'phone_number', patterns: ['电话', '手机', '联系电话', '手机号', '电话号码', '联系方式'] }, |
|
|
|
{ key: 'campus', patterns: ['校区', '所属校区', '校区名称'] }, |
|
|
|
{ key: 'age', patterns: ['年龄'] }, |
|
|
|
{ key: 'birthday', patterns: ['生日', '出生日期', '生日日期'] } |
|
|
|
{ key: 'birthday', patterns: ['生日', '出生日期', '生日日期'] }, |
|
|
|
] |
|
|
|
|
|
|
|
// 用于存储解析结果 |
|
|
|
@ -873,13 +884,13 @@ export default { |
|
|
|
if (fillCount > 0) { |
|
|
|
uni.showToast({ |
|
|
|
title: `成功填写${fillCount}个字段`, |
|
|
|
icon: 'success' |
|
|
|
icon: 'success', |
|
|
|
}) |
|
|
|
this.showQuickFill = false |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '未能识别到有效信息,请检查格式', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
@ -887,7 +898,7 @@ export default { |
|
|
|
console.error('解析失败:', error) |
|
|
|
uni.showToast({ |
|
|
|
title: '解析失败,请检查格式', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -896,7 +907,7 @@ export default { |
|
|
|
findAndSetCampus(campusText) { |
|
|
|
const campusOptions = this.picker_config.campus?.options || [] |
|
|
|
const matchedCampus = campusOptions.find(option => |
|
|
|
option.text.includes(campusText) || campusText.includes(option.text) |
|
|
|
option.text.includes(campusText) || campusText.includes(option.text), |
|
|
|
) |
|
|
|
|
|
|
|
if (matchedCampus) { |
|
|
|
@ -920,7 +931,7 @@ export default { |
|
|
|
chinese: `${year}年${month}月${day}日`, // YYYY年MM月DD日 |
|
|
|
slash: `${year}/${month}/${day}`, // YYYY/MM/DD |
|
|
|
dot: `${year}.${month}.${day}`, // YYYY.MM.DD |
|
|
|
space: `${year} ${month} ${day}` // YYYY MM DD |
|
|
|
space: `${year} ${month} ${day}`, // YYYY MM DD |
|
|
|
} |
|
|
|
|
|
|
|
// 优先使用标准格式,如果组件显示异常可以在这里切换格式 |
|
|
|
@ -998,7 +1009,8 @@ export default { |
|
|
|
'cognitive_concept', // 认知理念 |
|
|
|
'kh_status', // 客户状态 |
|
|
|
'decision_maker', // 决策人 |
|
|
|
'distance' // 距离 |
|
|
|
'distance', // 距离 |
|
|
|
'emotional_stickiness_score', // 情感粘度 |
|
|
|
] |
|
|
|
|
|
|
|
// 批量获取字典数据(静默获取,不显示加载提示) |
|
|
|
@ -1029,7 +1041,8 @@ export default { |
|
|
|
'cognitive_concept': 'cognitive_idea', |
|
|
|
'kh_status': 'status', |
|
|
|
'decision_maker': 'decision_maker', |
|
|
|
'distance': 'distance' |
|
|
|
'distance': 'distance', |
|
|
|
'emotional_stickiness_score': 'emotional_stickiness_score', |
|
|
|
} |
|
|
|
|
|
|
|
// 处理每个字典数据 |
|
|
|
@ -1040,7 +1053,7 @@ export default { |
|
|
|
if (Array.isArray(dictItems) && dictItems.length > 0) { |
|
|
|
const formattedOptions = dictItems.map(item => ({ |
|
|
|
text: item.name || '', |
|
|
|
value: item.value || '' |
|
|
|
value: item.value || '', |
|
|
|
})) |
|
|
|
|
|
|
|
// 设置到picker配置中 |
|
|
|
@ -1063,6 +1076,7 @@ export default { |
|
|
|
await this.getDict('status') |
|
|
|
await this.getDict('decision_maker') |
|
|
|
await this.getDict('distance') |
|
|
|
await this.getDict('emotional_stickiness_score') |
|
|
|
} catch (error) { |
|
|
|
console.error('回退方案也失败了:', error) |
|
|
|
} |
|
|
|
@ -1073,7 +1087,7 @@ export default { |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1098,7 +1112,7 @@ export default { |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1113,24 +1127,41 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取字典 |
|
|
|
async getDict(inputName) { |
|
|
|
let key = '' |
|
|
|
switch (inputName) { |
|
|
|
case 'source_channel': key = 'SourceChannel'; break; |
|
|
|
case 'source': key = 'source'; break; |
|
|
|
case 'purchasing_power': key = 'customer_purchasing_power'; break; |
|
|
|
case 'cognitive_idea': key = 'cognitive_concept'; break; |
|
|
|
case 'decision_maker': key = 'decision_maker'; break; |
|
|
|
case 'initial_intent': key = 'preliminarycustomerintention'; break; |
|
|
|
case 'status': key = 'kh_status'; break; |
|
|
|
case 'distance': key = 'distance'; break; |
|
|
|
} |
|
|
|
if(!key){ return } |
|
|
|
case 'source_channel': |
|
|
|
key = 'SourceChannel' |
|
|
|
break |
|
|
|
case 'source': |
|
|
|
key = 'source' |
|
|
|
break |
|
|
|
case 'purchasing_power': |
|
|
|
key = 'customer_purchasing_power' |
|
|
|
break |
|
|
|
case 'cognitive_idea': |
|
|
|
key = 'cognitive_concept' |
|
|
|
break |
|
|
|
case 'decision_maker': |
|
|
|
key = 'decision_maker' |
|
|
|
break |
|
|
|
case 'initial_intent': |
|
|
|
key = 'preliminarycustomerintention' |
|
|
|
break |
|
|
|
case 'status': |
|
|
|
key = 'kh_status' |
|
|
|
break |
|
|
|
case 'distance': |
|
|
|
key = 'distance' |
|
|
|
break |
|
|
|
case 'emotional_stickiness_score': |
|
|
|
key = 'emotional_stickiness_score' |
|
|
|
break |
|
|
|
} |
|
|
|
if (!key) { |
|
|
|
return |
|
|
|
} |
|
|
|
// 使用 util.getDict 获取并缓存字典 |
|
|
|
let dictionary = await util.getDict(key) |
|
|
|
if (!dictionary || !Array.isArray(dictionary) || dictionary.length === 0) { |
|
|
|
@ -1152,7 +1183,7 @@ export default { |
|
|
|
if (!this.student_name) { |
|
|
|
uni.showToast({ |
|
|
|
title: '请输入检索关键字', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1160,13 +1191,13 @@ export default { |
|
|
|
this.clientUserList = [] |
|
|
|
|
|
|
|
let param = { |
|
|
|
name:this.student_name |
|
|
|
name: this.student_name, |
|
|
|
} |
|
|
|
let res = await apiRoute.xs_getAllCustomerResources(param) |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1186,21 +1217,21 @@ export default { |
|
|
|
|
|
|
|
//跳转页面-客户详情 |
|
|
|
openViewClueInfo(item) { |
|
|
|
let resource_sharing_id = ''; |
|
|
|
let resource_sharing_id = '' |
|
|
|
if (item.resourceSharingHasMany && item.resourceSharingHasMany.length > 0) { |
|
|
|
resource_sharing_id = item.resourceSharingHasMany[0].id; // 共享资源表id |
|
|
|
resource_sharing_id = item.resourceSharingHasMany[0].id // 共享资源表id |
|
|
|
} |
|
|
|
|
|
|
|
if (!resource_sharing_id) { |
|
|
|
uni.showToast({ |
|
|
|
title: '暂时无法查看', |
|
|
|
icon: 'none' |
|
|
|
}); |
|
|
|
return; |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages-market/clue/clue_info?resource_sharing_id=${resource_sharing_id}` |
|
|
|
url: `/pages-market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`, |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1209,7 +1240,7 @@ export default { |
|
|
|
let from_id = this.userInfo.id//发送者的id |
|
|
|
let to_id = item.customerResource.id//接收者ID |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages-common/im_chat_info?from_id=${from_id}&to_id=${to_id}` |
|
|
|
url: `/pages-common/im_chat_info?from_id=${from_id}&to_id=${to_id}`, |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1221,9 +1252,9 @@ export default { |
|
|
|
if (!tel) { |
|
|
|
uni.showToast({ |
|
|
|
title: '电话号码为空', |
|
|
|
icon: 'none' |
|
|
|
}); |
|
|
|
return; |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1241,18 +1272,17 @@ export default { |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
uni.makePhoneCall({ |
|
|
|
phoneNumber: tel |
|
|
|
phoneNumber: tel, |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//年龄失去焦点处理 - 计算生日 |
|
|
|
handleAgeBlur() { |
|
|
|
if (!this.formData.age) { |
|
|
|
@ -1266,7 +1296,7 @@ export default { |
|
|
|
if (isNaN(age) || age < 0) { |
|
|
|
uni.showToast({ |
|
|
|
title: '年龄请输入大于等于0的数字', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
this.formData.age = '' |
|
|
|
this.formData.birthday = '' |
|
|
|
@ -1278,7 +1308,7 @@ export default { |
|
|
|
if (ageStr.includes('.') && ageStr.split('.')[1].length > 2) { |
|
|
|
uni.showToast({ |
|
|
|
title: '年龄小数最多保留2位', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1330,7 +1360,7 @@ export default { |
|
|
|
console.error('计算生日失败:', error) |
|
|
|
uni.showToast({ |
|
|
|
title: '生日计算失败,请重新输入', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
this.formData.birthday = '' |
|
|
|
} |
|
|
|
@ -1345,7 +1375,7 @@ export default { |
|
|
|
this.clientUserList = [] |
|
|
|
|
|
|
|
let param = { |
|
|
|
phone_number:this.formData.phone_number |
|
|
|
phone_number: this.formData.phone_number, |
|
|
|
} |
|
|
|
let res = await apiRoute.xs_getAllCustomerResources(param) |
|
|
|
if (res.code != 1) { |
|
|
|
@ -1354,7 +1384,7 @@ export default { |
|
|
|
} |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1368,7 +1398,7 @@ export default { |
|
|
|
if (!this.clientUserList || this.clientUserList.length == 0) { |
|
|
|
uni.showToast({ |
|
|
|
title: '没有找到重复的用户', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1380,7 +1410,7 @@ export default { |
|
|
|
if (!this.formData.name) { |
|
|
|
uni.showToast({ |
|
|
|
title: '请填写学员姓名', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1388,7 +1418,7 @@ export default { |
|
|
|
if (!this.formData.gender) { |
|
|
|
uni.showToast({ |
|
|
|
title: '请选择学员性别', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1398,7 +1428,7 @@ export default { |
|
|
|
name: this.formData.name, |
|
|
|
gender: this.formData.gender, |
|
|
|
user_id: userId, |
|
|
|
status: 1 |
|
|
|
status: 1, |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
@ -1406,21 +1436,21 @@ export default { |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg || '添加学员失败', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
title: '学员添加成功', |
|
|
|
icon: 'success' |
|
|
|
icon: 'success', |
|
|
|
}) |
|
|
|
|
|
|
|
//关闭弹窗并跳转回列表页 |
|
|
|
this.showDuplicateCheck = false |
|
|
|
setTimeout(() => { |
|
|
|
uni.redirectTo({ |
|
|
|
url: `/pages-market/clue/index` |
|
|
|
url: `/pages-market/clue/index`, |
|
|
|
}) |
|
|
|
}, 1000) |
|
|
|
|
|
|
|
@ -1428,19 +1458,12 @@ export default { |
|
|
|
console.error('添加学员失败:', error) |
|
|
|
uni.showToast({ |
|
|
|
title: '添加学员失败', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//切换tag列表 |
|
|
|
async segmented(e) { |
|
|
|
console.log(e) |
|
|
|
@ -1543,7 +1566,7 @@ export default { |
|
|
|
if (res.msg !== '暂无数据') { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
} |
|
|
|
this.referralSearchResults = [] |
|
|
|
@ -1568,7 +1591,7 @@ export default { |
|
|
|
if (this.referralSearchQuery.trim()) { |
|
|
|
uni.showToast({ |
|
|
|
title: '搜索失败,请重试', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1583,7 +1606,7 @@ export default { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
title: '已选择转介绍资源', |
|
|
|
icon: 'success' |
|
|
|
icon: 'success', |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1665,7 +1688,7 @@ export default { |
|
|
|
if (!data.name) { |
|
|
|
uni.showToast({ |
|
|
|
title: '学生姓名必填', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
this.nextStep('0') |
|
|
|
return false |
|
|
|
@ -1674,7 +1697,7 @@ export default { |
|
|
|
if (!data.phone_number) { |
|
|
|
uni.showToast({ |
|
|
|
title: '电话必填', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
this.nextStep('0') |
|
|
|
return false |
|
|
|
@ -1683,7 +1706,7 @@ export default { |
|
|
|
if (!data.campus) { |
|
|
|
uni.showToast({ |
|
|
|
title: '校区必填', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
this.nextStep('0') |
|
|
|
return false |
|
|
|
@ -1693,7 +1716,7 @@ export default { |
|
|
|
if (data.source == 3 && !data.referral_resource_id) { |
|
|
|
uni.showToast({ |
|
|
|
title: '请选择转介绍资源', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
this.nextStep('0') |
|
|
|
return false |
|
|
|
@ -1725,24 +1748,24 @@ export default { |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'success' |
|
|
|
icon: 'success', |
|
|
|
}) |
|
|
|
//延迟1s执行 |
|
|
|
setTimeout(() => { |
|
|
|
//跳转页面-线索列表 |
|
|
|
//关闭当前页跳转新页面 |
|
|
|
uni.redirectTo({ |
|
|
|
url: `/pages-market/clue/index` |
|
|
|
url: `/pages-market/clue/index`, |
|
|
|
}) |
|
|
|
}, 1000) |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
@ -1753,8 +1776,10 @@ export default { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.input_box { |
|
|
|
width: 70%; |
|
|
|
|
|
|
|
input { |
|
|
|
width: 100%; |
|
|
|
height: 60rpx; |
|
|
|
@ -1762,6 +1787,7 @@ export default { |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.btn { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #24BA9F; |
|
|
|
@ -1802,28 +1828,34 @@ export default { |
|
|
|
//查重结构弹出层 |
|
|
|
.fui-scroll__wrap { |
|
|
|
height: 60vh; |
|
|
|
|
|
|
|
.title_box { |
|
|
|
padding: 10rpx 20rpx; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #101010; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.section_ul { |
|
|
|
margin-bottom: 100rpx; |
|
|
|
height: 98%; |
|
|
|
|
|
|
|
.not_list { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.img { |
|
|
|
width: 112rpx; |
|
|
|
height: 112rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.title { |
|
|
|
padding: 0; |
|
|
|
margin-top: 10rpx; |
|
|
|
@ -1832,11 +1864,13 @@ export default { |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.ul { |
|
|
|
padding: 26rpx; |
|
|
|
padding-bottom: 100rpx; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
.li { |
|
|
|
margin-bottom: 26rpx; |
|
|
|
padding: 26rpx; |
|
|
|
@ -1849,33 +1883,41 @@ export default { |
|
|
|
color: #fff; |
|
|
|
font-size: 28rpx; |
|
|
|
border: 0rpx solid rgba(121, 121, 121, 1); |
|
|
|
|
|
|
|
.left_box { |
|
|
|
width: 80%; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
gap: 20rpx; |
|
|
|
|
|
|
|
.box_1 { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.img { |
|
|
|
width: 48rpx; |
|
|
|
height: 48rpx; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
|
|
|
|
.name { |
|
|
|
margin-left: 20rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box_2 { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.left { |
|
|
|
display: flex; |
|
|
|
align-items: flex-end; |
|
|
|
|
|
|
|
.name { |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.call { |
|
|
|
margin-left: 10rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
@ -1883,13 +1925,16 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box_3 { |
|
|
|
display: flex; |
|
|
|
gap: 30rpx; |
|
|
|
|
|
|
|
.right { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
gap: 10rpx; |
|
|
|
|
|
|
|
.img { |
|
|
|
width: 16rpx; |
|
|
|
height: 16rpx; |
|
|
|
@ -1898,11 +1943,13 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.right_box { |
|
|
|
width: 25%; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.img { |
|
|
|
width: 70rpx; |
|
|
|
height: 70rpx; |
|
|
|
|