This commit is contained in:
xiao-fajia 2024-08-26 16:16:17 +08:00
commit 20c6070868
17 changed files with 3189 additions and 0 deletions

View File

@ -145,6 +145,8 @@ export const DICT_TYPE = {
COMPANY_COST_TYPE: 'company_cost_type',
// 救援车车型
JYC_TYPE : 'jyc_type',
Drive_Dialy : 'drive_dialy',
Jx_report_state : 'jx_report_state',
// 车牌颜色
CAR_LICENSE_COLOR: 'car_license_color',
// 车辆使用性质

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询合同模板列表
export function listTest(query) {
return request({
url: '/system/driveSchool/test/list',
method: 'get',
params: query
})
}
// 查询合同模板详细
export function getTest(id) {
return request({
url: '/system/driveSchool/test/' + id,
method: 'get'
})
}
// 新增合同模板
export function addTest(data) {
return request({
url: '/system/driveSchool/test',
method: 'post',
data: data
})
}
// 修改合同模板
export function updateTest(data) {
return request({
url: '/system/driveSchool/test',
method: 'put',
data: data
})
}
// 删除合同模板
export function delTest(id) {
return request({
url: '/system/driveSchool/test/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,252 @@
<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-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="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system/driveSchool:test:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system/driveSchool:test:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system/driveSchool:test:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="testList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="合同内容" align="center" prop="content" >
<template slot-scope="scope">
<el-button @click="viewContentFun(scope.row.content)" type="text" >查看</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="750px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<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>
<el-dialog title="查看" :visible.sync="viewFlag" width="40%" append-to-body>
<div style="box-sizing: border-box;padding: 15px;overflow: hidden" v-html="content"></div>
</el-dialog>
</div>
</template>
<script>
import { listTest, getTest, delTest, addTest, updateTest } from "./api/test";
export default {
name: "Test",
data() {
return {
viewFlag:false,
content:"",
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
testList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
content: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
viewContentFun(data){
this.content = data;
this.viewFlag = true
},
/** 查询合同模板列表 */
getList() {
this.loading = true;
listTest(this.queryParams).then(response => {
this.testList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: 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
getTest(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) {
updateTest(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTest(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 delTest(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/driveSchool/test/export', {
...this.queryParams
}, `test_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询驾校合同列表
export function listContract(query) {
return request({
url: '/system/driveSchool/contract/list',
method: 'get',
params: query
})
}
// 查询驾校合同详细
export function getContract(id) {
return request({
url: '/system/driveSchool/contract/' + id,
method: 'get'
})
}
// 新增驾校合同
export function addContract(data) {
return request({
url: '/system/driveSchool/contract',
method: 'post',
data: data
})
}
// 修改驾校合同
export function updateContract(data) {
return request({
url: '/system/driveSchool/contract',
method: 'put',
data: data
})
}
// 删除驾校合同
export function delContract(id) {
return request({
url: '/system/driveSchool/contract/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,238 @@
<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="userName">
<el-input
v-model="queryParams.userName"
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="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="合同内容" align="center" prop="content">
<template slot-scope="scope">
<el-button @click="viewContentFun(scope.row.content)" type="text" >查看</el-button>
</template>
</el-table-column>
<el-table-column label="学员姓名" align="center" prop="userName" />
<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="750px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="合同内容">
<editor v-model="form.content" :min-height="192"/>
</el-form-item>
<el-form-item label="学员姓名" prop="userName">
<el-input v-model="form.userName" 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>
<el-dialog title="查看" :visible.sync="viewFlag" width="65%" append-to-body>
<div style="box-sizing: border-box;padding: 15px;overflow: hidden" v-html="content"></div>
</el-dialog>
</div>
</template>
<script>
import { listContract, getContract, delContract, addContract, updateContract } from "./api/contract";
export default {
name: "Contract",
data() {
return {
viewFlag:false,
content:"",
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
contractList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
userId: null,
content: null,
userName: null
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
viewContentFun(data){
this.content = data;
this.viewFlag = true
},
/** 查询驾校合同列表 */
getList() {
this.loading = true;
listContract(this.queryParams).then(response => {
this.contractList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: null,
userId: null,
content: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null,
userName: 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
getContract(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) {
updateContract(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addContract(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 delContract(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/driveSchool/contract/export', {
...this.queryParams
}, `contract_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询通知列表
export function listNotice(query) {
return request({
url: '/system/drive/notice/list',
method: 'get',
params: query
})
}
// 查询通知详细
export function getNotice(id) {
return request({
url: '/system/drive/notice/' + id,
method: 'get'
})
}
// 新增通知
export function addNotice(data) {
return request({
url: '/system/drive/notice',
method: 'post',
data: data
})
}
// 修改通知
export function updateNotice(data) {
return request({
url: '/system/drive/notice',
method: 'put',
data: data
})
}
// 删除通知
export function delNotice(id) {
return request({
url: '/system/drive/notice/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,260 @@
<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="title">
<el-input
v-model="queryParams.title"
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="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="标题" align="center" prop="title" />
<el-table-column label="内容" align="center" prop="content">
<template slot-scope="scope">
<el-button @click="viewContentFun(scope.row.content)" 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="750px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" placeholder="请输入标题" />
</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>
<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 { listNotice, getNotice, delNotice, addNotice, updateNotice } from "./api/notice";
export default {
name: "Notice",
data() {
return {
viewContent:"",
viewFlag:false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
noticeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
title: null,
content: null,
},
//
form: {},
//
rules: {
title: [
{ required: true, message: "标题不能为空", trigger: "blur" }
],
content: [
{ required: true, message: "内容不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
viewContentFun(data){
this.viewContent =data;
this.viewFlag = true;
},
/** 查询通知列表 */
getList() {
this.loading = true;
listNotice(this.queryParams).then(response => {
this.noticeList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: null,
title: 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
getNotice(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) {
updateNotice(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addNotice(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 delNotice(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/drive/notice/export', {
...this.queryParams
}, `notice_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,59 @@
import request from '@/utils/request'
// 查询订单列表
export function listPay(query) {
return request({
url: '/system/pay/list',
method: 'get',
params: query
})
}
// 查询订单详细
export function getPay(id) {
return request({
url: '/system/pay/' + id,
method: 'get'
})
}
// 新增订单
export function addPay(data) {
return request({
url: '/system/pay',
method: 'post',
data: data
})
}
// 修改订单
export function updatePay(data) {
return request({
url: '/system/pay',
method: 'put',
data: data
})
}
// 删除订单
export function delPay(id) {
return request({
url: '/system/pay/' + id,
method: 'delete'
})
}
export function findJlListAll(jlId) {
return request({
url: `/drivingSchool/system/schoolCoach/findSelfJlListByJxId?jxId=${jlId}`,
method: 'get'
})
}
export function updatePayById(id, name, jlId) {
return request({
url: `/system/pay/updatePayById?id=${id}&name=${name}&jlId=${jlId}`,
method: 'get'
})
}

View File

@ -0,0 +1,465 @@
<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="identity">
<el-input
v-model="queryParams.identity"
placeholder="请输入身份证"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable>
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.Jx_report_state)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="是否面签" prop="isSign">
<el-select v-model="queryParams.isSign" placeholder="请选择状态" clearable>
<el-option
v-for="dict in dict.type.sign_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>-->
<el-form-item label="支付方式" prop="startPay">
<el-input
v-model="queryParams.startPay"
placeholder=""
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker clearable
v-model="queryParams.createTime"
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 label="是否下午" prop="afternoon">-->
<!-- <el-input-->
<!-- v-model="queryParams.afternoon"-->
<!-- 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"
v-hasPermi="['system:pay:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:pay:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:pay:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:pay:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="payList" @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="identity" width="200"/>
<el-table-column label="状态" align="center" prop="state">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.Jx_report_state" :value="scope.row.state"/>
</template>
</el-table-column>
<!-- <el-table-column label="是否面签" align="center" prop="isSign">
<template slot-scope="scope">
<dict-tag :options="dict.type.sign_status" :value="scope.row.isSign"/>
</template>
</el-table-column>-->
<!-- <el-table-column label="支付方式" align="center" prop="startPay" >-->
<el-table-column label="支付方式" align="center" >
<template #default="data">
<div v-if="data.row.startPay === 1">微信支付</div>
<div v-else>线下支付</div>
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="money" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="订单编号" align="center" prop="orderNumber" />
<el-table-column label="教练" align="center" >
<template #default="data">
<el-button @click="changeJlClick(data.row.jxId, data.row.id)" size="mini" v-if="!data.row.jlName" type="primary">分配教练</el-button>
<div style="color: #00afff" @click="changeJlClick(data.row.jxId, data.row.id)" v-else>{{data.row.jlName}}</div>
</template>
</el-table-column>
<!-- <el-table-column label="是否下午" align="center" prop="afternoon" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="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="identity">
<el-input v-model="form.identity" placeholder="请输入身份证" />
</el-form-item>
<el-form-item label="状态" prop="state">
<el-radio-group v-model="form.state">
<el-radio
v-for="dict in this.getDictDatas(DICT_TYPE.Jx_report_state)"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="是否已面签" prop="state">
<el-radio-group v-model="form.isSign">
<el-radio
v-for="dict in dict.type.sign_status"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>-->
<el-form-item label="支付方式" prop="startPay">
<div v-if="form.startPay == 1">微信支付</div>
<div v-else>线下支付</div>
</el-form-item>
<el-form-item label="金额" prop="money">
<el-input v-model="form.money" placeholder="请输入金额" />
</el-form-item>
<el-form-item label="订单编号" prop="orderNumber">
<el-input v-model="form.orderNumber" placeholder="请输入订单编号" />
</el-form-item>
<!-- <el-form-item label="是否下午" prop="afternoon">-->
<!-- <el-input v-model="form.afternoon" 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>
<!-- 修改教练 -->
<el-dialog
:visible.sync="isJl"
width="30%"
>
<el-table v-loading="loading" :data="jlListAll" @selection-change="handleSelectionChange">
<el-table-column label="教练姓名" align="center" prop="instructorName" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="okJlClick(scope.row.instructorName, scope.row.id)"
>选择</el-button>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="exitJlClick()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
// import { listPay, getPay, delPay, addPay, updatePay } from "@/api/system/pay";
import { listPay, getPay, delPay, addPay, updatePay, findJlListAll, updatePayById } from "./api/DriveSchoolPay";
export default {
name: "Pay",
data() {
return {
isJl: false,
jlListAll: [],
bmId: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
payList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
phone: null,
identity: null,
state: null,
startPay: null,
createTime: null,
orderNumber: null,
afternoon: null
},
//
form: {},
//
rules: {
name: [
{ required: true, message: "姓名不能为空", trigger: "blur" }
],
phone: [
{ required: true, message: "手机号不能为空", trigger: "blur" }
],
state: [
{ required: true, message: "状态不能为空", trigger: "change" }
],
}
};
},
created() {
this.getList();
},
methods: {
exitJlClick() {
this.isJl = false
},
async okJlClick(name, id) {
await updatePayById(this.bmId, name, id)
this.isJl = false
listPay(this.queryParams).then(response => {
this.payList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
async changeJlClick(jlId, bmId) {
this.isJl = true
let res = await findJlListAll(jlId);
this.jlListAll = res
this.bmId = bmId
},
/** 查询订单列表 */
getList() {
this.loading = true;
listPay(this.queryParams).then(response => {
this.payList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
phone: null,
identity: null,
state: null,
userId: null,
jlId: null,
jxId: null,
courseId: null,
startPay: null,
createTime: null,
orderNumber: null,
afternoon: 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
getPay(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) {
updatePay(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPay(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 delPay(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/pay/export', {
...this.queryParams
}, `pay_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询经营范围列表
export function listNess(query) {
return request({
url: '/system/ness/list',
method: 'get',
params: query
})
}
// 查询经营范围详细
export function getNess(id) {
return request({
url: '/system/ness/' + id,
method: 'get'
})
}
// 新增经营范围
export function addNess(data) {
return request({
url: '/system/ness',
method: 'post',
data: data
})
}
// 修改经营范围
export function updateNess(data) {
return request({
url: '/system/ness',
method: 'put',
data: data
})
}
// 删除经营范围
export function delNess(id) {
return request({
url: '/system/ness/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,360 @@
<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="deptId">
<!-- <el-input
v-model="queryParams.deptId"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/> -->
</el-form-item>
<el-form-item label="业务类型" prop="businessType">
<el-input
v-model="queryParams.businessType"
placeholder="请输入业务类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="相关资质证书编号" prop="licenseNumber">
<el-input
v-model="queryParams.licenseNumber"
placeholder="请输入相关资质证书编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<!-- <el-form-item label="资质证书签发日期" prop="licenseIssueDate">
<el-date-picker clearable
v-model="queryParams.licenseIssueDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择资质证书签发日期">
</el-date-picker>
</el-form-item> -->
<!-- <el-form-item label="资质证书到期日期" prop="licenseExpiryDate">
<el-date-picker clearable
v-model="queryParams.licenseExpiryDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择资质证书到期日期">
</el-date-picker>
</el-form-item> -->
<!-- <el-form-item label="收费标准" prop="price">
<el-input
v-model="queryParams.price"
placeholder="请输入收费标准"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<!-- <el-form-item label="培训或服务周期" prop="duration">
<el-input
v-model="queryParams.duration"
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="nessList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="" align="center" prop="deptId" /> -->
<el-table-column label="业务名称" align="center" prop="businessType" />
<el-table-column label="业务描述" align="center" prop="description" />
<el-table-column label="相关资质证书编号" align="center" prop="licenseNumber" />
<el-table-column label="资质证书签发日期" align="center" prop="licenseIssueDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.licenseIssueDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="资质证书到期日期" align="center" prop="licenseExpiryDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.licenseExpiryDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="收费标准" align="center" prop="price" />
<el-table-column label="培训或服务周期" align="center" prop="duration" />
<!-- <el-table-column label="备注" align="center" prop="notes" /> -->
<!-- <el-table-column label="相关资质证书图片" align="center" prop="licenseCover" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.licenseCover" :width="50" :height="50"/>
</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="750px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<!-- <el-form-item label="" prop="deptId">
<el-input v-model="form.deptId" placeholder="请输入" />
</el-form-item> -->
<el-form-item label="业务名称" prop="businessType">
<el-input v-model="form.businessType" placeholder="请输入业务名称" />
</el-form-item>
<el-form-item label="业务描述" prop="description">
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="相关资质证书图片" prop="licenseCover">
<image-upload v-model="form.licenseCover"/>
</el-form-item>
<el-form-item label="相关资质证书编号" prop="licenseNumber">
<el-input v-model="form.licenseNumber" placeholder="请输入相关资质证书编号" />
</el-form-item>
<el-form-item label="资质证书签发日期" prop="licenseIssueDate">
<el-date-picker clearable
v-model="form.licenseIssueDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择资质证书签发日期">
</el-date-picker>
</el-form-item>
<el-form-item label="资质证书到期日期" prop="licenseExpiryDate">
<el-date-picker clearable
v-model="form.licenseExpiryDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择资质证书到期日期">
</el-date-picker>
</el-form-item>
<el-form-item label="收费标准" prop="price">
<el-input v-model="form.price" placeholder="请输入收费标准" />
</el-form-item>
<el-form-item label="培训或服务周期" prop="duration">
<el-input v-model="form.duration" placeholder="请输入培训或服务周期" />
</el-form-item>
<el-form-item label="备注" prop="notes">
<el-input v-model="form.notes" type="textarea" 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 { listNess, getNess, delNess, addNess, updateNess } from "./api/ness";
export default {
name: "Ness",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
nessList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
businessType: null,
description: null,
licenseNumber: null,
licenseIssueDate: null,
licenseExpiryDate: null,
price: null,
duration: null,
notes: null,
licenseCover: null
},
//
form: {},
//
rules: {
businessType: [
{ required: true, message: "业务类型不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询经营范围列表 */
getList() {
this.loading = true;
listNess(this.queryParams).then(response => {
this.nessList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null,
businessType: null,
description: null,
licenseNumber: null,
licenseIssueDate: null,
licenseExpiryDate: null,
price: null,
duration: null,
notes: null,
licenseCover: 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
getNess(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) {
updateNess(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addNess(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 delNess(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/ness/export', {
...this.queryParams
}, `ness_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询日常日志列表
export function listDial(query) {
return request({
url: '/drivingSchool/system/dial/list',
method: 'get',
params: query
})
}
// 查询日常日志详细
export function getDial(id) {
return request({
url: '/drivingSchool/system/dial/' + id,
method: 'get'
})
}
// 新增日常日志
export function addDial(data) {
return request({
url: '/drivingSchool/system/dial',
method: 'post',
data: data
})
}
// 修改日常日志
export function updateDial(data) {
return request({
url: '/drivingSchool/system/dial',
method: 'put',
data: data
})
}
// 删除日常日志
export function delDial(id) {
return request({
url: '/drivingSchool/system/dial/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,283 @@
<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="type">
<el-select v-model="queryParams.type" placeholder="请选择来源" clearable>
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.Drive_Dialy)"
: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="dialList" @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="title" />
<el-table-column label="日志内容" align="center" prop="content" />
<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="type">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.Drive_Dialy" :value="scope.row.type"/>
</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="750px" 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="title">
<el-input v-model="form.title" placeholder="请输入日志标题" />
</el-form-item>
<el-form-item label="日志内容">
<editor v-model="form.content" :min-height="192"/>
</el-form-item>
<el-form-item label="相关图片" prop="photo">
<image-upload v-model="form.photo"/>
</el-form-item>
<el-form-item label="来源" prop="type">
<el-select v-model="form.type" placeholder="请选择来源">
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.Drive_Dialy)"
: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 { listDial, getDial, delDial, addDial, updateDial } from "./api/dial";
export default {
name: "Dial",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dialList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
title: null,
content: null,
photo: null,
type: null
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询日常日志列表 */
getList() {
this.loading = true;
listDial(this.queryParams).then(response => {
this.dialList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: null,
title: null,
content: null,
photo: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null,
type: 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
getDial(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) {
updateDial(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDial(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 delDial(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('drivingSchool/system/dial/export', {
...this.queryParams
}, `dial_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,59 @@
import request from '@/utils/request'
// 查询预约练车列表
export function listReservationCourse(query) {
return request({
url: '/drivingSchool/system/reservationCourse/pclist',
method: 'get',
params: query
})
}
// 查询预约练车详细
export function getReservationCourse(id) {
return request({
url: '/drivingSchool/system/reservationCourse/' + id,
method: 'get'
})
}
// 新增预约练车
export function addReservationCourse(data) {
return request({
url: '/drivingSchool/system/reservationCourse',
method: 'post',
data: data
})
}
// 修改预约练车
export function updateReservationCourse(data) {
return request({
url: '/drivingSchool/system/reservationCourse',
method: 'put',
data: data
})
}
// 删除预约练车
export function delReservationCourse(id) {
return request({
url: '/drivingSchool/system/reservationCourse/' + id,
method: 'delete'
})
}
export function findJlListAll() {
return request({
url: '/drivingSchool/system/schoolCoach/list',
method: 'get'
})
}
export function updateCourseById(data) {
return request({
url: `/drivingSchool/system/reservationCourse/updateCourseById`,
method: 'post',
data: data
})
}

View File

@ -0,0 +1,336 @@
<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="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="预约日期" prop="orderTime">
<el-date-picker clearable
v-model="queryParams.orderTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择预约日期">
</el-date-picker>
</el-form-item>
<el-form-item label="教练名字" prop="coachName">
<el-input
v-model="queryParams.coachName"
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="reservationCourseList" @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="userName" />
<el-table-column label="用户手机号" align="center" prop="sysUser.phonenumber" />
<el-table-column label="预约日期" align="center" prop="orderTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="时间段" align="center" prop="timePeriod" />
<!-- <el-table-column label="教练名字" align="center" prop="coachName" />-->
<el-table-column label="教练" align="center" prop="coachName" >
<!-- <template #default="data">-->
<!-- <el-select @change="changeCoachName(data.row)" v-model="data.row.coachName" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in jlListAll"-->
<!-- :key="item.instructorName"-->
<!-- :label="item.instructorName"-->
<!-- :value="item.instructorName">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </template>-->
</el-table-column>
<!-- <el-table-column label="科目类型" align="center" prop="accountType" />-->
<!-- <el-table-column label="科目类型" align="center" >-->
<!-- <template #default="data">-->
<!-- <div v-if="data.row.accountType.includes('2') ">科目二</div>-->
<!-- <div v-if="data.row.accountType.includes('3') ">科目三</div>-->
<!-- <div v-if="data.row.accountType.includes('5') ">科目五</div>-->
<!-- </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="userName">
<el-input v-model="form.userName" placeholder="请输入用户姓名" />
</el-form-item>
<el-form-item label="预约日期" prop="orderTime">
<el-date-picker clearable
v-model="form.orderTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择预约日期">
</el-date-picker>
</el-form-item>
<el-form-item label="时间段" prop="timePeriod">
<!-- <el-input v-model="form.timePeriod" placeholder="请输入时间段 1上午 2下午" />-->
<el-select v-model="form.timePeriod" placeholder="请选择">
<el-option
v-for="item in timePeriod"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="教练名字" prop="coachName">
<el-input v-model="form.coachName" 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 { listReservationCourse, getReservationCourse, delReservationCourse, addReservationCourse,
updateReservationCourse, findJlListAll, updateCourseById } from "./api/reservationCourse";
export default {
name: "ReservationCourse",
data() {
return {
timePeriod: ["上午", "下午"],
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
reservationCourseList: [],
//
title: "",
//
open: false,
jlListAll: [],
jlName: null,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
userId: null,
userName: null,
orderTime: null,
timePeriod: null,
coachId: null,
coachName: null,
accountType: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
this.changeFindJlListAll()
},
methods: {
changeCoachName(data) {
console.log("方法被调用了", data)
updateCourseById(data)
},
changeFindJlListAll() {
findJlListAll().then(item => {
this.jlListAll = item.rows
console.log("获取到的数据为 ===========>", this.jlListAll)
})
},
/** 查询预约练车列表 */
getList() {
this.loading = true;
listReservationCourse(this.queryParams).then(response => {
this.reservationCourseList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: null,
userId: null,
userName: null,
orderTime: null,
timePeriod: null,
coachId: null,
coachName: null,
accountType: 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
getReservationCourse(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) {
updateReservationCourse(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addReservationCourse(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 delReservationCourse(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('drivingSchool/system/reservationCourse/export', {
...this.queryParams
}, `reservationCourse_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,59 @@
import request from '@/utils/request'
// 查询订单列表
export function listPay(query) {
return request({
url: '/system/pay/list',
method: 'get',
params: query
})
}
// 查询订单详细
export function getPay(id) {
return request({
url: '/system/pay/' + id,
method: 'get'
})
}
// 新增订单
export function addPay(data) {
return request({
url: '/system/pay',
method: 'post',
data: data
})
}
// 修改订单
export function updatePay(data) {
return request({
url: '/system/pay',
method: 'put',
data: data
})
}
// 删除订单
export function delPay(id) {
return request({
url: '/system/pay/' + id,
method: 'delete'
})
}
export function findJlListAll(jlId) {
return request({
url: `/drivingSchool/system/schoolCoach/findSelfJlListByJxId?jxId=${jlId}`,
method: 'get'
})
}
export function updatePayById(id, name, jlId) {
return request({
url: `/system/pay/updatePayById?id=${id}&name=${name}&jlId=${jlId}`,
method: 'get'
})
}

View File

@ -0,0 +1,596 @@
<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="identity">
<el-input
v-model="queryParams.identity"
placeholder="请输入身份证号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable>
<el-option
v-for="dict in dict.type.jx_report_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否面签" prop="isSign">
<el-select v-model="queryParams.isSign" placeholder="请选择状态" clearable>
<el-option
v-for="dict in dict.type.sign_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否退学" prop="isReturn">
<el-select v-model="queryParams.isReturn" placeholder="请选择状态" clearable>
<el-option
v-for="dict in dict.type.school_return"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-form-item label="课程名称" prop="courseName">
<el-input
v-model="queryParams.courseName"
placeholder="请输入课程名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>
<!-- <el-form-item label="是否下午" prop="afternoon">-->
<!-- <el-input-->
<!-- v-model="queryParams.afternoon"-->
<!-- 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="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</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="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
>导入
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:pay:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="payList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="类别" align="center" prop="typeDec" />-->
<el-table-column label="序号" align="center" prop="sorNumber" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="学员照片" align="center" prop="proofTwo" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.proofTwo" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="缴费金额" align="center" prop="money" />
<!-- <el-table-column label="家庭住址" align="center" prop="address" />
<el-table-column label="缴费情况" align="center" prop="moneyDetail" />
<el-table-column label="黑谷录入" align="center" prop="blackInto" />
<el-table-column label="管理费" align="center" prop="manageMoney" />
<el-table-column label="科二结款" align="center" prop="towMoney" />
<el-table-column label="科三结款" align="center" prop="thirdMoney" />
<el-table-column label="科二考试日期" align="center" prop="twoTime" />
<el-table-column label="科二结款日期" align="center" prop="twoMoneyTime" />
<el-table-column label="科三考试日期" align="center" prop="thirdTime" />
<el-table-column label="科三结款日期" align="center" prop="thirdMoneyTime" />
<el-table-column label="结款教练" align="center" prop="coursenName" />-->
<!-- <el-table-column label="身份证" align="center" prop="identity" />-->
<!-- <el-table-column label="身份证" align="center" prop="identity" />-->
<el-table-column label="状态" align="center" prop="state">
<template slot-scope="scope">
<dict-tag :options="dict.type.jx_report_state" :value="scope.row.state"/>
</template>
</el-table-column>
<el-table-column label="职业" align="center" prop="prof">
<template slot-scope="scope">
<dict-tag :options="dict.type.profession" :value="scope.row.prof"/>
</template>
</el-table-column>
<!-- <el-table-column label="是否面签" align="center" prop="isSign">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.sign_status" :value="scope.row.isSign"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="课程名称" align="center" prop="courseName" />
<!-- <el-table-column label="支付方式" align="center" prop="startPay" >-->
<el-table-column label="报名日期" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="退学日期" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>-->
<el-table-column label="退费金额" align="center" prop="returnMoney" />
<!-- <el-table-column label="转账凭证" align="center" prop="proofOne" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.proofOne" :width="50" :height="50"/>
</template>
</el-table-column>-->
<el-table-column label="身份证号" align="center" prop="identity" />
<el-table-column label="教练" align="center" >
<template #default="data">
<el-button @click="changeJlClick(data.row.jxId, data.row.id)" size="mini" v-if="!data.row.jlName" type="primary">分配教练</el-button>
<div style="color: #00afff" @click="changeJlClick(data.row.jxId, data.row.id)" v-else>{{data.row.jlName}}</div>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="是否下午" align="center" prop="afternoon" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="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="750px" 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="proofTwo">
<image-upload limit="1" v-model="form.proofTwo"/>
</el-form-item>
<el-form-item label="职业" prop="prof">
<el-radio-group v-model="form.prof">
<el-radio
v-for="dict in dict.type.profession"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-radio-group v-model="form.state">
<el-radio
v-for="dict in dict.type.jx_report_state"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否已面签" prop="isSign">
<el-radio-group v-model="form.isSign">
<el-radio
v-for="dict in dict.type.sign_status"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否退学" prop="isReturn">
<el-radio-group v-model="form.isReturn">
<el-radio
v-for="dict in dict.type.school_return"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="支付方式" prop="startPay">
<el-input v-model="form.startPay" placeholder="请输入支付方式" />
</el-form-item>-->
<!-- <el-form-item label="订单编号" prop="orderNumber">
<el-input v-model="form.orderNumber" placeholder="请输入订单编号" />
</el-form-item>-->
<el-form-item label="退费金额(元)" prop="returnMoney">
<el-input v-model="form.returnMoney" placeholder="请输入退费金额" />
</el-form-item>
<el-form-item label="转账凭证" prop="proofOne">
<image-upload limit="1" v-model="form.proofOne"/>
</el-form-item>
<!-- <el-form-item label="是否下午" prop="afternoon">-->
<!-- <el-input v-model="form.afternoon" placeholder="请输入是否下午" />-->
<!-- </el-form-item>-->
</el-form>
<el-form-item label="身份证号" prop="identity">
<el-input v-model="form.identity" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<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
:visible.sync="isJl"
width="30%"
>
<el-table v-loading="loading" :data="jlListAll" @selection-change="handleSelectionChange">
<el-table-column label="教练姓名" align="center" prop="instructorName" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="okJlClick(scope.row.instructorName, scope.row.id)"
>选择</el-button>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="exitJlClick()"> </el-button>
</span>
</el-dialog>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<!-- <div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport"/>
是否更新已经存在的用户数据
</div>-->
<span>仅允许导入xlsxlsx格式文件</span>
<!-- <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
@click="importTemplate">下载模板
</el-link>-->
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
// import { listPay, getPay, delPay, addPay, updatePay } from "@/api/system/pay";
import { listPay, getPay, delPay, addPay, updatePay, findJlListAll, updatePayById } from "./api/DriveSchoolPay";
import {getToken} from "@/utils/auth";
export default {
name: "Pay",
dicts: ['jx_report_state','sign_status','school_return','profession'],
data() {
return {
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: {Authorization: "Bearer " + getToken()},
//
url: process.env.VUE_APP_BASE_API + "/system/pay/importData"
},
isJl: false,
jlListAll: [],
bmId: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
payList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
phone: null,
identity: null,
state: null,
startPay: null,
createTime: null,
orderNumber: null,
afternoon: null
},
//
form: {},
//
rules: {
name: [
{ required: true, message: "姓名不能为空", trigger: "blur" }
],
phone: [
{ required: true, message: "手机号不能为空", trigger: "blur" }
],
state: [
{ required: true, message: "状态不能为空", trigger: "change" }
],
}
};
},
created() {
this.getList();
},
methods: {
//
submitFileForm() {
this.$refs.upload.submit();
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = "学员导入";
this.upload.open = true;
},
exitJlClick() {
this.isJl = false
},
async okJlClick(name, id) {
await updatePayById(this.bmId, name, id)
this.isJl = false
listPay(this.queryParams).then(response => {
this.payList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
async changeJlClick(jlId, bmId) {
this.isJl = true
let res = await findJlListAll(jlId);
this.jlListAll = res
this.bmId = bmId
},
/** 查询订单列表 */
getList() {
this.loading = true;
listPay(this.queryParams).then(response => {
this.payList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
phone: null,
identity: null,
state: null,
userId: null,
jlId: null,
jxId: null,
courseId: null,
startPay: null,
createTime: null,
orderNumber: null,
afternoon: 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
getPay(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) {
updatePay(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPay(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 delPay(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/pay/export', {
...this.queryParams
}, `pay_${new Date().getTime()}.xlsx`)
}
}
};
</script>