From e735896a68d8c1742859a06d7bc1c7c1bb61f57d Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Thu, 23 Jan 2025 14:08:52 +0800
Subject: [PATCH] 新增页面
---
src/views/specialOperationsPay/notCoalPay/index.vue | 245 ++++++++++++++++++++++++++++++++----------------
1 files changed, 164 insertions(+), 81 deletions(-)
diff --git a/src/views/specialOperationsPay/notCoalPay/index.vue b/src/views/specialOperationsPay/notCoalPay/index.vue
index 5500d37..fc8b607 100644
--- a/src/views/specialOperationsPay/notCoalPay/index.vue
+++ b/src/views/specialOperationsPay/notCoalPay/index.vue
@@ -5,7 +5,9 @@
size="medium"
style="margin-bottom: 10px;background-color: #0FC7F0;color: white"
@click="handleAdd('add',{})"
- >录入批次</el-button>
+ v-if="isAhthority"
+ >录入批次
+ </el-button>
<el-date-picker
style="margin-left: 30px;width: 300px"
size="small"
@@ -18,49 +20,68 @@
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
- <el-select v-model="queryParams.institutionId" size="small" style="margin-left: 15px;" placeholder="请选择行政区划">
+ <el-select v-model="queryParams.districtCode" size="small" style="margin-left: 15px;margin-right: 15px" placeholder="行政区划">
<el-option
- v-for="item in districtList"
+ v-for="item in areaList"
:key="item.id"
- :label="item.institutionalName"
- :value="item.id">
+ :label="item.name"
+ :value="item.code">
</el-option>
</el-select>
- <el-select v-model="queryParams.institutionId" size="small" style="margin-left: 15px;" placeholder="请选择考试点">
- <el-option
- v-for="item in examList"
- :key="item.id"
- :label="item.institutionalName"
- :value="item.id">
- </el-option>
- </el-select>
+<!-- <el-select v-model="queryParams.deptId" size="small" style="margin-left: 15px;" placeholder="请选择考试点">-->
+<!-- <el-option-->
+<!-- v-for="item in examList"-->
+<!-- :key="item.siteId"-->
+<!-- :label="item.siteName"-->
+<!-- :value="item.siteId">-->
+<!-- </el-option>-->
+<!-- </el-select>-->
+<!-- <treeselect v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择组织架构" />-->
+ <el-cascader v-model="queryParams.deptId" size="small" :options="deptOptions" placeholder="组织架构" :props="{ expandTrigger: 'hover',checkStrictly: true,emitPath: false,value: 'id' }"></el-cascader>
<el-button
size="small"
type="primary"
style="margin-bottom: 10px;margin-left: 20px"
@click="handleQuery()"
- >查询</el-button>
+ >查询
+ </el-button>
<el-button
size="small"
type="primary"
style="margin-bottom: 10px"
@click="resetQuery()"
- >重置</el-button>
+ >重置
+ </el-button>
</div>
- <el-table v-loading="loading" :data="expertList" style="margin-top: 10px">
- <el-table-column label="序号" align="center" type="index" />
- <el-table-column label="提交时间" align="center" prop="createTime" />
- <el-table-column label="批次名称" align="center" prop="batchName" />
- <el-table-column label="考试点" align="center" prop="batchName" />
- <el-table-column label="所属地州" align="center" prop="batchName" />
- <el-table-column label="缴费类型" align="center" prop="batchName" />
- <el-table-column label="单人(元)" align="center" prop="batchName" />
- <el-table-column label="人数" align="center" prop="batchName" />
+ <el-table v-loading="loading" :data="payList" style="margin-top: 10px">
+ <el-table-column label="序号" align="center" type="index"/>
+ <el-table-column label="提交时间" align="center" prop="createTime"/>
+ <el-table-column label="批次名称" align="center" prop="batchName"/>
+ <el-table-column label="组织架构" align="center" prop="deptName"/>
+ <el-table-column label="所属地州" align="center" prop="districtName"/>
+ <el-table-column label="缴费类型" align="center" prop="payType">
+ <template #default="scope">
+ {{scope.row.payType == 1?'初训理论':scope.row.payType == 2?'初训实操':scope.row.payType == 3?'初训理论与实操':scope.row.payType == 4?'复训理论':''}}
+ </template>
+ </el-table-column>
+ <el-table-column label="单人(元)" align="center" prop="amount"/>
+ <el-table-column label="人数" align="center">
+ <template #default="scope">
+ <span>{{scope.row.havePayNum}}</span>/{{scope.row.totalNum}}
+ </template>
+ </el-table-column>
+ <el-table-column label="学员个人缴费" align="center" prop="batchName">
+ <template #default="scope">
+ <span v-if="scope.row.payPersonType == 1">已开启</span>
+ <span v-if="scope.row.payPersonType == 2" style="color:red">已关闭</span>
+ <el-button type="text" style="color:lightcoral" @click="updatePayType(scope.row)" v-if="scope.row.payPersonType == 1">关闭</el-button>
+ </template>
+ </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px">
- <template #default="scope" >
- <el-button size="mini" type="text" style="color: #1890ff" @click="handleViewStu(scope.row)">学员管理</el-button>
- <el-button size="mini" type="text" style="color: #1890ff" @click="handleViewCourse(scope.row,'')">批量缴费</el-button>
- <el-button size="mini" type="text" style="color:lightcoral" @click="handleViewCourse(scope.row,'')">删除</el-button>
+ <template #default="scope">
+ <el-button v-if="isAhthority" size="mini" type="text" style="color: #1890ff" @click="handleViewStu(scope.row)">学员管理</el-button>
+<!-- <el-button v-if="isAhthority" size="mini" type="text" style="color: #1890ff" @click="handleBatchPay(scope.row,'')">批量缴费</el-button>-->
+ <el-button v-if="isAhthority" size="mini" type="text" style="color:lightcoral" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -71,108 +92,170 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
- <add-dialog ref="addDialogRef" @getList = "getList"></add-dialog>
- <stu-dialog ref="stuDialogRef" @getList = "getList"></stu-dialog>
+ <add-dialog ref="addDialogRef" @getList="getList"></add-dialog>
+ <stu-dialog ref="stuDialogRef" @getList="getList"></stu-dialog>
+ <batch-pay ref="batchPayRef" @getList="getList"></batch-pay>
</div>
</template>
<script>
-import { delJobRegist } from '@/api/coalMine/jobRegist'
-import { listPlat, listPlatSelect } from '@/api/onlineEducation/plat'
-import { listCourse } from '@/api/onlineEducation/course'
+import {delJobRegist} from '@/api/coalMine/jobRegist'
+import {listPlat, listPlatSelect} from '@/api/onlineEducation/plat'
+import {listCourse} from '@/api/onlineEducation/course'
import addDialog from './components/addDialog.vue'
import stuDialog from './components/studentDialog.vue'
+import batchPay from "./components/batchPay.vue"
+import {getExamPage} from "@/api/coalMine/placeManage/exam";
+import {getAreaList} from "@/api/coalMine/placeManage/train";
+import {delNonCoalPay, editPayTypeInfo, getNonCoalPayList} from "@/api/specialOperationsPay/notCoalPay";
+import store from "@/store";
+import {deptTreeSelect} from "@/api/system/user";
+
export default {
- name: "nPeopleManage",
+ name: "nCoalPay",
dicts: [],
- components: { addDialog,stuDialog },
+ components: {addDialog, stuDialog, batchPay},
data() {
return {
- isDark:true,
+ isDark: true,
loading: false,
single: true,
multiple: true,
showSearch: true,
addForm: false,
total: 0,
- districtList: [],
- examList: [],
+ areaList: [],
+ deptOptions: [],
dateValue: [],
- expertList: [],
+ payList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
- institutionId: ''
+ districtCode: '',
+ deptId: '',
+ params: {
+ startTime: '',
+ endTime: ''
+ }
},
+ isAhthority: false
};
},
created() {
- this.getDistrict();
- this.getList();
- this.getExam();
+ this.getDistrict()
+ this.getList()
+ this.getDeptList()
+ const roles = store.getters && store.getters.roles
+ if (roles.includes('admin') || roles.includes('mkexam') || roles.includes('feimeiexam') ) {
+ this.isAhthority = true
+ } else {
+ this.isAhthority = false
+ }
},
methods: {
- getList(){
+ getList() {
this.loading = true;
- this.expertList = [
- {
- id: 1,
-
- }
- ]
- this.total = 1
+ this.loading = false;
+ this.queryParams.params.startTime = this.dateValue[0]?this.dateValue[0]:''
+ this.queryParams.params.endTime = this.dateValue[1]?this.dateValue[1]:''
+ getNonCoalPayList( this.queryParams).then((res) => {
+ if (res.code == 200) {
+ this.payList = res.rows
+ this.total = res.total
this.loading = false;
- // this.loading = true;
- // listCourse( this.queryParams).then((res) => {
- // if (res.code == 200) {
- // this.expertList = res.rows.map(item => {
- // return {
- // ...item,
- // courseNum: item.outline ? item.outline.length : '',
- // }
- // })
- // this.total = res.total
- // this.loading = false;
- // }
- // })
+ }
+ })
},
+
+ getDeptList() {
+ deptTreeSelect().then(response => {
+ this.deptOptions = response.data
+ })
+ },
+
openUrl(url) {
- window.open(url,'_blank')
+ window.open(url, '_blank')
},
//行政区划
- getDistrict() {
+ async getDistrict() {
+ const res = await getAreaList()
+ if (res.code == 200) {
+ this.areaList = res.data
+ }
+ },
+ changeDate(val) {
+ console.log('val', val)
},
- //考试点
- getExam() {
-
+ handleAdd(type, data) {
+ this.$refs.addDialogRef.openDialog(type, data, this.areaList,this.deptOptions);
},
- changeDate(val){
- console.log('val',val)
+ handleViewStu(val) {
+ this.$refs.stuDialogRef.openDialog(val.id);
},
- handleAdd(type,data) {
- this.$refs.addDialogRef.openDialog(type, data);
+ handleBatchPay(val) {
+ this.$refs.batchPayRef.openDialog(val);
},
- handleViewStu(val){
- this.$refs.stuDialogRef.openDialog(val);
- },
- handleQuery(){
+ handleQuery() {
this.getList();
},
- resetQuery(){
+ resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
- institutionId: ''
+ districtCode: '',
+ deptId: '',
+ params: {
+ startTime: '',
+ endTime: ''
+ }
}
+ this.dateValue = []
this.getList();
},
- check(val){
- this.$confirm('此操作将审核该条数据, 是否继续?', '提示', {
+ updatePayType(row){
+ this.$confirm('一旦关闭则无法重新开启个人缴费,必须批量缴完剩余所有学员。是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
+ const res = await editPayTypeInfo({id: row.id,payPersonType: 2})
+ if(res.code == 200){
+ this.$message({
+ type: 'success',
+ message: '删除成功!'
+ });
+ await this.getList()
+ }else{
+ this.$message({
+ type: 'warning',
+ message: res.msg
+ });
+ }
+ }).catch(() => {
+
+ });
+ },
+
+ handleDelete(row){
+ this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(async () => {
+ const res = await delNonCoalPay(row.id)
+ if(res.code == 200){
+ this.$message({
+ type: 'success',
+ message: '删除成功!'
+ });
+ await this.getList()
+ }else{
+ this.$message({
+ type: 'warning',
+ message: res.msg
+ });
+ }
}).catch(() => {
});
--
Gitblit v1.9.2