Browse Source

修改 bug

master
王泽彦 8 months ago
parent
commit
96690ca9d4
  1. 14
      admin/src/app/views/course_schedule/course_schedule.vue
  2. 1
      niucloud/app/api/controller/apiController/CustomerResources.php
  3. 3
      uniapp/pages-coach/coach/schedule/adjust_course.vue
  4. 36
      uniapp/pages-coach/coach/schedule/schedule_table.vue
  5. 347
      uniapp/pages-market/clue/add_clues.vue
  6. 3
      uniapp/pages-market/clue/class_arrangement.vue
  7. 3
      uniapp/pages-market/clue/class_arrangement_detail.vue

14
admin/src/app/views/course_schedule/course_schedule.vue

@ -263,15 +263,29 @@ const venueFilterList = ref<any[]>([])
// ID // ID
const getCampusName = (id: string | number) => { const getCampusName = (id: string | number) => {
// campusList
if (Array.isArray(campusList.value)) {
const campus = campusList.value.find(item => item.id === id) const campus = campusList.value.find(item => item.id === id)
return campus ? campus.campus_name : id return campus ? campus.campus_name : id
} else if (campusList.value && typeof campusList.value === 'object') {
//
const campusArray = Object.values(campusList.value)
const campus = campusArray.find((item: any) => item.id === id)
return campus ? campus.campus_name : id
}
return id
} }
// //
const loadCampusList = () => { const loadCampusList = () => {
getWithCampusList({}) getWithCampusList({})
.then((res) => { .then((res) => {
// API
if (res.data && typeof res.data === 'object' && !Array.isArray(res.data)) {
campusList.value = Object.values(res.data)
} else {
campusList.value = res.data || [] campusList.value = res.data || []
}
}) })
.catch(() => {}) .catch(() => {})
} }

1
niucloud/app/api/controller/apiController/CustomerResources.php

