This commit is contained in:
Lx 2025-07-10 17:37:39 +08:00
parent de8a38f1ba
commit ce3aa9085d
9 changed files with 353 additions and 34 deletions

View File

@ -20,6 +20,14 @@ export function getBusinessRecordExportData(params) {
});
}
export function getBusinessRecordExportCount(params) {
return request({
url: '/base/dl-drive-school-coach/getBusinessRecordExportCount',
method: 'get',
params
});
}
// 导出Excel
export function exportBusinessRecordExcel(params) {
return request({

View File

@ -15,8 +15,9 @@
:inline="true"
label-width="80px"
class="filter-form"
style="margin-bottom: 3px"
>
<el-form-item label="业务经理选择" prop="coachId">
<el-form-item label="业务经理" prop="coachId">
<el-select v-model="queryParams.coachId" placeholder="请选择教练" @change="handleCoachChange()">
<el-option v-for="dict in coachList"
:key="dict.userId" :label="dict.name" :value="dict.userId"
@ -116,6 +117,24 @@
</el-form-item>
</el-form>
<el-form
size="small"
:inline="true"
label-width="100px"
style="height: 30px"
>
<el-form-item label="招生总人数" >
<span style="font-weight: bold; font-size: 16px">{{ exportCount.totalPeople }}</span>
</el-form-item>
<el-form-item label="招生总金额" label-width="150px">
<span style="font-weight: bold; font-size: 16px">{{ exportCount.totalAmount }}</span>
</el-form-item>
<el-form-item label="补贴总金额" label-width="150px">
<span style="font-weight: bold; font-size: 16px">{{ exportCount.totalSubsidy }}</span>
</el-form-item>
</el-form>
<!-- 数据表格 -->
<el-table
:data="tableData"
@ -138,10 +157,10 @@
<el-table-column label="支付状态" align="center" prop="paymentStatus" :formatter="formatPaymentStatus" />
<el-table-column label="支付方式" align="center" prop="payType" :formatter="formatPayType" />
<el-table-column label="是否面签" align="center" prop="isSign" :formatter="formatIsSign" width="80"/>
<el-table-column label="面签时间" align="center" prop="signTime" :formatter="formatCreateTime" width="80"/>
<el-table-column label="面签时间" align="center" prop="signTimeStr" width="80"/>
<el-table-column label="业务经理名称" align="center" prop="businessName" />
<el-table-column label="业务经理手机号" align="center" prop="businessPhone" width="130"/>
<el-table-column label="报名时间" align="center" prop="createTime" :formatter="formatCreateTime" />
<el-table-column label="报名时间" align="center" prop="createTimeStr" />
<el-table-column label="补贴金额" align="center" prop="subsidy" />
</el-table>
@ -203,7 +222,12 @@ import * as SchoolProcessApi from "../../process/api/index";
import { listDriveSchoolCourse } from "@/views/drivingSchool/schoolCourse/api/driveSchoolCourse";
import {listBusiness} from "@/views/drivingSchool/drivingSchoolCar/api/car";
import * as api from "../api/index"
import {exportBusinessRecordExcel, getBusinessManager, getBusinessRecordExportData} from "../api/index";
import {
exportBusinessRecordExcel,
getBusinessManager,
getBusinessRecordExportCount,
getBusinessRecordExportData
} from '../api/index'
export default {
name: "ExportDialog",
data() {
@ -263,6 +287,7 @@ export default {
label: '待确认'
}
],
exportCount: [],
};
},
computed: {
@ -306,10 +331,23 @@ export default {
});
this.tableData = res.data.records;
this.total = res.data.total;
await this.getBusinessRecordExportCount(this.queryParams)
} finally {
this.loading = false;
}
},
async getBusinessRecordExportCount(queryParams) {
try {
const res = await api.getBusinessRecordExportCount(queryParams)
console.log('实际数据:', res.data)
this.exportCount = res.data;
} catch (error) {
console.error('获取统计失败:', error)
//
this.$message.error('获取统计数据失败')
}
},
//
handleSearch() {
this.queryParams.pageNo = 1;

View File

@ -89,7 +89,7 @@
<el-table-column label="支付状态" align="center" prop="paymentStatus" :formatter="formatPaymentStatus" />
<el-table-column label="支付方式" align="center" prop="payType" :formatter="formatPayType" />
<el-table-column label="是否面签" align="center" prop="isSign" :formatter="formatIsSign" />
<el-table-column label="面签时间" align="center" prop="signTime" :formatter="formatCreateTime" />
<el-table-column label="面签时间" align="center" prop="signTimeStr" />
<el-table-column label="业务经理名称" align="center" prop="businessName" />
<el-table-column label="业务经理手机号" align="center" prop="businessPhone" />
<el-table-column label="报名时间" align="center" prop="createTime" :formatter="formatCreateTime" />

View File

@ -1,11 +1,11 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">

View File

@ -170,7 +170,7 @@
<el-table-column label="渠道" prop="sourceStr" align="center" width="100px" />
<el-table-column label="订单备注" prop="orderRemark" align="center" />
<el-table-column label="是否已面签" prop="isSignDisplay" align="center" width="100px" />
<el-table-column label="面签时间" prop="signTime" align="center" />
<el-table-column label="面签时间" prop="signTimeStr" align="center" />
<el-table-column label="科目二教练" prop="subject2CoachName" align="center" />
<el-table-column label="科目二提成(预提)" prop="subject2Deduct" align="center" />
<el-table-column label="科目三教练" prop="subject3CoachName" align="center" />

View File

@ -198,14 +198,15 @@
<el-row>
<el-col :span="24">
<el-form-item label="收款账号" prop="paymentAccount" >
<el-select v-model="formData.paymentAccount" placeholder="请选择收款账号" style="width: 60%;">
<el-input type="textarea" v-model="formData.paymentAccount" placeholder="请填写收款账号" />
<!-- <el-select v-model="formData.paymentAccount" placeholder="请填写收款账号" style="width: 60%;">
<el-option
v-for="item in paymentAccountList"
:key="item.value"
:label="item.label +''+ item.value"
:value="item.value">
</el-option>
</el-select>
</el-select>-->
</el-form-item>
</el-col>
</el-row>
@ -331,20 +332,27 @@ export default {
}
],
cashierConfirmOption:[
{
value:'0',
label:'未到账'
},
{
value:'1',
label:'已到账'
},
{
value:'0',
label:'未到账'
},
],
//
formRules: {},
schemeList: [],
activeNames: ['2'],
paymentAccountList: []
paymentAccountList: [],
formRules: {
payFeesTime: [
{ required: true, message: '缴费日期不能为空', trigger: 'blur' }
],
paymentAccount: [
{ required: true, message: '收款账号不能为空', trigger: 'blur' }
]
},
}
},
methods: {

View File

@ -34,6 +34,17 @@
</el-date-picker>
</el-form-item>
<el-form-item label="是否确认收款" prop="cashierConfirm" label-width="120px" v-if="showCashierColumn">
<el-select v-model="queryParams.cashierConfirm" placeholder="请选择收款情况">
<el-option
v-for="item in cashierConfirmList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
@ -259,7 +270,7 @@
</div>
</el-dialog>
<el-dialog :title="studentDialog.title" :visible.sync="studentDialog.visible" width="45%" v-dialogDrag append-to-body>
<el-dialog :title="studentDialog.title" :visible.sync="studentDialog.visible" width="45%" v-dialogDrag append-to-body id="studentInfoDialog">
<el-form ref="studentFormRef" :model="studentDialog.studentInfo" v-loading="studentDialog.loading" label-width="100px">
<el-form-item label="头像" prop="avatar">
<el-image
@ -342,6 +353,24 @@
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="班型" prop="courseName">
<span class="display-text">{{ studentDialog.studentInfo.courseName || '-' }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="订金金额" prop="reserveMoney">
<span class="display-text">{{ studentDialog.studentInfo.reserveMoney || '-' }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="尾款" prop="restMoney">
<span class="display-text">{{ studentDialog.studentInfo.restMoney || '-' }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
@ -421,6 +450,10 @@
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="studentDialog.visible = false">关闭</el-button>
<el-button type="primary" @click="printStudentInfo">打印</el-button> <!-- 新增打印按钮 -->
</div>
</el-dialog>
<!-- 分页组件 -->
@ -484,7 +517,8 @@ export default {
isSign: null,
timeRange:null,
startTimeStr: null,
endTimeStr: null
endTimeStr: null,
cashierConfirm:'',
},
//
viewFlag: false,
@ -513,6 +547,12 @@ export default {
value: 1
}
],
cashierConfirmList: [
{ value: '', label: '全部' },
{ value: '0', label: '未到账' },
{ value: '1', label: '已到账' },
{ value: null, label: '待确认' }
],
};
},
created() {
@ -529,6 +569,134 @@ export default {
}
},
methods: {
printStudentInfo() {
// 1.
const dialogElement = document.getElementById("studentInfoDialog");
if (!dialogElement) {
console.error("打印失败:未找到 studentInfoDialog 元素");
return;
}
// 2.
const dialogContent = dialogElement.cloneNode(true);
// 3.
const footer = dialogContent.querySelector(".dialog-footer");
if (footer) footer.remove();
const header = dialogContent.querySelector(".el-dialog__header");
if (header) header.remove();
//
const titleElements = dialogContent.querySelectorAll("[class*='title'], [class*='header']");
titleElements.forEach(el => el.remove());
// 4. iframe
const iframe = document.createElement("iframe");
iframe.style.position = "absolute";
iframe.style.width = "0";
iframe.style.height = "0";
iframe.style.border = "none";
document.body.appendChild(iframe);
// 5. scoped
let allStyles = "";
const styleSheets = Array.from(document.styleSheets);
styleSheets.forEach(sheet => {
try {
if (sheet.cssRules) {
Array.from(sheet.cssRules).forEach(rule => {
allStyles += rule.cssText + "\n";
});
}
} catch (e) {
console.log("无法读取某些样式:", e);
}
});
// 6. iframe
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
iframeDoc.open();
iframeDoc.write(`
<!DOCTYPE html>
<html>
<head>
<title>学员信息</title>
<style>
/* 基础样式 */
body {
margin: 0;
padding: 20px;
font-family: Arial, sans-serif;
}
/* 继承的样式 */
${allStyles}
/* 打印专用样式 */
@media print {
.el-dialog {
box-shadow: none !important;
width: 100% !important;
margin: 0 !important;
}
.el-dialog__header, .dialog-footer {
display: none !important;
}
.el-dialog__body {
padding: 0 !important;
}
.el-form-item {
margin-bottom: 10px !important;
}
.el-row {
display: flex !important;
flex-wrap: wrap !important;
}
.el-col {
flex: 1 !important;
min-width: 50% !important;
}
.display-text {
background-color: transparent !important;
border: 1px solid #ddd !important;
padding: 5px 10px !important;
line-height: 1.5 !important;
height: auto !important;
}
.remark-text {
white-space: pre-wrap !important;
min-height: auto !important;
line-height: 1.5 !important;
padding: 5px 10px !important;
}
.el-image {
max-width: 200px !important;
height: auto !important;
}
}
</style>
</head>
<body>
${dialogContent.querySelector(".el-dialog__body").innerHTML}
</body>
</html>
`);
iframeDoc.close();
// 7. iframe
setTimeout(() => {
iframe.contentWindow.focus();
iframe.contentWindow.print();
// 8. iframe
setTimeout(() => {
document.body.removeChild(iframe);
}, 1000);
}, 200); // iframe
},
/** 查询列表 */
async getList() {
try {
@ -644,17 +812,27 @@ export default {
}
},
async viewStudentInfo(row) {
console.log('row123', row)
this.studentDialog.visible = true
this.studentDialog.loading = true
try {
// API
const res = await SchoolCourseOrderApi.getStudentDetail(row.userId)
this.studentDialog.studentInfo = res.data
this.studentDialog.studentInfo = {
...res.data,
courseName: row.courseName,
reserveMoney: row.reserveMoney,
restMoney: row.restMoney,
};
// this.studentDialog.studentInfo = res.data
if(this.studentDialog.studentInfo.sourceUserId != null){
this.getSourceUserId(this.studentDialog.studentInfo.sourceUserId)
}
console.log('res',res.data)
console.log('this.studentDialog.studentInfo',this.studentDialog.studentInfo)
} finally {
this.studentDialog.loading = false
}
@ -721,7 +899,6 @@ export default {
return map[value] ?? '-';
},
}
};
</script>
@ -744,4 +921,91 @@ export default {
line-height: 1.5;
padding: 10px 15px;
}
@page {
size: auto;
margin: 30px;
}
@media print {
body {
margin: 0;
padding: 20px;
font-family: Arial, sans-serif;
}
.el-dialog__title,
.dialog-title,
.title,
h1, h2, h3, h4, h5, h6 {
display: none !important;
}
.el-dialog {
box-shadow: none !important;
width: 100% !important;
margin: 0 !important;
}
.el-dialog__header {
display: none !important;
height: 0 !important;
padding: 0 !important;
}
.el-dialog__body {
padding: 0 !important;
}
.el-form-item {
margin-bottom: 10px !important;
}
.el-row {
display: flex !important;
flex-wrap: wrap !important;
}
.el-col {
flex: 1 !important;
min-width: 50% !important;
}
.display-text {
background-color: transparent !important;
border: 1px solid #ddd !important;
padding: 5px 10px !important;
line-height: 1.5 !important;
height: auto !important;
}
.remark-text {
white-space: pre-wrap !important;
min-height: auto !important;
line-height: 1.5 !important;
padding: 5px 10px !important;
}
.dialog-footer {
display: none !important;
}
.el-image {
max-width: 200px !important;
height: auto !important;
}
.el-form-item__label {
width: 100px !important;
text-align: left !important;
}
.el-form-item__content {
margin-left: 100px !important;
}
}
</style>

View File

@ -6,12 +6,12 @@
<el-collapse v-model="activeNames">
<el-collapse-item title="学员课程情况" name="1">
<el-row>
<el-col span="12">
<el-col :span="12">
<el-form-item label="课程名称" prop="courseName">
<el-input :readonly="readonly" v-model="formData.courseName"/>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span="12">
<el-form-item label="教练姓名" prop="coachName">
<el-input :readonly="readonly" v-model="formData.coachName"/>
</el-form-item>
@ -19,12 +19,12 @@
</el-row>
<el-row>
<el-col span="12">
<el-col :span="12">
<el-form-item label="学员姓名" prop="userName">
<el-input :readonly="readonly" v-model="formData.userName"/>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span="12">
<el-form-item label="学员手机号" prop="userMobile">
<el-input :readonly="readonly" v-model="formData.userMobile"/>
</el-form-item>
@ -32,12 +32,12 @@
</el-row>
<el-row>
<el-col span="12">
<el-col :span="12">
<el-form-item label="科目" prop="subject">
<el-input :readonly="readonly" v-model="formData.subject"/>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span="12">
<el-form-item label="考试次数" prop="examNum">
<el-input v-model="formData.examNum"/>
</el-form-item>
@ -45,7 +45,7 @@
</el-row>
<el-row>
<el-col span="12">
<el-col :span="12">
<el-form-item label="当前状态" prop="status">
<el-select v-model="formData.status" placeholder="请选择">
<el-option
@ -57,7 +57,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span="12">
<el-form-item label="考试情况" prop="examStatus">
<el-select v-model="formData.examStatus" placeholder="请选择">
<el-option
@ -72,12 +72,12 @@
</el-row>
<el-row>
<el-col span="12">
<el-col :span="12">
<el-form-item label="考试分数" prop="examScore">
<el-input v-model="formData.examScore"/>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span="12">
<el-form-item label="考试时间" prop="examTime">
<el-date-picker clearable v-model="formData.examTime" type="date" value-format="timestamp" @change="handleExamTimeChange"/>
</el-form-item>

View File

@ -15,6 +15,7 @@
:inline="true"
label-width="80px"
class="filter-form"
style="margin-bottom: 3px"
>
<el-form-item label="教练选择" prop="coachId">
<el-select v-model="queryParams.coachId" placeholder="请选择教练" @change="handleCoachChange()">