From 2eb20caf3977cb1b910fb93eb62dfbffe3efaccb Mon Sep 17 00:00:00 2001 From: Lx <935448346@qq.com> Date: Fri, 4 Jul 2025 17:55:46 +0800 Subject: [PATCH] 0704 --- .../DriveSchoolFeedback/index.vue | 38 +++- .../DriveSchoolFinanceStatistics/index.vue | 208 ++++++++++++++++-- .../form/cashierConfirmForm.vue | 11 +- .../drivingSchool/DriveSchoolPay/index.vue | 5 +- .../DriveSchoolStatistics/api/index.js | 18 ++ src/views/drivingSchool/process/api/index.js | 9 + src/views/drivingSchool/process/index.vue | 53 ++++- src/views/drivingSchool/student/index.vue | 4 +- 8 files changed, 316 insertions(+), 30 deletions(-) diff --git a/src/views/drivingSchool/DriveSchoolFeedback/index.vue b/src/views/drivingSchool/DriveSchoolFeedback/index.vue index 4f8243d..3cb6abf 100644 --- a/src/views/drivingSchool/DriveSchoolFeedback/index.vue +++ b/src/views/drivingSchool/DriveSchoolFeedback/index.vue @@ -12,6 +12,17 @@ + + + + + + - + - - - + + + + + + + + + + + + + + + 业务经理补贴:{{ formatAmount(dataObj.moneyInfo.businessManagerMoneyTotal) }} + + + @@ -628,6 +644,70 @@ + + + + + + + {{ formatDateTime(scope.row.createTime) }} + - + + + + + + + + + + + + + + + 是 + 否 + + + + + 是 + 否 + + + + + + + + + + + + + + @@ -642,7 +722,7 @@ import { getCoachMoney, getOrderMoneyByCoachId, getCoachTotalCommission, - getCommissionListByCoachId + getCommissionListByCoachId, getBusinessManagerMoney, getBusinessManager } from '@/views/drivingSchool/DriveSchoolStatistics/api' import * as echarts from 'echarts'; @@ -758,6 +838,13 @@ export default { cashierDetailTotal: 0, + businessDetailVisible: false, + businessDetailList: [], + businessDetailLoading: false, + businessDetailTotal: 0, + businessDetail: null, + + }; }, @@ -1123,7 +1210,7 @@ export default { 'unconfirmedReceive': '待确认收款明细', 'outAmount': '应付金额明细', 'showedPayIsPaid': '已确认付款明细', - 'unpaidAmount': '待付款明细' + 'unpaidAmount': '业务经理补贴明细' }; @@ -1168,10 +1255,9 @@ export default { this.queryParams.ifPay = null this.queryParams.startTimeStr = this.queryParams.startTime this.queryParams.endTimeStr = this.queryParams.endTime + if(type !== 'unpaidAmount'){ if(type === "showedPayIsPaid"){ this.queryParams.ifPay = '1' - }else if(type === "unpaidAmount"){ - this.queryParams.ifPay = '0' } const requestParams = { ...this.queryParams, @@ -1182,6 +1268,13 @@ export default { this.cashierDataList = res.data; console.log('cashierDataList', this.cashierDataList) }) + }else if(type === 'unpaidAmount'){ + return getBusinessManagerMoney(this.queryParams).then(res => { + console.log('res', res) + this.cashierDataList = res.data; + console.log('cashierDataList', this.cashierDataList) + }) + } }, // 显示财务详情 @@ -1204,18 +1297,35 @@ export default { // 显示财务 提成部分详情 showCashierDetail(row) { console.log('row', row) - this.queryParams.pageNo = 1; - this.cashierDetail = row; - this.cashierDetailLoading = true; - this.cashierDetailVisible = true; - this.cashierDetailTitle = `${row.coachName}的${this.cashierDialogTitle}`; + if(!row.hasOwnProperty('coachId')){ + this.queryParams.pageNo = 1; + this.cashierDetail = row; + this.cashierDetailLoading = true; + this.cashierDetailVisible = true; + this.cashierDetailTitle = `${row.coachName}的${this.cashierDialogTitle}`; + + // 保存当前财务类型 + this.currentCashierTypeForDetail = this.currentCashierType; + + this.getCashierDetail(row.coachUserId).finally(() => { + this.cashierDetailLoading = false; + }); + }else if(row.hasOwnProperty('coachId')){ + this.queryParams.pageNo = 1; + this.businessDetail = row; + this.businessDetailLoading = true; + this.businessDetailVisible = true; + this.cashierDetailTitle = `${row.coachName}的${this.cashierDialogTitle}`; + + // 保存当前财务类型 + this.currentCashierTypeForDetail = this.currentCashierType; + + this.getBusinessDetail(row.coachId).finally(() => { + this.businessDetailLoading = false; + }); + } - // 保存当前财务类型 - this.currentCashierTypeForDetail = this.currentCashierType; - this.getCashierDetail(row.coachUserId).finally(() => { - this.cashierDetailLoading = false; - }); }, handleFinanceDetailClose() { @@ -1247,6 +1357,20 @@ export default { this.queryParams.pageNo = 1; }, + handleBusinessDetailClose() { + // 重置教练ID和现金确认状态 + this.queryParams.coachId = null; + this.queryParams.ifPay = null; + + // 重新获取财务数据 + if (this.currentCashierTypeForDetail) { + this.getCashierData(this.currentCashierTypeForDetail); + } + + // 重置分页参数 + this.queryParams.pageNo = 1; + }, + // 获取教练财务详情 getFinanceDetail(coachId) { this.queryParams.startTimeStr = this.queryParams.startTime @@ -1276,6 +1400,20 @@ export default { }); }, + getBusinessDetail(coachId) { + this.queryParams.startTimeStr = this.queryParams.startTime + this.queryParams.endTimeStr = this.queryParams.endTime + this.queryParams.coachId = coachId; + const requestParams = { + ...this.queryParams, + }; + delete requestParams.endTime; + return getBusinessManager(requestParams).then(res => { + this.businessDetailList = res.data.records; + this.businessDetailTotal = res.data.total; + }); + }, + // 财务详情分页大小改变 handleFinanceDetailSizeChange(val) { console.log('val', val) @@ -1306,6 +1444,46 @@ export default { this.getCashierDetail(this.cashierDetail.coachUserId); }, + // 财务(业务经理)提成部分详情分页大小改变 + handleBusinessDetailSizeChange(val) { + console.log('val', val) + this.queryParams.pageSize = val; + this.queryParams.pageNo = 1; // 重置页码 + this.getCashierDetail(this.cashierDetail.coachId); + }, + + // 财务(业务经理)提成部分详情页码改变 + handleBusinessDetailPageChange(val) { + console.log('val', val) + this.queryParams.pageNo = val; + this.getCashierDetail(this.cashierDetail.coachId); + }, + + formatPaymentStatus(row, column, value) { + const map = { + 0: '待支付', + 1: '已取消', + 2: '已支付', + 3: '待面签', + 4: '已面签', + 5: '已完成', + 6: '申请退款', + 7: '退款中', + 8: '退款成功' + }; + return map[value] ?? '未知状态'; + }, + + formatPayType(row, column, value) { + const map = { + 1: '定金', + 2: '全款' + }; + return map[value] ?? '未知类型'; + }, + formatIsSign(row, column, value) { + return value === 1 ? '是' : '否'; + }, // 初始化ECharts图 initCharts() { diff --git a/src/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue b/src/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue index 4cd6011..cd08f54 100644 --- a/src/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue +++ b/src/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue @@ -176,7 +176,6 @@ - - - - + + + + @@ -398,12 +398,15 @@ export default { } this.formLoading = true try { + const data = this.formData // 修改的提交 if (data.id) { if(this.formData.cashierConfirm !== null){ + console.log('123', this.formData) this.formData.cashierConfirmTime = new Date().getTime() } + console.log('456', this.formData) await SchoolCourseOrderApi.updateSchoolCourseOrder(data) this.$modal.msgSuccess('修改成功') this.dialogVisible = false diff --git a/src/views/drivingSchool/DriveSchoolPay/index.vue b/src/views/drivingSchool/DriveSchoolPay/index.vue index 51fd7df..f72fabe 100644 --- a/src/views/drivingSchool/DriveSchoolPay/index.vue +++ b/src/views/drivingSchool/DriveSchoolPay/index.vue @@ -20,9 +20,9 @@ - + 学员及订单信息导出 @@ -180,7 +180,6 @@ size="mini" type="text" style="color: RGB(192, 196, 204)" - @click="openCashierConfirm(scope.row.id)" v-else-if="scope.row.cashierConfirm == 1 || scope.row.cashierConfirm == '1'" :disabled="true" > diff --git a/src/views/drivingSchool/DriveSchoolStatistics/api/index.js b/src/views/drivingSchool/DriveSchoolStatistics/api/index.js index 4cd83f0..28f113c 100644 --- a/src/views/drivingSchool/DriveSchoolStatistics/api/index.js +++ b/src/views/drivingSchool/DriveSchoolStatistics/api/index.js @@ -81,3 +81,21 @@ export function getCommissionListByCoachId(params){ params: params }) } + +// 业务经理提成信息列表 +export function getBusinessManagerMoney(params){ + return request({ + url: '/base/dl-drive-school-coach/getBusinessManagerMoney', + method: 'GET', + params: params + }) +} + +// 业务经理提成详细列表 +export function getBusinessManager(params) { + return request({ + url: '/base/dl-drive-school-coach/getBusinessManager', + method: 'get', + params + }) +} diff --git a/src/views/drivingSchool/process/api/index.js b/src/views/drivingSchool/process/api/index.js index c39fc1f..834be08 100644 --- a/src/views/drivingSchool/process/api/index.js +++ b/src/views/drivingSchool/process/api/index.js @@ -79,4 +79,13 @@ export function exportSchoolProcessExcel(params) { }); } +// 获取驾校学员合格率 +export function getExamPassRate(params) { + return request({ + url: '/process/getExamPassRate', + method: 'get', + params + }); +} + diff --git a/src/views/drivingSchool/process/index.vue b/src/views/drivingSchool/process/index.vue index f8f4bcc..036ae09 100644 --- a/src/views/drivingSchool/process/index.vue +++ b/src/views/drivingSchool/process/index.vue @@ -64,6 +64,17 @@ /> + + + + 搜索 重置 @@ -199,7 +210,10 @@ export default { studentIdCard: null, financePass: undefined, examStatus: undefined, + timeRange: null, subject: null, + examStartTime: null, + examEndTime: null }, subjectOptions: [ { value: 1, label: '科目一' }, @@ -229,6 +243,12 @@ export default { const res = await processApi.getProcessPage(this.queryParams) this.list = res.data.records this.total = res.data.total + const params = { + /* startTimeStr: '2025-05-01', + endTimeStr: '2025-05-31', */ + // timeType: 'month', + } + this.getExamPassRate(params) } finally { this.loading = false } @@ -252,13 +272,30 @@ export default { /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNo = 1 + if(this.queryParams.examStartTime != null){ + this.queryParams.examStartTime = this.queryParams.examStartTime + ' 00:00:01'; + this.queryParams.examEndTime = this.queryParams.examEndTime + ' 23:59:59'; + } this.getList() }, /** 重置按钮操作 */ resetQuery() { this.resetForm('queryForm') this.showPassedOnly = true - this.queryParams.examStatus = '1' + this.queryParams = { + pageNo: 1, + pageSize: 10, + courseName: null, + coachName: null, + userName: null, + studentIdCard: null, + financePass: undefined, + examStatus: '1', + timeRange: null, + subject: null, + examStartTime: null, + examEndTime: null + } this.handleQuery() }, /** 添加/修改操作 */ @@ -276,6 +313,20 @@ export default { } catch { } }, + handleDateChange(val) { + if (val && val.length === 2) { + this.queryParams.examStartTime = val[0]; + this.queryParams.examEndTime = val[1]; + } else { + this.queryParams.examStartTime = null; + this.queryParams.examEndTime = null; + } + }, + + getExamPassRate(params){ + const res = processApi.getExamPassRate(params) + console.log('res12345', res) + }, /** 导出按钮操作 */ async handleExport() { /* await this.$modal.confirm('是否确认导出所有驾校-学员课程进度数据项?'); diff --git a/src/views/drivingSchool/student/index.vue b/src/views/drivingSchool/student/index.vue index 4cc632e..c9d9e8a 100644 --- a/src/views/drivingSchool/student/index.vue +++ b/src/views/drivingSchool/student/index.vue @@ -37,8 +37,8 @@ - - + +