11
This commit is contained in:
parent
d04ac251fe
commit
4ea5b443ff
@ -147,6 +147,9 @@ export const DICT_TYPE = {
|
||||
JYC_TYPE : 'jyc_type',
|
||||
Drive_Dialy : 'drive_dialy',
|
||||
Jx_report_state : 'jx_report_state',
|
||||
Evaluate_type : 'evaluate_type',
|
||||
Drive_course_subject : 'drive_course_subject',
|
||||
Cource_type : 'cource_type',
|
||||
// 车牌颜色
|
||||
CAR_LICENSE_COLOR: 'car_license_color',
|
||||
// 车辆使用性质
|
||||
|
44
src/views/drivingSchool/DriveSchoolDeduct/api/deduct.js
Normal file
44
src/views/drivingSchool/DriveSchoolDeduct/api/deduct.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询提成配置列表
|
||||
export function listDeduct(query) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/deduct/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询提成配置详细
|
||||
export function getDeduct(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/deduct/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增提成配置
|
||||
export function addDeduct(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/deduct',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改提成配置
|
||||
export function updateDeduct(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/deduct',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除提成配置
|
||||
export function delDeduct(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/deduct/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
259
src/views/drivingSchool/DriveSchoolDeduct/index.vue
Normal file
259
src/views/drivingSchool/DriveSchoolDeduct/index.vue
Normal file
@ -0,0 +1,259 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="科目" prop="courseSubject">
|
||||
<el-select v-model="queryParams.courseSubject" placeholder="请选择科目" clearable>
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.Drive_course_subject)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="deductList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="科目" align="center" prop="courseSubject">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.Drive_course_subject" :value="scope.row.courseSubject"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="教练提成" align="center" prop="deduct" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改提成配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="科目" prop="courseSubject">
|
||||
<el-select v-model="form.courseSubject" placeholder="请选择科目">
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.Drive_course_subject)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="教练提成" prop="deduct">
|
||||
<el-input v-model="form.deduct" placeholder="请输入教练提成" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDeduct, getDeduct, delDeduct, addDeduct, updateDeduct } from "./api/deduct";
|
||||
|
||||
export default {
|
||||
name: "Deduct",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 提成配置表格数据
|
||||
deductList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
deduct: null,
|
||||
courseSubject: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
deduct: [
|
||||
{ required: true, message: "提成比例不能为空", trigger: "blur" }
|
||||
],
|
||||
courseSubject: [
|
||||
{ required: true, message: "科目不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询提成配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listDeduct(this.queryParams).then(response => {
|
||||
this.deductList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
deptId: null,
|
||||
deduct: null,
|
||||
courseSubject: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加提成配置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getDeduct(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改提成配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateDeduct(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addDeduct(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除提成配置编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delDeduct(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('drivingSchool/system/deduct/export', {
|
||||
...this.queryParams
|
||||
}, `deduct_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询反馈列表
|
||||
export function listFeedback(query) {
|
||||
return request({
|
||||
url: '/system/feedback/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询反馈详细
|
||||
export function getFeedback(id) {
|
||||
return request({
|
||||
url: '/system/feedback/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询反馈详细
|
||||
export function like() {
|
||||
return request({
|
||||
url: '/system/feedback/like',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增反馈
|
||||
export function addFeedback(data) {
|
||||
return request({
|
||||
url: '/system/feedback',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改反馈
|
||||
export function updateFeedback(data) {
|
||||
return request({
|
||||
url: '/system/feedback',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除反馈
|
||||
export function delFeedback(id) {
|
||||
return request({
|
||||
url: '/system/feedback/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
276
src/views/drivingSchool/DriveSchoolFeedback/index.vue
Normal file
276
src/views/drivingSchool/DriveSchoolFeedback/index.vue
Normal file
@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="评价类型" prop="evaluateType">
|
||||
<el-select v-model="queryParams.evaluateType" placeholder="请选择评价类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.Evaluate_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="驾校名称" prop="jxName">
|
||||
<el-input
|
||||
v-model="queryParams.jxName"
|
||||
placeholder="请输入驾校名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="教练名称" prop="jlName">
|
||||
<el-input
|
||||
v-model="queryParams.jlName"
|
||||
placeholder="请输入教练名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="评价类型" align="center" prop="evaluateType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.Evaluate_type" :value="scope.row.evaluateType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="驾校名称" align="center" prop="jxName" />
|
||||
<el-table-column label="用户" align="center" prop="userName" />
|
||||
<el-table-column label="驾校评价" align="center" prop="content" />
|
||||
<el-table-column label="教练名称" align="center" prop="jlName" />
|
||||
<el-table-column label="教练评价" align="center" prop="jlContent" />
|
||||
<el-table-column label="满意度" align="center" prop="likes" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改反馈对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公报内容">
|
||||
<editor v-model="form.content" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listFeedback, getFeedback, delFeedback, addFeedback, updateFeedback ,like} from "./api/DriveSchoolFeedback";
|
||||
|
||||
export default {
|
||||
name: "Feedback",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
likeTotal:null,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 反馈表格数据
|
||||
feedbackList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: null,
|
||||
content: null,
|
||||
evaluateType:null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.like();
|
||||
},
|
||||
methods: {
|
||||
/** 查询反馈列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listFeedback(this.queryParams).then(response => {
|
||||
this.feedbackList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
like() {
|
||||
this.loading = true;
|
||||
like().then(response => {
|
||||
this.likeTotal = response.rows;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
userId: null,
|
||||
content: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加反馈";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getFeedback(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改反馈";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateFeedback(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addFeedback(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除反馈编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delFeedback(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/feedback/export', {
|
||||
...this.queryParams
|
||||
}, `feedback_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
72
src/views/drivingSchool/driveSchoolCoachBalance/api/pass.js
Normal file
72
src/views/drivingSchool/driveSchoolCoachBalance/api/pass.js
Normal file
@ -0,0 +1,72 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询考试通过列表
|
||||
export function listPass(query) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 工资
|
||||
export function getBalanceList(query) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/getBalanceList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 时间
|
||||
export function getTime(query) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/getTime',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 结算
|
||||
export function pay(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/pay',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考试通过详细
|
||||
export function getPass(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增考试通过
|
||||
export function addPass(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改考试通过
|
||||
export function updatePass(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除考试通过
|
||||
export function delPass(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
382
src/views/drivingSchool/driveSchoolCoachBalance/index.vue
Normal file
382
src/views/drivingSchool/driveSchoolCoachBalance/index.vue
Normal file
@ -0,0 +1,382 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="教练名字" prop="jlName">
|
||||
<el-input
|
||||
v-model="queryParams.jlName"
|
||||
placeholder="请输入教练名字"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="结算状态" prop="payState">
|
||||
<el-select v-model="queryParams.payState" placeholder="请选择结算状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.pay_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="开始日期" prop="payStartTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.payStartTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="change"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期" prop="payEndTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.payEndTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="订单编号" prop="orderNumber">
|
||||
<el-input
|
||||
v-model="queryParams.orderNumber"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<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">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>-->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="passList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="教练名字" align="center" prop="jlName" />
|
||||
<el-table-column label="已结算金额(元)" align="center" prop="deduct" />
|
||||
<el-table-column label="未结算金额(元)" align="center" prop="deducts" />
|
||||
<el-table-column label="结算时间" align="center" prop="paydTime" />
|
||||
<!-- <el-table-column label="课程金额(元)" align="center" prop="coursePrice" />
|
||||
<el-table-column label="订单编号" align="center" prop="orderNumber" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="jljs(scope.row)"
|
||||
>结算</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改考试通过对话框 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科目" prop="courseSubject">
|
||||
<el-select v-model="form.courseSubject" placeholder="请选择科目">
|
||||
<el-option
|
||||
v-for="dict in dict.type.drive_course_subject"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="教练名字" prop="jlName">
|
||||
<el-input v-model="form.jlName" placeholder="请输入教练名字" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提成金额(元)" prop="deduct">
|
||||
<el-input v-model="form.deduct" placeholder="请输入提成金额(元)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考试通过截图" prop="photo">
|
||||
<image-upload v-model="form.photo"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPass, getPass, delPass, addPass, updatePass ,getBalanceList,pay,getTime} from "./api/pass";
|
||||
|
||||
export default {
|
||||
name: "Pass",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 考试通过表格数据
|
||||
passList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jxId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
userId: null,
|
||||
jlId: null,
|
||||
courseSubject: null,
|
||||
jlName: null,
|
||||
deduct: null,
|
||||
payState: '',
|
||||
payTime: null,
|
||||
courseId: null,
|
||||
coursePrice: null,
|
||||
orderNumber: null,
|
||||
photo: null,
|
||||
payStartTime: null,
|
||||
payEndTime: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
courseSubject: [
|
||||
{ required: true, message: "科目不能为空", trigger: "change" }
|
||||
],
|
||||
jlName: [
|
||||
{ required: true, message: "教练名字不能为空", trigger: "blur" }
|
||||
],
|
||||
deduct: [
|
||||
{ required: true, message: "提成金额不能为空", trigger: "blur" }
|
||||
],
|
||||
coursePrice: [
|
||||
{ required: true, message: "课程金额不能为空", trigger: "blur" }
|
||||
],
|
||||
orderNumber: [
|
||||
{ required: true, message: "订单编号不能为空", trigger: "blur" }
|
||||
],
|
||||
photo: [
|
||||
{ required: true, message: "考试通过截图不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getBalanceList();
|
||||
this.getTime();
|
||||
},
|
||||
methods: {
|
||||
jljs(item){
|
||||
let data = {
|
||||
jlId:item.jlId,
|
||||
payStartTime:this.queryParams.payStartTime,
|
||||
payEndTime:this.queryParams.payEndTime
|
||||
}
|
||||
this.$modal.confirm('是否确认结算?').then(function() {
|
||||
return pay(data);
|
||||
}).then(() => {
|
||||
this.getBalanceList();
|
||||
this.$modal.msgSuccess("结算成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
change(e){
|
||||
console.log(e)
|
||||
},
|
||||
/** 查询考试通过列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPass(this.queryParams).then(response => {
|
||||
this.passList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getBalanceList() {
|
||||
this.loading = true;
|
||||
console.log("252",this.queryParams)
|
||||
getBalanceList(this.queryParams).then(response => {
|
||||
|
||||
this.passList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getTime() {
|
||||
this.loading = true;
|
||||
getTime(this.queryParams).then(response => {
|
||||
console.log("259",response.data)
|
||||
this.queryParams.payStartTime = response.data.payStartTime;
|
||||
this.queryParams.payEndTime = response.data.payEndTime;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
jxId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
userId: null,
|
||||
jlId: null,
|
||||
courseSubject: null,
|
||||
jlName: null,
|
||||
deduct: null,
|
||||
payTime: null,
|
||||
courseId: null,
|
||||
coursePrice: null,
|
||||
orderNumber: null,
|
||||
photo: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getBalanceList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加考试通过";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPass(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改考试通过";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePass(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPass(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除考试通过编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delPass(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('drivingSchool/system/pass/export', {
|
||||
...this.queryParams
|
||||
}, `pass_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
44
src/views/drivingSchool/driveSchoolExamPass/api/pass.js
Normal file
44
src/views/drivingSchool/driveSchoolExamPass/api/pass.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询考试通过列表
|
||||
export function listPass(query) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考试通过详细
|
||||
export function getPass(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增考试通过
|
||||
export function addPass(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改考试通过
|
||||
export function updatePass(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除考试通过
|
||||
export function delPass(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/pass/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
367
src/views/drivingSchool/driveSchoolExamPass/index.vue
Normal file
367
src/views/drivingSchool/driveSchoolExamPass/index.vue
Normal file
@ -0,0 +1,367 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科目" prop="courseSubject">
|
||||
<el-select v-model="queryParams.courseSubject" placeholder="请选择科目" clearable>
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.Drive_course_subject)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="教练名字" prop="jlName">
|
||||
<el-input
|
||||
v-model="queryParams.jlName"
|
||||
placeholder="请输入教练名字"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="订单编号" prop="orderNumber">
|
||||
<el-input
|
||||
v-model="queryParams.orderNumber"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<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">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="passList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="手机号" align="center" prop="phone" />
|
||||
<el-table-column label="科目" align="center" prop="courseSubject">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.Drive_course_subject" :value="scope.row.courseSubject"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="教练名字" align="center" prop="jlName" />
|
||||
<el-table-column label="提成金额(元)" align="center" prop="deduct" />
|
||||
<!-- <el-table-column label="课程金额(元)" align="center" prop="coursePrice" />
|
||||
<el-table-column label="订单编号" align="center" prop="orderNumber" />-->
|
||||
<el-table-column label="考试通过截图" align="center" prop="photo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.photo" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="审核状态" align="center" prop="status">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.check_status" :value="scope.row.status"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改考试通过对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科目" prop="courseSubject">
|
||||
<el-select v-model="form.courseSubject" placeholder="请选择科目">
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.Drive_course_subject)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="教练名字" prop="jlName">
|
||||
<el-input v-model="form.jlName" placeholder="请输入教练名字" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提成金额(元)" prop="deduct">
|
||||
<el-input v-model="form.deduct" placeholder="请输入提成金额(元)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考试通过截图" prop="photo">
|
||||
<image-upload v-model="form.photo"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="审核状态" prop="status">-->
|
||||
<!-- <el-select v-model="form.status" placeholder="请选择审核状态">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.check_status"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPass, getPass, delPass, addPass, updatePass } from "./api/pass";
|
||||
|
||||
export default {
|
||||
name: "Pass",
|
||||
dicts: ['drive_course_subject','check_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 考试通过表格数据
|
||||
passList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
jxId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
userId: null,
|
||||
jlId: null,
|
||||
courseSubject: null,
|
||||
jlName: null,
|
||||
deduct: null,
|
||||
payTime: null,
|
||||
courseId: null,
|
||||
coursePrice: null,
|
||||
orderNumber: null,
|
||||
photo: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
courseSubject: [
|
||||
{ required: true, message: "科目不能为空", trigger: "change" }
|
||||
],
|
||||
jlName: [
|
||||
{ required: true, message: "教练名字不能为空", trigger: "blur" }
|
||||
],
|
||||
deduct: [
|
||||
{ required: true, message: "提成金额不能为空", trigger: "blur" }
|
||||
],
|
||||
coursePrice: [
|
||||
{ required: true, message: "课程金额不能为空", trigger: "blur" }
|
||||
],
|
||||
orderNumber: [
|
||||
{ required: true, message: "订单编号不能为空", trigger: "blur" }
|
||||
],
|
||||
photo: [
|
||||
{ required: true, message: "考试通过截图不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询考试通过列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPass(this.queryParams).then(response => {
|
||||
this.passList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
jxId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
userId: null,
|
||||
jlId: null,
|
||||
courseSubject: null,
|
||||
jlName: null,
|
||||
deduct: null,
|
||||
payTime: null,
|
||||
courseId: null,
|
||||
coursePrice: null,
|
||||
orderNumber: null,
|
||||
photo: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加考试通过";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPass(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改考试通过";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePass(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPass(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除考试通过编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delPass(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('drivingSchool/system/pass/export', {
|
||||
...this.queryParams
|
||||
}, `pass_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询驾校课程分类列表
|
||||
export function listDriveSchoolCourse(query) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/driveSchoolCourse/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询驾校课程分类详细
|
||||
export function getDriveSchoolCourse(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/driveSchoolCourse/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增驾校课程分类
|
||||
export function addDriveSchoolCourse(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/driveSchoolCourse',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改驾校课程分类
|
||||
export function updateDriveSchoolCourse(data) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/driveSchoolCourse',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除驾校课程分类
|
||||
export function delDriveSchoolCourse(id) {
|
||||
return request({
|
||||
url: '/drivingSchool/system/driveSchoolCourse/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
397
src/views/drivingSchool/schoolCourse/index.vue
Normal file
397
src/views/drivingSchool/schoolCourse/index.vue
Normal file
@ -0,0 +1,397 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||
<el-form-item label="课程类型" prop="type">
|
||||
<el-select v-model="queryParams.name" placeholder="请选择课程类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.Cource_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="课程名字" prop="automatic">
|
||||
<el-input
|
||||
v-model="queryParams.automatic"
|
||||
placeholder="请输入课程名字"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="driveSchoolCourseList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="课程类型" align="center" prop="name">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.Cource_type" :value="scope.row.name"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="课程类型" align="center" prop="name" />-->
|
||||
<el-table-column label="课程名字" align="center" prop="automatic" />
|
||||
<!-- <el-table-column label="课程开始时间" align="center" prop="dayStart" />
|
||||
<el-table-column label="课程结束时间" align="center" prop="dayEnd" />-->
|
||||
<!-- <el-table-column label="价格" align="center" :prop="price" />-->
|
||||
<el-table-column label="价格" align="center" >
|
||||
<template #default="data">
|
||||
<div>{{data.row.price}}¥</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="定金" align="center" prop="reserveMoney" />-->
|
||||
<el-table-column label="定金" align="center" >
|
||||
<template #default="data">
|
||||
<div>{{data.row.reserveMoney}}¥</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交付定金的优惠:" align="center" >
|
||||
<template #default="data">
|
||||
<div>{{data.row.favour}}¥</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="封面图" align="center" prop="photo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.photo" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="课程简介" align="center" prop="describ">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="viewContentFun(scope.row.describ)" type="text" slot="reference">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">`
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改驾校课程分类对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="750" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
|
||||
<el-form-item label="课程类型" prop="name">
|
||||
<el-radio-group v-model="form.name">
|
||||
<el-radio
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.Cource_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="课程名字" prop="automatic">
|
||||
<el-input v-model="form.automatic" placeholder="请输入课程名字" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="上课时间" prop="weekDay">
|
||||
<el-checkbox-group :max="2" v-model="form.weekDay">
|
||||
<el-checkbox label="星期一">星期一</el-checkbox>
|
||||
<el-checkbox label="星期二">星期二</el-checkbox>
|
||||
<el-checkbox label="星期三">星期三</el-checkbox>
|
||||
<el-checkbox label="星期四">星期四</el-checkbox>
|
||||
<el-checkbox label="星期五">星期五</el-checkbox>
|
||||
<el-checkbox label="星期六">星期六</el-checkbox>
|
||||
<el-checkbox label="星期日">星期日</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="课程开始时间" prop="dayStart">
|
||||
<el-input v-model="form.dayStart" placeholder="请输入课程开始时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="课程结束时间" prop="dayEnd">
|
||||
<el-input v-model="form.dayEnd" placeholder="请输入课程结束时间" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="价格(元)" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入价格" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="驾照类型" prop="automatic">
|
||||
<el-input v-model="form.automatic" placeholder="驾照类型" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="驾校优势" prop="license">
|
||||
<el-input v-model="form.license" placeholder="驾校优势" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="定金(元)" prop="reserveMoney">
|
||||
<el-input v-model="form.reserveMoney" placeholder="请输入定金" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="交付定金优惠(元):" prop="favour">
|
||||
<el-input v-model="form.favour" placeholder="请输入优惠金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图" prop="photo">
|
||||
<image-upload :limit="1" v-model="form.photo"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="课程简介">
|
||||
<editor v-model="form.describ" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="查看" :visible.sync="viewFlag" width="65%" append-to-body>
|
||||
<div style="box-sizing: border-box;padding: 15px;overflow: hidden" v-html="viewContent"></div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDriveSchoolCourse, getDriveSchoolCourse, delDriveSchoolCourse, addDriveSchoolCourse, updateDriveSchoolCourse } from "./api/driveSchoolCourse";
|
||||
|
||||
export default {
|
||||
name: "DriveSchoolCourse",
|
||||
data() {
|
||||
return {
|
||||
viewFlag:false,
|
||||
viewContent:"",
|
||||
weekDay:[],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 驾校课程分类表格数据
|
||||
driveSchoolCourseList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
type: null,
|
||||
name: null,
|
||||
dayStart: null,
|
||||
dayEnd: null,
|
||||
price: null,
|
||||
automatic: null,
|
||||
license: null,
|
||||
photo: null,
|
||||
describ: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
type: [
|
||||
{ required: true, message: "驾驶证类型不能为空", trigger: "blur" }
|
||||
],
|
||||
automatic: [
|
||||
{ required: true, message: "课程名字不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "课程名字不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{ required: true, trigger: 'blur', message:'金额不能为空'},
|
||||
],
|
||||
reserveMoney: [
|
||||
{ required: true, trigger: 'blur', message:'合同金额不能为空'},
|
||||
],
|
||||
photo: [
|
||||
{ required: true, message: "封面图不能为空", trigger: "blur" }
|
||||
],
|
||||
license: [
|
||||
{ required: true, message: "封面图不能为空", trigger: "blur", size: 5 }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
viewContentFun(data){
|
||||
this.viewContent =data;
|
||||
this.viewFlag = true;
|
||||
},
|
||||
/** 查询驾校课程分类列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listDriveSchoolCourse(this.queryParams).then(response => {
|
||||
this.driveSchoolCourseList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
deptId: null,
|
||||
type: null,
|
||||
name: null,
|
||||
dayStart: null,
|
||||
dayEnd: null,
|
||||
price: null,
|
||||
automatic: null,
|
||||
license: null,
|
||||
reserveMoney: null,
|
||||
weekDay:[],
|
||||
photo: null,
|
||||
describ: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.weekDay = []
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加驾校课程分类";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getDriveSchoolCourse(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改驾校课程分类";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateDriveSchoolCourse(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addDriveSchoolCourse(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
if (response.data.weekDay){
|
||||
this.weekDay = response.data.weekDay.split(",")
|
||||
}else {
|
||||
this.weekDay = []
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除驾校课程为"' + row.name + '"的数据项?').then(function() {
|
||||
return delDriveSchoolCourse(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('drivingSchool/system/driveSchoolCourse/export', {
|
||||
...this.queryParams
|
||||
}, `driveSchoolCourse_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user