|
|
@ -4,20 +4,12 @@ |
|
|
<!-- 主要内容区域 --> |
|
|
<!-- 主要内容区域 --> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<!-- 客户信息卡片 --> |
|
|
<!-- 客户信息卡片 --> |
|
|
<ClientInfoCard |
|
|
<ClientInfoCard :client-info="clientInfo" :actions="[]" @call="handleMakeCall" |
|
|
:client-info="clientInfo" |
|
|
@message="handleSendMessage" /> |
|
|
:actions="[]" |
|
|
|
|
|
@call="handleMakeCall" |
|
|
|
|
|
@message="handleSendMessage" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 标签切换器 --> |
|
|
<!-- 标签切换器 --> |
|
|
<view class="tab-switcher-container"> |
|
|
<view class="tab-switcher-container"> |
|
|
<TabSwitcher |
|
|
<TabSwitcher :tabs="tabs" :active-tab-id="switch_tags_type" @tab-change="handleTabChange" /> |
|
|
:tabs="tabs" |
|
|
|
|
|
:active-tab-id="switch_tags_type" |
|
|
|
|
|
@tab-change="handleTabChange" |
|
|
|
|
|
/> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 学生信息卡片区域 --> |
|
|
<!-- 学生信息卡片区域 --> |
|
|
@ -32,22 +24,14 @@ |
|
|
|
|
|
|
|
|
<!-- 学生信息滑动卡片 --> |
|
|
<!-- 学生信息滑动卡片 --> |
|
|
<view class="student-cards"> |
|
|
<view class="student-cards"> |
|
|
<swiper |
|
|
<swiper class="student-swiper" :indicator-dots="studentList.length > 1" |
|
|
class="student-swiper" |
|
|
:circular="studentList.length > 1" indicator-color="rgba(255, 255, 255, 0.3)" |
|
|
:indicator-dots="studentList.length > 1" |
|
|
indicator-active-color="#29D3B4" previous-margin="20" next-margin="20" |
|
|
:circular="studentList.length > 1" |
|
|
|
|
|
indicator-color="rgba(255, 255, 255, 0.3)" |
|
|
|
|
|
indicator-active-color="#29D3B4" |
|
|
|
|
|
previous-margin="20" |
|
|
|
|
|
next-margin="20" |
|
|
|
|
|
@change="onStudentSwiperChange"> |
|
|
@change="onStudentSwiperChange"> |
|
|
<swiper-item v-for="(student, index) in studentList" :key="student.id"> |
|
|
<swiper-item v-for="(student, index) in studentList" :key="student.id"> |
|
|
<view class="student-swiper-content"> |
|
|
<view class="student-swiper-content"> |
|
|
<StudentInfoCard |
|
|
<StudentInfoCard :student="student" :show-details="true" |
|
|
:student="student" |
|
|
@action="handleStudentAction" /> |
|
|
:show-details="true" |
|
|
|
|
|
@action="handleStudentAction" |
|
|
|
|
|
/> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</swiper-item> |
|
|
</swiper-item> |
|
|
</swiper> |
|
|
</swiper> |
|
|
@ -55,12 +39,8 @@ |
|
|
|
|
|
|
|
|
<!-- 操作按钮区域 - 移到Swiper外部,独立滑动 --> |
|
|
<!-- 操作按钮区域 - 移到Swiper外部,独立滑动 --> |
|
|
<view class="action-buttons-section" v-if="currentStudent"> |
|
|
<view class="action-buttons-section" v-if="currentStudent"> |
|
|
<view |
|
|
<view class="action-item" v-for="action in actionButtons" :key="action.key" |
|
|
class="action-item" |
|
|
@click.stop="handleStudentActionClick(action, currentStudent)"> |
|
|
v-for="action in actionButtons" |
|
|
|
|
|
:key="action.key" |
|
|
|
|
|
@click.stop="handleStudentActionClick(action, currentStudent)" |
|
|
|
|
|
> |
|
|
|
|
|
<view class="action-icon"> |
|
|
<view class="action-icon"> |
|
|
<text>{{ action.icon }}</text> |
|
|
<text>{{ action.icon }}</text> |
|
|
</view> |
|
|
</view> |
|
|
@ -80,11 +60,8 @@ |
|
|
|
|
|
|
|
|
<!-- 课程信息标签内容 --> |
|
|
<!-- 课程信息标签内容 --> |
|
|
<view class="course-section" v-if="switch_tags_type == 2"> |
|
|
<view class="course-section" v-if="switch_tags_type == 2"> |
|
|
<CourseInfoCard |
|
|
<CourseInfoCard v-if="courseInfo && courseInfo.length > 0" :course-list="courseInfo" |
|
|
v-if="courseInfo && courseInfo.length > 0" |
|
|
@view-detail="viewCourseDetail" /> |
|
|
:course-list="courseInfo" |
|
|
|
|
|
@view-detail="viewCourseDetail" |
|
|
|
|
|
/> |
|
|
|
|
|
<view v-else class="empty-state"> |
|
|
<view v-else class="empty-state"> |
|
|
<text class="empty-icon">📚</text> |
|
|
<text class="empty-icon">📚</text> |
|
|
<text class="empty-text">暂无课程信息</text> |
|
|
<text class="empty-text">暂无课程信息</text> |
|
|
@ -97,12 +74,8 @@ |
|
|
<text class="empty-icon">📞</text> |
|
|
<text class="empty-icon">📞</text> |
|
|
<text class="empty-text">暂无通话记录</text> |
|
|
<text class="empty-text">暂无通话记录</text> |
|
|
</view> |
|
|
</view> |
|
|
<CallRecordCard |
|
|
<CallRecordCard v-for="record in listCallUp" :key="record.id" :record="record" |
|
|
v-for="record in listCallUp" |
|
|
@remark="openAddRemark" /> |
|
|
:key="record.id" |
|
|
|
|
|
:record="record" |
|
|
|
|
|
@remark="openAddRemark" |
|
|
|
|
|
/> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 体测记录标签内容 --> |
|
|
<!-- 体测记录标签内容 --> |
|
|
@ -119,12 +92,8 @@ |
|
|
<text class="empty-icon">📊</text> |
|
|
<text class="empty-icon">📊</text> |
|
|
<text class="empty-text">暂无体测记录</text> |
|
|
<text class="empty-text">暂无体测记录</text> |
|
|
</view> |
|
|
</view> |
|
|
<FitnessRecordCard |
|
|
<FitnessRecordCard v-for="record in currentStudentFitnessRecords" :key="record.id" :record="record" |
|
|
v-for="record in currentStudentFitnessRecords" |
|
|
@edit="openEditFitnessRecord" /> |
|
|
:key="record.id" |
|
|
|
|
|
:record="record" |
|
|
|
|
|
@edit="openEditFitnessRecord" |
|
|
|
|
|
/> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 学习计划标签内容 --> |
|
|
<!-- 学习计划标签内容 --> |
|
|
@ -141,34 +110,19 @@ |
|
|
<text class="empty-icon">🎁</text> |
|
|
<text class="empty-icon">🎁</text> |
|
|
<text class="empty-text">暂无赠品记录</text> |
|
|
<text class="empty-text">暂无赠品记录</text> |
|
|
</view> |
|
|
</view> |
|
|
<GiftRecordCard |
|
|
<GiftRecordCard v-for="record in giftRecords" :key="record.id" :record="record" /> |
|
|
v-for="record in giftRecords" |
|
|
|
|
|
:key="record.id" |
|
|
|
|
|
:record="record" |
|
|
|
|
|
/> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 底部弹窗组件 --> |
|
|
<!-- 底部弹窗组件 --> |
|
|
<BottomPopup |
|
|
<BottomPopup :visible="currentPopup !== null" :title="popupTitle" :has-footer="needsFooter" @close="closePopup" |
|
|
:visible="currentPopup !== null" |
|
|
@click.stop> |
|
|
:title="popupTitle" |
|
|
|
|
|
:has-footer="needsFooter" |
|
|
|
|
|
@close="closePopup" |
|
|
|
|
|
@click.stop |
|
|
|
|
|
> |
|
|
|
|
|
<!-- 课程信息弹窗 --> |
|
|
<!-- 课程信息弹窗 --> |
|
|
<CourseInfoCard |
|
|
<CourseInfoCard v-if="currentPopup === 'course_info'" :course-list="courseInfo" |
|
|
v-if="currentPopup === 'course_info'" |
|
|
@view-detail="viewCourseDetail" /> |
|
|
:course-list="courseInfo" |
|
|
|
|
|
@view-detail="viewCourseDetail" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 体测记录弹窗 --> |
|
|
<!-- 体测记录弹窗 --> |
|
|
<view |
|
|
<view class="fitness-records-container" v-if="currentPopup === 'fitness_record'"> |
|
|
class="fitness-records-container" |
|
|
|
|
|
v-if="currentPopup === 'fitness_record'" |
|
|
|
|
|
> |
|
|
|
|
|
<!-- 空状态提示 --> |
|
|
<!-- 空状态提示 --> |
|
|
<view v-if="currentStudentFitnessRecords.length === 0" class="empty-state"> |
|
|
<view v-if="currentStudentFitnessRecords.length === 0" class="empty-state"> |
|
|
<view class="empty-icon">📊</view> |
|
|
<view class="empty-icon">📊</view> |
|
|
@ -177,45 +131,25 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 体测记录列表 --> |
|
|
<!-- 体测记录列表 --> |
|
|
<FitnessRecordCard |
|
|
<FitnessRecordCard v-for="record in currentStudentFitnessRecords" :key="record.id" :record="record" |
|
|
v-for="record in currentStudentFitnessRecords" |
|
|
@edit="openEditFitnessRecord" /> |
|
|
:key="record.id" |
|
|
|
|
|
:record="record" |
|
|
|
|
|
@edit="openEditFitnessRecord" |
|
|
|
|
|
/> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 学习计划弹窗 --> |
|
|
<!-- 学习计划弹窗 --> |
|
|
<StudyPlanCard |
|
|
<StudyPlanCard v-if="currentPopup === 'study_plan'" :plan-list="studyPlanList" @edit="openEditStudyPlan" /> |
|
|
v-if="currentPopup === 'study_plan'" |
|
|
|
|
|
:plan-list="studyPlanList" |
|
|
|
|
|
@edit="openEditStudyPlan" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 订单列表弹窗 --> |
|
|
<!-- 订单列表弹窗 --> |
|
|
<OrderListCard |
|
|
<OrderListCard v-if="currentPopup === 'order_list'" :order-list="orderList" @add-order="openAddOrderDialog" |
|
|
v-if="currentPopup === 'order_list'" |
|
|
@pay-order="handlePayOrder" @view-detail="viewOrderDetail" /> |
|
|
:order-list="orderList" |
|
|
|
|
|
@add-order="openAddOrderDialog" |
|
|
|
|
|
@pay-order="handlePayOrder" |
|
|
|
|
|
@view-detail="viewOrderDetail" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 服务列表弹窗 --> |
|
|
<!-- 服务列表弹窗 --> |
|
|
<ServiceListCard |
|
|
<ServiceListCard v-if="currentPopup === 'service_list'" :service-list="serviceList" /> |
|
|
v-if="currentPopup === 'service_list'" |
|
|
|
|
|
:service-list="serviceList" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 底部操作按钮 --> |
|
|
<!-- 底部操作按钮 --> |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<view class="popup-footer-btns"> |
|
|
<view class="popup-footer-btns"> |
|
|
<view class="footer-btn cancel-btn" @click.stop="closePopup">关闭</view> |
|
|
<view class="footer-btn cancel-btn" @click.stop="closePopup">关闭</view> |
|
|
<view |
|
|
<view class="footer-btn confirm-btn" v-if="showAddButton" @click.stop="handleAddAction">新增</view> |
|
|
class="footer-btn confirm-btn" |
|
|
|
|
|
v-if="showAddButton" |
|
|
|
|
|
@click.stop="handleAddAction" |
|
|
|
|
|
>新增</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
</BottomPopup> |
|
|
</BottomPopup> |
|
|
@ -223,11 +157,7 @@ |
|
|
<!-- 保留原有的编辑弹窗 --> |
|
|
<!-- 保留原有的编辑弹窗 --> |
|
|
<uni-popup ref="remarkPopup" type="dialog"> |
|
|
<uni-popup ref="remarkPopup" type="dialog"> |
|
|
<view class="remark-dialog"> |
|
|
<view class="remark-dialog"> |
|
|
<textarea |
|
|
<textarea v-model="remark_content" placeholder="请输入备注内容" maxlength="200"></textarea> |
|
|
v-model="remark_content" |
|
|
|
|
|
placeholder="请输入备注内容" |
|
|
|
|
|
maxlength="200" |
|
|
|
|
|
></textarea> |
|
|
|
|
|
<view class="dialog-btns"> |
|
|
<view class="dialog-btns"> |
|
|
<view class="btn cancel" @click="closeRemark">取消</view> |
|
|
<view class="btn cancel" @click="closeRemark">取消</view> |
|
|
<view class="btn confirm" @click="confirmRemark">确定</view> |
|
|
<view class="btn confirm" @click="confirmRemark">确定</view> |
|
|
@ -235,19 +165,17 @@ |
|
|
</view> |
|
|
</view> |
|
|
</uni-popup> |
|
|
</uni-popup> |
|
|
|
|
|
|
|
|
<FitnessRecordPopup ref="fitnessRecordPopup" :resource-id="String(clientInfo.resource_id)" :student-id="currentStudent && currentStudent.id" @confirm="handleFitnessRecordConfirm" /> |
|
|
<FitnessRecordPopup ref="fitnessRecordPopup" :resource-id="String(clientInfo.resource_id)" |
|
|
<StudentEditPopup ref="studentEditPopup" :resource-id="clientInfo.resource_id" @confirm="handleStudentEditConfirm" /> |
|
|
:student-id="currentStudent && currentStudent.id" @confirm="handleFitnessRecordConfirm" /> |
|
|
<StudyPlanPopup ref="studyPlanPopup" :student-id="currentStudent && currentStudent.id" @confirm="handleStudyPlanConfirm" /> |
|
|
<StudentEditPopup ref="studentEditPopup" :resource-id="clientInfo.resource_id" |
|
|
|
|
|
@confirm="handleStudentEditConfirm" /> |
|
|
|
|
|
<StudyPlanPopup ref="studyPlanPopup" :student-id="currentStudent && currentStudent.id" |
|
|
|
|
|
@confirm="handleStudyPlanConfirm" /> |
|
|
|
|
|
|
|
|
<!-- 新增订单弹窗 --> |
|
|
<!-- 新增订单弹窗 --> |
|
|
<uni-popup ref="orderFormPopup" type="bottom"> |
|
|
<uni-popup ref="orderFormPopup" type="bottom"> |
|
|
<OrderFormPopup |
|
|
<OrderFormPopup :visible="showOrderForm" :student-info="currentStudent" |
|
|
:visible="showOrderForm" |
|
|
:resource-id="clientInfo.resource_id" @cancel="closeOrderForm" @confirm="handleOrderFormConfirm" /> |
|
|
:student-info="currentStudent" |
|
|
|
|
|
:resource-id="clientInfo.resource_id" |
|
|
|
|
|
@cancel="closeOrderForm" |
|
|
|
|
|
@confirm="handleOrderFormConfirm" |
|
|
|
|
|
/> |
|
|
|
|
|
</uni-popup> |
|
|
</uni-popup> |
|
|
|
|
|
|
|
|
<!-- 二维码支付弹窗 --> |
|
|
<!-- 二维码支付弹窗 --> |
|
|
@ -275,12 +203,8 @@ |
|
|
|
|
|
|
|
|
<!-- 二维码区域 --> |
|
|
<!-- 二维码区域 --> |
|
|
<view class="qrcode-container"> |
|
|
<view class="qrcode-container"> |
|
|
<image |
|
|
<image v-if="qrCodePaymentData.qrcodeImage" :src="qrCodePaymentData.qrcodeImage" |
|
|
v-if="qrCodePaymentData.qrcodeImage" |
|
|
class="qrcode-image" mode="aspectFit" /> |
|
|
:src="qrCodePaymentData.qrcodeImage" |
|
|
|
|
|
class="qrcode-image" |
|
|
|
|
|
mode="aspectFit" |
|
|
|
|
|
/> |
|
|
|
|
|
<text v-else class="qrcode-placeholder">二维码加载中...</text> |
|
|
<text v-else class="qrcode-placeholder">二维码加载中...</text> |
|
|
<text class="qrcode-tip">请使用微信扫码完成支付</text> |
|
|
<text class="qrcode-tip">请使用微信扫码完成支付</text> |
|
|
</view> |
|
|
</view> |
|
|
@ -341,7 +265,11 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 基本数据 |
|
|
// 基本数据 |
|
|
clientInfo: { id: '', resource_id: '', customerResource: {} }, |
|
|
clientInfo: { |
|
|
|
|
|
id: '', |
|
|
|
|
|
resource_id: '', |
|
|
|
|
|
customerResource: {} |
|
|
|
|
|
}, |
|
|
userInfo: {}, |
|
|
userInfo: {}, |
|
|
listCallUp: [], |
|
|
listCallUp: [], |
|
|
courseInfo: [], |
|
|
courseInfo: [], |
|
|
@ -368,21 +296,58 @@ export default { |
|
|
currentRecord: null, |
|
|
currentRecord: null, |
|
|
|
|
|
|
|
|
// 配置数据 |
|
|
// 配置数据 |
|
|
tabs: [ |
|
|
tabs: [{ |
|
|
{ id: 1, name: '基本资料' }, |
|
|
id: 1, |
|
|
{ id: 3, name: '通话记录' }, |
|
|
name: '基本资料' |
|
|
{ id: 7, name: '修改资料' }, |
|
|
}, |
|
|
{ id: 6, name: '修改记录' }, |
|
|
{ |
|
|
{ id: 8, name: '赠品记录' } |
|
|
id: 3, |
|
|
|
|
|
name: '通话记录' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 7, |
|
|
|
|
|
name: '修改资料' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 6, |
|
|
|
|
|
name: '修改记录' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 8, |
|
|
|
|
|
name: '赠品记录' |
|
|
|
|
|
} |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|
actionButtons: [ |
|
|
actionButtons: [{ |
|
|
{ key: 'course_arrangement', text: '课程安排', icon: '📅' }, |
|
|
key: 'course_arrangement', |
|
|
{ key: 'order_list', text: '订单列表', icon: '📋' }, |
|
|
text: '课程安排', |
|
|
{ key: 'service_list', text: '服务列表', icon: '🔧' }, |
|
|
icon: '📅' |
|
|
{ key: 'course_info', text: '课程信息', icon: '📚' }, |
|
|
}, |
|
|
{ key: 'fitness_record', text: '体测记录', icon: '📊' }, |
|
|
{ |
|
|
{ key: 'study_plan', text: '学习计划', icon: '📝' } |
|
|
key: 'order_list', |
|
|
|
|
|
text: '订单列表', |
|
|
|
|
|
icon: '📋' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
key: 'service_list', |
|
|
|
|
|
text: '服务列表', |
|
|
|
|
|
icon: '🔧' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
key: 'course_info', |
|
|
|
|
|
text: '课程信息', |
|
|
|
|
|
icon: '📚' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
key: 'fitness_record', |
|
|
|
|
|
text: '体测记录', |
|
|
|
|
|
icon: '📊' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
key: 'study_plan', |
|
|
|
|
|
text: '学习计划', |
|
|
|
|
|
icon: '📝' |
|
|
|
|
|
} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -429,7 +394,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
if (!options?.resource_sharing_id) { |
|
|
if (!options?.resource_sharing_id) { |
|
|
uni.showToast({ title: '缺少必要参数', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '缺少必要参数', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
setTimeout(() => uni.navigateBack(), 1500) |
|
|
setTimeout(() => uni.navigateBack(), 1500) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -470,7 +438,9 @@ export default { |
|
|
async getInfo() { |
|
|
async getInfo() { |
|
|
if (!this.resource_sharing_id) return |
|
|
if (!this.resource_sharing_id) return |
|
|
try { |
|
|
try { |
|
|
const res = await apiRoute.xs_resourceSharingInfo({ resource_sharing_id: this.resource_sharing_id }) |
|
|
const res = await apiRoute.xs_resourceSharingInfo({ |
|
|
|
|
|
resource_sharing_id: this.resource_sharing_id |
|
|
|
|
|
}) |
|
|
if (res.code === 1) { |
|
|
if (res.code === 1) { |
|
|
this.clientInfo = res.data |
|
|
this.clientInfo = res.data |
|
|
} |
|
|
} |
|
|
@ -482,7 +452,9 @@ export default { |
|
|
async getListCallUp() { |
|
|
async getListCallUp() { |
|
|
if (!this.clientInfo?.resource_id) return |
|
|
if (!this.clientInfo?.resource_id) return |
|
|
try { |
|
|
try { |
|
|
const res = await apiRoute.listCallUp({ resource_id: this.clientInfo.resource_id }) |
|
|
const res = await apiRoute.listCallUp({ |
|
|
|
|
|
resource_id: this.clientInfo.resource_id |
|
|
|
|
|
}) |
|
|
if (res.code === 1) { |
|
|
if (res.code === 1) { |
|
|
this.listCallUp = res.data || [] |
|
|
this.listCallUp = res.data || [] |
|
|
} |
|
|
} |
|
|
@ -490,15 +462,39 @@ export default { |
|
|
console.error('获取通话记录失败:', error) |
|
|
console.error('获取通话记录失败:', error) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
handleMakeCall() { |
|
|
async handleMakeCall() { |
|
|
const phone = this.clientInfo?.customerResource?.phone_number |
|
|
const phone = this.clientInfo?.customerResource?.phone_number |
|
|
if (phone) { |
|
|
if (phone) { |
|
|
uni.makePhoneCall({ phoneNumber: phone }) |
|
|
let param = { |
|
|
|
|
|
staff_id: this.userInfo.id, //员工id |
|
|
|
|
|
resource_id: this.clientInfo?.resource_id, //资源ID |
|
|
|
|
|
resource_type: '', //资源类型(如设备、文件、系统等) |
|
|
|
|
|
communication_type: 'phone', //沟通类型: phone-电话, email-邮件, meeting-会议, other-其他 |
|
|
|
|
|
communication_result: 'success', //沟通结果: success-成功, failure-失败, pending-待定 |
|
|
|
|
|
remarks: null, //备注 |
|
|
|
|
|
tag: null, //标签 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let res = await apiRoute.xs_communicationRecordsAdd(param) //添加通过记录 |
|
|
|
|
|
if (res.code != 1) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uni.makePhoneCall({ |
|
|
|
|
|
phoneNumber: phone |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleSendMessage() { |
|
|
handleSendMessage() { |
|
|
uni.showToast({ title: '发送消息功能待实现', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '发送消息功能待实现', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openAddRemark(record) { |
|
|
openAddRemark(record) { |
|
|
@ -509,7 +505,10 @@ export default { |
|
|
|
|
|
|
|
|
async confirmRemark() { |
|
|
async confirmRemark() { |
|
|
if (!this.remark_content.trim() || !this.currentRecord?.id) { |
|
|
if (!this.remark_content.trim() || !this.currentRecord?.id) { |
|
|
uni.showToast({ title: '请输入备注内容', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '请输入备注内容', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -520,11 +519,17 @@ export default { |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if (res.code === 1) { |
|
|
if (res.code === 1) { |
|
|
uni.showToast({ title: '备注更新成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '备注更新成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
await this.getListCallUp() |
|
|
await this.getListCallUp() |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
uni.showToast({ title: '更新失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '更新失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.closeRemark() |
|
|
this.closeRemark() |
|
|
@ -625,7 +630,10 @@ export default { |
|
|
|
|
|
|
|
|
viewCourseDetail(course) { |
|
|
viewCourseDetail(course) { |
|
|
if (!course?.id) { |
|
|
if (!course?.id) { |
|
|
uni.showToast({ title: '课程信息不完整', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '课程信息不完整', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.$navigateToPage(`/pages-market/course/course_detail`, { |
|
|
this.$navigateToPage(`/pages-market/course/course_detail`, { |
|
|
@ -634,15 +642,18 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async handleTabChange({ tabId }) { |
|
|
async handleTabChange({ |
|
|
|
|
|
tabId |
|
|
|
|
|
}) { |
|
|
this.switch_tags_type = tabId |
|
|
this.switch_tags_type = tabId |
|
|
|
|
|
|
|
|
if (tabId === 2) await this.getCourseInfo() |
|
|
if (tabId === 2) await this.getCourseInfo() |
|
|
if (tabId === 3) await this.getListCallUp() |
|
|
if (tabId === 3) await this.getListCallUp() |
|
|
if (tabId === 4) await this.getFitnessRecords() |
|
|
if (tabId === 4) await this.getFitnessRecords() |
|
|
if (tabId === 6) { |
|
|
if (tabId === 6) { |
|
|
|
|
|
|
|
|
this.$navigateToPage(`/pages-market/clue/edit_clues_log`, { |
|
|
this.$navigateToPage(`/pages-market/clue/edit_clues_log`, { |
|
|
resource_id: this.clientInfo.id |
|
|
resource_id: this.clientInfo.resource_id |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
console.log('切换标签页:', this.clientInfo) |
|
|
console.log('切换标签页:', this.clientInfo) |
|
|
@ -652,7 +663,10 @@ export default { |
|
|
if (tabId === 8) await this.getGiftRecords() |
|
|
if (tabId === 8) await this.getGiftRecords() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleStudentAction({ action, student }) { |
|
|
handleStudentAction({ |
|
|
|
|
|
action, |
|
|
|
|
|
student |
|
|
|
|
|
}) { |
|
|
// this.setCurrentStudent(student) |
|
|
// this.setCurrentStudent(student) |
|
|
console.log('学生操作:', action, student) |
|
|
console.log('学生操作:', action, student) |
|
|
|
|
|
|
|
|
@ -762,7 +776,9 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 构建完整的URL |
|
|
// 构建完整的URL |
|
|
const { img_domian } = require('@/common/config.js') |
|
|
const { |
|
|
|
|
|
img_domian |
|
|
|
|
|
} = require('@/common/config.js') |
|
|
|
|
|
|
|
|
// 处理相对路径 |
|
|
// 处理相对路径 |
|
|
let cleanPath = relativePath |
|
|
let cleanPath = relativePath |
|
|
@ -791,39 +807,60 @@ export default { |
|
|
|
|
|
|
|
|
async handleFitnessRecordConfirm(result) { |
|
|
async handleFitnessRecordConfirm(result) { |
|
|
try { |
|
|
try { |
|
|
const { isEditing, data } = result |
|
|
const { |
|
|
|
|
|
isEditing, |
|
|
|
|
|
data |
|
|
|
|
|
} = result |
|
|
|
|
|
|
|
|
if (isEditing) { |
|
|
if (isEditing) { |
|
|
// 编辑体测记录 |
|
|
// 编辑体测记录 |
|
|
const response = await apiRoute.xy_physicalTestEdit(data) |
|
|
const response = await apiRoute.xy_physicalTestEdit(data) |
|
|
if (response.code === 1) { |
|
|
if (response.code === 1) { |
|
|
uni.showToast({ title: '编辑成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '编辑成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
// 刷新体测记录列表 |
|
|
// 刷新体测记录列表 |
|
|
await this.getFitnessRecords() |
|
|
await this.getFitnessRecords() |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ title: response.msg || '编辑失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: response.msg || '编辑失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// 新增体测记录 |
|
|
// 新增体测记录 |
|
|
const response = await apiRoute.xy_physicalTestAdd(data) |
|
|
const response = await apiRoute.xy_physicalTestAdd(data) |
|
|
if (response.code === 1) { |
|
|
if (response.code === 1) { |
|
|
uni.showToast({ title: '新增成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '新增成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
// 刷新体测记录列表 |
|
|
// 刷新体测记录列表 |
|
|
await this.getFitnessRecords() |
|
|
await this.getFitnessRecords() |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ title: response.msg || '新增失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: response.msg || '新增失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('保存体测记录失败:', error) |
|
|
console.error('保存体测记录失败:', error) |
|
|
uni.showToast({ title: '保存失败,请重试', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '保存失败,请重试', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 学习计划相关方法 |
|
|
// 学习计划相关方法 |
|
|
openAddStudyPlan() { |
|
|
openAddStudyPlan() { |
|
|
if (!this.currentStudent) { |
|
|
if (!this.currentStudent) { |
|
|
uni.showToast({ title: '请先选择学生', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '请先选择学生', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.$refs.studyPlanPopup.openAdd() |
|
|
this.$refs.studyPlanPopup.openAdd() |
|
|
@ -835,32 +872,50 @@ export default { |
|
|
|
|
|
|
|
|
async handleStudyPlanConfirm(result) { |
|
|
async handleStudyPlanConfirm(result) { |
|
|
try { |
|
|
try { |
|
|
const { isEditing, data } = result |
|
|
const { |
|
|
|
|
|
isEditing, |
|
|
|
|
|
data |
|
|
|
|
|
} = result |
|
|
|
|
|
|
|
|
if (isEditing) { |
|
|
if (isEditing) { |
|
|
// 编辑学习计划 |
|
|
// 编辑学习计划 |
|
|
const response = await apiRoute.editStudyPlan(data) |
|
|
const response = await apiRoute.editStudyPlan(data) |
|
|
if (response.code === 1) { |
|
|
if (response.code === 1) { |
|
|
uni.showToast({ title: '编辑成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '编辑成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
// 刷新学习计划列表 |
|
|
// 刷新学习计划列表 |
|
|
await this.getStudyPlanList() |
|
|
await this.getStudyPlanList() |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ title: response.msg || '编辑失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: response.msg || '编辑失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// 新增学习计划 |
|
|
// 新增学习计划 |
|
|
const response = await apiRoute.addStudyPlan(data) |
|
|
const response = await apiRoute.addStudyPlan(data) |
|
|
if (response.code === 1) { |
|
|
if (response.code === 1) { |
|
|
uni.showToast({ title: '新增成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '新增成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
// 刷新学习计划列表 |
|
|
// 刷新学习计划列表 |
|
|
await this.getStudyPlanList() |
|
|
await this.getStudyPlanList() |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ title: response.msg || '新增失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: response.msg || '新增失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('保存学习计划失败:', error) |
|
|
console.error('保存学习计划失败:', error) |
|
|
uni.showToast({ title: '保存失败,请重试', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '保存失败,请重试', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -868,7 +923,9 @@ export default { |
|
|
async getStudentList() { |
|
|
async getStudentList() { |
|
|
try { |
|
|
try { |
|
|
if (this.clientInfo?.resource_id) { |
|
|
if (this.clientInfo?.resource_id) { |
|
|
const res = await apiRoute.xs_getStudentList({ parent_resource_id: this.clientInfo.resource_id }) |
|
|
const res = await apiRoute.xs_getStudentList({ |
|
|
|
|
|
parent_resource_id: this.clientInfo.resource_id |
|
|
|
|
|
}) |
|
|
if (res.code === 1) { |
|
|
if (res.code === 1) { |
|
|
// 处理接口返回的学生数据,转换字段 |
|
|
// 处理接口返回的学生数据,转换字段 |
|
|
this.studentList = await this.processStudentData(res.data || []) |
|
|
this.studentList = await this.processStudentData(res.data || []) |
|
|
@ -876,8 +933,7 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 使用模拟数据(匹配真实接口字段结构) |
|
|
// 使用模拟数据(匹配真实接口字段结构) |
|
|
const mockData = [ |
|
|
const mockData = [{ |
|
|
{ |
|
|
|
|
|
id: 1, |
|
|
id: 1, |
|
|
name: '张小明', |
|
|
name: '张小明', |
|
|
gender: 1, // 1=男, 2=女 |
|
|
gender: 1, // 1=男, 2=女 |
|
|
@ -889,8 +945,7 @@ export default { |
|
|
trial_class_count: 3, |
|
|
trial_class_count: 3, |
|
|
// 其他原有字段 |
|
|
// 其他原有字段 |
|
|
age: 9 |
|
|
age: 9 |
|
|
} |
|
|
}] |
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
// 处理模拟数据 |
|
|
// 处理模拟数据 |
|
|
this.studentList = await this.processStudentData(mockData) |
|
|
this.studentList = await this.processStudentData(mockData) |
|
|
@ -914,7 +969,8 @@ export default { |
|
|
academic_affairs: await this.getPersonnelName(student.consultant_id), |
|
|
academic_affairs: await this.getPersonnelName(student.consultant_id), |
|
|
trial_course_count: student.trial_class_count || 0, |
|
|
trial_course_count: student.trial_class_count || 0, |
|
|
// 使用后端API返回的真实到访状态数据 |
|
|
// 使用后端API返回的真实到访状态数据 |
|
|
course_visit_status: this.formatVisitStatus(student.first_visit_status, student.second_visit_status) |
|
|
course_visit_status: this.formatVisitStatus(student.first_visit_status, student |
|
|
|
|
|
.second_visit_status) |
|
|
} |
|
|
} |
|
|
processedStudents.push(processedStudent) |
|
|
processedStudents.push(processedStudent) |
|
|
} |
|
|
} |
|
|
@ -928,7 +984,9 @@ export default { |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
// 调用接口获取school_student_label表中的标签名称 |
|
|
// 调用接口获取school_student_label表中的标签名称 |
|
|
const res = await apiRoute.getStudentLabel({ id: labelId }) |
|
|
const res = await apiRoute.getStudentLabel({ |
|
|
|
|
|
id: labelId |
|
|
|
|
|
}) |
|
|
if (res.code === 1) { |
|
|
if (res.code === 1) { |
|
|
return res.data ? [res.data.label_name] : [] |
|
|
return res.data ? [res.data.label_name] : [] |
|
|
} |
|
|
} |
|
|
@ -1075,7 +1133,10 @@ export default { |
|
|
// 这里需要调用删除学员的API |
|
|
// 这里需要调用删除学员的API |
|
|
// const res = await apiRoute.deleteStudent({ student_id: student.id }) |
|
|
// const res = await apiRoute.deleteStudent({ student_id: student.id }) |
|
|
// if (res.code === 1) { |
|
|
// if (res.code === 1) { |
|
|
uni.showToast({ title: '删除成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '删除成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
// 刷新学员列表 |
|
|
// 刷新学员列表 |
|
|
await this.getStudentList() |
|
|
await this.getStudentList() |
|
|
// } else { |
|
|
// } else { |
|
|
@ -1083,7 +1144,10 @@ export default { |
|
|
// } |
|
|
// } |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('删除学员失败:', error) |
|
|
console.error('删除学员失败:', error) |
|
|
uni.showToast({ title: '删除失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '删除失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1112,11 +1176,17 @@ export default { |
|
|
// 保存成功后刷新学生列表 |
|
|
// 保存成功后刷新学生列表 |
|
|
await this.getStudentList() |
|
|
await this.getStudentList() |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ title: res.msg || '保存失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.msg || '保存失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('保存学生信息失败:', error) |
|
|
console.error('保存学生信息失败:', error) |
|
|
uni.showToast({ title: '保存失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '保存失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1236,7 +1306,10 @@ export default { |
|
|
const targetStudentId = studentId || this.currentStudent?.id |
|
|
const targetStudentId = studentId || this.currentStudent?.id |
|
|
|
|
|
|
|
|
if (!targetStudentId) { |
|
|
if (!targetStudentId) { |
|
|
uni.showToast({ title: '请先选择学生', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '请先选择学生', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -1297,7 +1370,10 @@ export default { |
|
|
// 刷新订单列表 |
|
|
// 刷新订单列表 |
|
|
await this.getOrderList() |
|
|
await this.getOrderList() |
|
|
|
|
|
|
|
|
uni.showToast({ title: '订单创建成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '订单创建成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('处理订单确认失败:', error) |
|
|
console.error('处理订单确认失败:', error) |
|
|
} |
|
|
} |
|
|
@ -1335,11 +1411,17 @@ export default { |
|
|
this.showWechatPayment(order) |
|
|
this.showWechatPayment(order) |
|
|
break |
|
|
break |
|
|
default: |
|
|
default: |
|
|
uni.showToast({ title: '不支持的支付方式', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '不支持的支付方式', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('支付处理失败:', error) |
|
|
console.error('支付处理失败:', error) |
|
|
uni.showToast({ title: '支付处理失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '支付处理失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1361,15 +1443,24 @@ export default { |
|
|
const result = await apiRoute.xs_orderTableUpdatePaymentStatus(updateData) |
|
|
const result = await apiRoute.xs_orderTableUpdatePaymentStatus(updateData) |
|
|
|
|
|
|
|
|
if (result.code === 1) { |
|
|
if (result.code === 1) { |
|
|
uni.showToast({ title: '支付确认成功', icon: 'success' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '支付确认成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
// 刷新订单列表 |
|
|
// 刷新订单列表 |
|
|
await this.getOrderList() |
|
|
await this.getOrderList() |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ title: result.msg || '支付确认失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: result.msg || '支付确认失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('现金支付确认失败:', error) |
|
|
console.error('现金支付确认失败:', error) |
|
|
uni.showToast({ title: '支付确认失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '支付确认失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -1381,7 +1472,9 @@ export default { |
|
|
console.log('扫码支付:', order) |
|
|
console.log('扫码支付:', order) |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
uni.showLoading({ title: '生成支付二维码...' }) |
|
|
uni.showLoading({ |
|
|
|
|
|
title: '生成支付二维码...' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// 调用接口获取支付二维码 |
|
|
// 调用接口获取支付二维码 |
|
|
const res = await apiRoute.getOrderPayQrcode({ |
|
|
const res = await apiRoute.getOrderPayQrcode({ |
|
|
@ -1445,7 +1538,10 @@ export default { |
|
|
this.closeQRCodeModal() |
|
|
this.closeQRCodeModal() |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('支付确认失败:', error) |
|
|
console.error('支付确认失败:', error) |
|
|
uni.showToast({ title: '支付确认失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '支付确认失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -1464,7 +1560,8 @@ export default { |
|
|
success: async (modalRes) => { |
|
|
success: async (modalRes) => { |
|
|
if (modalRes.confirm) { |
|
|
if (modalRes.confirm) { |
|
|
// 这里可以设置为部分支付状态 |
|
|
// 这里可以设置为部分支付状态 |
|
|
await this.updateOrderStatus(order, 'partial', `SUB${Date.now()}`) |
|
|
await this.updateOrderStatus(order, 'partial', |
|
|
|
|
|
`SUB${Date.now()}`) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -1483,7 +1580,9 @@ export default { |
|
|
success: async (res) => { |
|
|
success: async (res) => { |
|
|
if (res.confirm) { |
|
|
if (res.confirm) { |
|
|
// 模拟微信支付流程 |
|
|
// 模拟微信支付流程 |
|
|
uni.showLoading({ title: '正在调用微信支付...' }) |
|
|
uni.showLoading({ |
|
|
|
|
|
title: '正在调用微信支付...' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// 模拟支付延时 |
|
|
// 模拟支付延时 |
|
|
setTimeout(async () => { |
|
|
setTimeout(async () => { |
|
|
@ -1495,7 +1594,8 @@ export default { |
|
|
content: '微信支付完成,请确认是否已收到款项?', |
|
|
content: '微信支付完成,请确认是否已收到款项?', |
|
|
success: async (confirmRes) => { |
|
|
success: async (confirmRes) => { |
|
|
if (confirmRes.confirm) { |
|
|
if (confirmRes.confirm) { |
|
|
await this.updateOrderStatus(order, 'paid', `WX${Date.now()}`) |
|
|
await this.updateOrderStatus(order, 'paid', |
|
|
|
|
|
`WX${Date.now()}`) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -1529,11 +1629,17 @@ export default { |
|
|
// 刷新订单列表 |
|
|
// 刷新订单列表 |
|
|
await this.getOrderList() |
|
|
await this.getOrderList() |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ title: result.msg || '状态更新失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: result.msg || '状态更新失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('更新订单状态失败:', error) |
|
|
console.error('更新订单状态失败:', error) |
|
|
uni.showToast({ title: '状态更新失败', icon: 'none' }) |
|
|
uni.showToast({ |
|
|
|
|
|
title: '状态更新失败', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1596,7 +1702,8 @@ ${orderInfo.paid_at ? '支付时间:' + this.formatOrderTime(orderInfo.paid_at |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 构建跳转参数 |
|
|
// 构建跳转参数 |
|
|
let url = `/pages-student/contracts/sign?contract_id=${contractId}&student_id=${studentId}&contract_name=${encodeURIComponent(order.product_name + '合同')}&user_role=staff` |
|
|
let url = |
|
|
|
|
|
`/pages-student/contracts/sign?contract_id=${contractId}&student_id=${studentId}&contract_name=${encodeURIComponent(order.product_name + '合同')}&user_role=staff` |
|
|
|
|
|
|
|
|
// 如果有合同签署记录ID,也传递过去(用于已存在的签署记录) |
|
|
// 如果有合同签署记录ID,也传递过去(用于已存在的签署记录) |
|
|
if (contractSignId) { |
|
|
if (contractSignId) { |
|
|
@ -1612,7 +1719,9 @@ ${orderInfo.paid_at ? '支付时间:' + this.formatOrderTime(orderInfo.paid_at |
|
|
// 根据订单获取合同信息 |
|
|
// 根据订单获取合同信息 |
|
|
async getContractByOrder(order, studentId) { |
|
|
async getContractByOrder(order, studentId) { |
|
|
try { |
|
|
try { |
|
|
uni.showLoading({ title: '获取合同信息...' }) |
|
|
uni.showLoading({ |
|
|
|
|
|
title: '获取合同信息...' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// 调用API获取订单对应的合同 |
|
|
// 调用API获取订单对应的合同 |
|
|
const res = await apiRoute.getContractByOrder({ |
|
|
const res = await apiRoute.getContractByOrder({ |
|
|
@ -1715,5 +1824,6 @@ ${orderInfo.paid_at ? '支付时间:' + this.formatOrderTime(orderInfo.paid_at |
|
|
.fitness-records-container::-webkit-scrollbar-thumb:hover { |
|
|
.fitness-records-container::-webkit-scrollbar-thumb:hover { |
|
|
background: #24B89E; |
|
|
background: #24B89E; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@import './clue_info.less'; |
|
|
@import './clue_info.less'; |
|
|
</style> |
|
|
</style> |