From cc6c9c2e0a86ecca36a1b374bbbe29208fca3694 Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Fri, 13 Jun 2025 17:44:25 +0800
Subject: [PATCH 1/2] =?UTF-8?q?feat(market):=20=E6=B7=BB=E5=8A=A0=E5=88=9B?=
=?UTF-8?q?=E5=BB=BA=E8=AE=A2=E5=8D=95=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在 apiRoute.js 中新增获取全部课程列表和班级列表的接口
- 在 clue_info.vue 中添加获取当前登录员工信息的方法,并在订单列表页面使用这些信息- 在 order_list.vue 中添加创建订单的弹窗和相关逻辑,包括选择付款类型、课程和班级
- 优化订单列表的展示,增加订单状态和金额的显示
---
api/apiRoute.js | 14 +
pages/market/clue/clue_info.vue | 27 +-
pages/market/clue/order_list.vue | 502 ++++++++++++++++++++++++++++++-
3 files changed, 527 insertions(+), 16 deletions(-)
diff --git a/api/apiRoute.js b/api/apiRoute.js
index 081d694..ef4992d 100644
--- a/api/apiRoute.js
+++ b/api/apiRoute.js
@@ -66,6 +66,20 @@ export default {
return res;
})
},
+ //公共端-获取全部课程列表
+ common_getCourseAll(data = {}) {
+ let url = '/common/getCourseAll'
+ return http.get(url, data).then(res => {
+ return res;
+ })
+ },
+ //公共端-获取全部班级列表
+ common_getClassAll(data = {}) {
+ let url = '/common/getClassAll'
+ return http.get(url, data).then(res => {
+ return res;
+ })
+ },
//公共端-教师/销售端验证旧密码是否正确
common_personnelCheckOldPwd(data = {}) {
let url = '/personnel/checkOldPwd'
diff --git a/pages/market/clue/clue_info.vue b/pages/market/clue/clue_info.vue
index f91da5e..bec3426 100644
--- a/pages/market/clue/clue_info.vue
+++ b/pages/market/clue/clue_info.vue
@@ -290,6 +290,9 @@
followList:[],
//通话记录列表
listCallUp:[],
+
+ //当前登录的员工信息
+ userInfo:{},
}
},
onLoad(options) {
@@ -301,10 +304,25 @@
methods: {
async init(){
await this.getInfo()//客户详情
- // this.getFollowList()//获取跟进记录
+ this.getUserInfo()//获取当前登录的员工信息
// this.getListCallUp()//获取通话记录
},
+ //获取当前登录的员工信息
+ async getUserInfo(){
+ let res = await apiRoute.getPersonnelInfo({})
+ if (res.code != 1) {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none'
+ })
+ return
+ }
+
+ this.userInfo = res.data
+ // console.log('员工',this.userInfo)
+ },
+
//获取客户详情
async getInfo(){
let data = {
@@ -379,8 +397,13 @@
//跳转页面-订单列表
openViewOrder() {
let resource_id = this.clientInfo.resource_id//客户资源id
+ let resource_name = this.clientInfo.customerResource.name || ''//客户资源id姓名
+
+ let staff_id = this.userInfo.id//员工id
+ let staff_id_name = this.userInfo.name || ''//员工姓名
+
this.$navigateTo({
- url: `/pages/market/clue/order_list?resource_id=${resource_id}`
+ url: `/pages/market/clue/order_list?resource_id=${resource_id}&resource_name=${resource_name}&staff_id=${staff_id}&staff_id_name=${staff_id_name}`
})
},
diff --git a/pages/market/clue/order_list.vue b/pages/market/clue/order_list.vue
index 0ef299a..8566f5f 100644
--- a/pages/market/clue/order_list.vue
+++ b/pages/market/clue/order_list.vue
@@ -8,7 +8,7 @@
scroll-y="true"
:lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData"
- style="height: 90vh;"
+ style="height: 83vh;"
>
- 订单状态
+ 订单状态:{{v.order_status == 'pending' ? '待支付':'已支付' }}
客户姓名:
- {{ v.resource_id_name }}
+ {{ v.resource_id_name || ''}}
@@ -34,12 +34,12 @@
订单金额:
- ¥{{ v.order_amount }}
+ ¥{{ v.order_amount || ''}}
课程:
- {{ v.course_id_name }}
+ {{ v.course_id_name || ''}}
@@ -49,25 +49,177 @@
人员:
- {{ v.staff_id_name }}
+ {{ v.staff_id_name || ''}}
支付时间:
- {{ v.payment_time }}
+ {{ v.payment_time || '' }}
+
+ 创建订单
+
+
+
+
+ 创建订单
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (formData.payment_type) ? formData.payment_type_name : '点击选择' }}
+
+
+
+
+
+
+
+
+
+
+ {{ (formData.course_id) ? formData.course_id_name : '点击选择' }}
+
+
+
+
+
+
+
+
+
+
+ {{ (formData.class_id) ? formData.class_id_name : '点击选择' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/student/my/my.vue b/pages/student/my/my.vue
index 445fb23..3bc4909 100644
--- a/pages/student/my/my.vue
+++ b/pages/student/my/my.vue
@@ -56,7 +56,7 @@
-
+
我的订单
@@ -147,10 +147,19 @@
})
},
- //跳转页面-合同列表
- openViewContractList(item) {
+ //跳转页面-订单列表
+ openViewOrder() {
+ let resource_id = this.member_info.id//客户资源id
+ let resource_name = this.member_info.name || ''//客户资源id姓名
+
+ // let staff_id = this.userInfo.id//员工id
+ // let staff_id_name = this.userInfo.name || ''//员工姓名
+
+ let staff_id = ''//员工id
+ let staff_id_name = ''//员工姓名
+
this.$navigateTo({
- url: `/pages/common/contract_list`
+ url: `/pages/common/contract_list?resource_id=${resource_id}&resource_name=${resource_name}&staff_id=${staff_id}&staff_id_name=${staff_id_name}`
})
},