@ -115,6 +115,7 @@ class CustomerResources extends BaseApiService
"communication" => $request->param('communication', ''),//沟通备注 "communication" => $request->param('communication', ''),//沟通备注
"staff_id" => $request->param('staff_id', ''),//人员ID "staff_id" => $request->param('staff_id', ''),//人员ID
"efficacious" => $request->param('efficacious', 1), "efficacious" => $request->param('efficacious', 1),
"emotional_stickiness_score" => $request->param('emotional_stickiness_score', 1),
]; ];
if (strlen($customer_resources_data['phone_number']) > 12) { if (strlen($customer_resources_data['phone_number']) > 12) {

3
uniapp/pages-coach/coach/schedule/adjust_course.vue

@ -24,7 +24,8 @@
</view> </view>
<view class="info-row"> <view class="info-row">
<text class="info-label">授课教练</text> <text class="info-label">授课教练</text>
<text class="info-value">{{ scheduleInfo.coach_name }}</text> <text class="info-value">主教练{{ scheduleInfo.coach_name }}</text>
<text class="info-value">助教{{ scheduleInfo.coach_name }}</text>
</view> </view>
<view class="info-row"> <view class="info-row">
<text class="info-label">上课场地</text> <text class="info-label">上课场地</text>

36
uniapp/pages-coach/coach/schedule/schedule_table.vue

@ -71,6 +71,11 @@
class="frozen-content-scroll" class="frozen-content-scroll"
scroll-y scroll-y
:scroll-top="scrollTop" :scroll-top="scrollTop"
:enable-flex="true"
:scroll-anchoring="false"
:enhanced="true"
:bounces="false"
:scroll-with-animation="false"
> >
<view class="frozen-content"> <view class="frozen-content">
<!-- 时间模式 --> <!-- 时间模式 -->
@ -132,6 +137,11 @@
scroll-x scroll-x
scroll-y scroll-y
:scroll-top="scrollTop" :scroll-top="scrollTop"
:enable-flex="true"
:scroll-anchoring="false"
:enhanced="true"
:bounces="false"
:scroll-with-animation="false"
@scroll="onScroll" @scroll="onScroll"
> >
<view class="schedule-container-inner" :style="{ width: tableWidth + 'rpx', minWidth: '1260rpx' }"> <view class="schedule-container-inner" :style="{ width: tableWidth + 'rpx', minWidth: '1260rpx' }">
@ -429,6 +439,7 @@ export default {
// //
scrollTop: 0, scrollTop: 0,
scrollTimer: null, //
// //
tableWidth: 1500, // 7 (7*180+120=1380rpx) tableWidth: 1500, // 7 (7*180+120=1380rpx)
@ -537,6 +548,12 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
//
if (this.scrollTimer) {
clearTimeout(this.scrollTimer)
this.scrollTimer = null
}
// H5 // H5
// #ifndef MP-WEIXIN // #ifndef MP-WEIXIN
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
@ -1155,12 +1172,19 @@ export default {
}); });
}, },
// - // -
onScroll(e) { onScroll(e) {
// 使
if (this.scrollTimer) {
clearTimeout(this.scrollTimer)
}
this.scrollTimer = setTimeout(() => {
// //
if (e.detail.scrollTop !== undefined) { if (e.detail.scrollTop !== undefined && e.detail.scrollTop !== this.scrollTop) {
this.scrollTop = e.detail.scrollTop this.scrollTop = e.detail.scrollTop
} }
}, 16) // 60fps
}, },
// //
@ -1492,6 +1516,10 @@ export default {
.frozen-content-scroll { .frozen-content-scroll {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
/* 优化滚动性能 */
-webkit-overflow-scrolling: touch;
scroll-behavior: auto;
overscroll-behavior: none;
} }
.frozen-content { .frozen-content {
@ -1578,6 +1606,10 @@ export default {
.schedule-scroll { .schedule-scroll {
flex: 1; flex: 1;
overflow: scroll; overflow: scroll;
/* 优化滚动性能 */
-webkit-overflow-scrolling: touch;
scroll-behavior: auto;
overscroll-behavior: none;
} }
.schedule-grid { .schedule-grid {

347
uniapp/pages-market/clue/add_clues.vue

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

3
uniapp/pages-market/clue/class_arrangement.vue

@ -94,7 +94,8 @@
<view class="row">时间{{ course.course_date || '未设置' }} {{ course.time_slot || '' }}</view> <view class="row">时间{{ course.course_date || '未设置' }} {{ course.time_slot || '' }}</view>
<view class="row">校区{{ course.campus_name || '未设置' }}</view> <view class="row">校区{{ course.campus_name || '未设置' }}</view>
<view class="row">教室{{ course.venue ? course.venue.venue_name : '未设置' }}</view> <view class="row">教室{{ course.venue ? course.venue.venue_name : '未设置' }}</view>
<view class="row">课程{{ course.course ? course.course.course_name : '未设置' }}</view> <!-- <view class="row">课程{{ course.course ? course.course.course_name : '未设置' }}</view>-->
<view class="row">班级{{ course.class_id ? course.classmodel.class_name : '未设置' }}</view>
<view class="row">人数{{ course.available_capacity || 0 }}</view> <view class="row">人数{{ course.available_capacity || 0 }}</view>
<view class="row">安排情况{{ course.student ? course.student.length : 0 }}/{{course.max_students ? course.max_students : '不限'}}</view> <view class="row">安排情况{{ course.student ? course.student.length : 0 }}/{{course.max_students ? course.max_students : '不限'}}</view>
</view> </view>

3
uniapp/pages-market/clue/class_arrangement_detail.vue

@ -5,7 +5,8 @@
<text class="course-title">课程安排详情</text> <text class="course-title">课程安排详情</text>
<view class="course-detail"> <view class="course-detail">
<text class="course-item">日期{{ schedule_info.course_date }}</text> <text class="course-item">日期{{ schedule_info.course_date }}</text>
<text class="course-item">课程名称{{ schedule_info.course_name }}</text> <!-- <text class="course-item">课程名称{{ schedule_info.course_name }}</text>-->
<text class="course-item">班级名称{{ schedule_info.class_name }}</text>
<text class="course-item">课程时间{{ schedule_info.time_slot }}</text> <text class="course-item">课程时间{{ schedule_info.time_slot }}</text>
<text class="course-item">主教练{{ schedule_info.coach_name || '待安排' }}</text> <text class="course-item">主教练{{ schedule_info.coach_name || '待安排' }}</text>
<text class="course-item">场地信息{{ schedule_info.venue_name }}</text> <text class="course-item">场地信息{{ schedule_info.venue_name }}</text>

Loading…
Cancel
Save