From b6d70fd9329b1c5fee415713e7ca5d9dcab66526 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Wed, 02 Mar 2022 09:01:06 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/views/trainApply/index.vue | 322 ++++++++++++++++++++++++++++++++---------------------
1 files changed, 193 insertions(+), 129 deletions(-)
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index 7230bf3..ec87ff4 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -6,131 +6,128 @@
* menu-name 报名考试
*/
<template>
- <el-row class="morpheus-box-apply-exam-1">
- <el-col
- :span="24"
- :class="[
- 'hasButOne',
- $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
- ]"
+ <!-- class="exam-card-body" -->
+ <basic-container
+ :class="[
+ $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '',
+ ]"
+ >
+ <avue-crud
+ v-model="obj"
+ class="company-box tablesss"
+ :option="questionBankOption"
+ :search.sync="questionBankSearch"
+ :table-loading="questionBankLoading"
+ :data="questionBankData"
+ ref="questionBankCrud"
+ :page.sync="questionBankPage"
+ @on-load="questionBankOnLoad"
+ @selection-change="questionBankSelectionChange"
+ @search-change="questionBankSearchChange"
+ @search-reset="questionBankSearchReset"
+ @current-change="questionBankCurrentChange"
+ @size-change="questionBankSizeChange"
+ @row-save="questionBankRowSave"
+ @row-del="questionBankRowDel"
+ :row-style="rowStyle"
>
- <el-card>
- <div class="exam-card-body">
- <avue-crud
- v-model="obj"
- class="company-box"
- :option="questionBankOption"
- :search.sync="questionBankSearch"
- :table-loading="questionBankLoading"
- :data="questionBankData"
- ref="questionBankCrud"
- :page.sync="questionBankPage"
- @on-load="questionBankOnLoad"
- @selection-change="questionBankSelectionChange"
- @search-change="questionBankSearchChange"
- @search-reset="questionBankSearchReset"
- @current-change="questionBankCurrentChange"
- @size-change="questionBankSizeChange"
- @row-save="questionBankRowSave"
- @row-del="questionBankRowDel"
- :row-style="rowStyle"
- >
- <!-- 自定义按钮 -->
- <template slot="menuLeft">
- <el-button
- style="display: none"
- type="warning"
- size="small"
- plain
- icon="el-icon-download"
- @click="handleExport"
- >导出
- </el-button>
- <el-button
- type="warning"
- size="small"
- plain
- icon="el-icon-receiving"
- @click="handleExport"
- >清册打印
- </el-button>
- <el-button
- type="success"
- size="small"
- plain
- v-if="false"
- icon="el-icon-download"
- @click="handleImport"
- >清册导入
- </el-button>
- <el-button
- type="warning"
- size="small"
- plain
- icon="el-icon-download"
- @click="handleApplyInfoExport"
- >报名清册信息导出
- </el-button>
- </template>
+ <!-- 自定义按钮 -->
+ <template slot="menuLeft">
+ <el-button
+ style="display: none"
+ type="warning"
+ size="small"
+ plain
+ icon="el-icon-download"
+ @click="handleExport"
+ >导出
+ </el-button>
+ <el-button
+ type="warning"
+ size="small"
+ plain
+ icon="el-icon-receiving"
+ @click="handleExport"
+ >清册打印
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ v-if="false"
+ icon="el-icon-download"
+ @click="handleImport"
+ >清册导入
+ </el-button>
+ <el-button
+ type="warning"
+ size="small"
+ plain
+ icon="el-icon-download"
+ @click="handleApplyInfoExport"
+ >报名清册信息导出
+ </el-button>
+ </template>
- <template slot-scope="{ type, row }" slot="menu">
- <el-button
- :type="type"
- size="small"
- icon="el-icon-receiving"
- :disabled="
- row.candidateNo == '' ||
- row.cancel == 2 ||
- row.auditStatus == 2
- "
- @click="handlePrint(row)"
- >准考证打印
- </el-button>
- <el-button
- :type="type"
- size="small"
- icon="el-icon-refresh-left"
- :disabled="
- row.cancel == 2 || row.isExam == 2 || row.isExam == 3
- "
- @click="revoke(row)"
- >取消报名
- </el-button>
- <el-button
- style="display: none"
- :type="type"
- size="small"
- icon="el-icon-circle-check"
- :disabled="row.auditStatus == 1"
- @click="auditSucess(row)"
- >审核通过
- </el-button>
-
- </template>
- </avue-crud>
+ <template slot-scope="{ type, row }" slot="menu">
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-receiving"
+ :disabled="
+ row.candidateNo == '' || row.cancel == 2 || row.auditStatus == 2
+ "
+ @click="handlePrint(row)"
+ >准考证打印
+ </el-button>
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-refresh-left"
+ :disabled="row.cancel == 2 || row.isExam == 2 || row.isExam == 3"
+ @click="revoke(row)"
+ >取消报名
+ </el-button>
+ <el-button
+ style="display: none"
+ :type="type"
+ size="small"
+ icon="el-icon-circle-check"
+ :disabled="row.auditStatus == 1"
+ @click="auditSucess(row)"
+ >审核通过
+ </el-button>
+ <el-button
+ v-if="row.vipStatus != 1 && permission.exam_vip"
+ icon="el-icon-folder-checked"
+ @click="usesVipConfirm(row)"
+ :size="size"
+ :type="type"
+ >缴费确认</el-button
+ >
+ </template>
+ </avue-crud>
- <el-dialog
- title="清册数据导入"
- append-to-body
- :visible.sync="excelBox"
- width="555px"
- >
- <avue-form
- :option="excelOption"
- v-model="excelForm"
- :upload-after="uploadAfter"
- >
- <template slot="excelTemplate">
- <el-button type="primary" @click="handleTemplate">
- 点击下载<i class="el-icon-download el-icon--right"></i>
- </el-button>
- </template>
- </avue-form>
- </el-dialog>
- </div>
- </el-card>
- </el-col>
- </el-row>
+ <el-dialog
+ title="清册数据导入"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption"
+ v-model="excelForm"
+ :upload-after="uploadAfter"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
</template>
<script>
@@ -138,12 +135,15 @@
getdata,
adddata,
cancelTrainAudit,
+ cancelTrain,
auditSucess,
remove,
+ vipSign,
} from "@/api/trainingRegistration/trainingRegistration";
import Qs from "qs";
import { getToken } from "@/util/auth";
import { mapState } from "vuex";
+import { mapGetters } from "vuex";
var DIC = {
cancel: [
@@ -187,7 +187,7 @@
//dialogType: 'drawer',
dialogClickModal: false,
// 操作栏宽度
- menuWidth: 200,
+ menuWidth: 280,
...this.$store.state.control.clearOtherBut,
column: [
{
@@ -230,6 +230,7 @@
// 表单新增时是否可见
addDisplay: false,
search: true,
+ searchSpan: 3,
// 表单新增时是否为查看模式
addDetail: false,
// 表单编辑时是否禁止
@@ -281,12 +282,14 @@
trigger: "blur",
},
],
- width: 220,
+ width: 180,
+ overHidden: true,
},
{
label: "所属企业",
prop: "deptName",
search: true,
+ searchSpan: 5,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -307,7 +310,8 @@
trigger: "blur",
},
],
- width: 220,
+ width: 200,
+ overHidden: true,
},
{
label: "报名状态",
@@ -379,7 +383,7 @@
trigger: "blur",
},
],
- width: 200,
+ width: 150,
},
{
label: "报考证件",
@@ -560,6 +564,34 @@
addDisplay: false,
width: 100,
},
+ // {
+ // label: "缴费状态",
+ // search: true,
+ // type: "select",
+ // searchSpan: 4,
+ // prop: "vipStatus",
+ // dicData: [
+ // {
+ // label: '全部',
+ // value: 0,
+ // },
+ // {
+ // label: '已缴费',
+ // value: 1,
+ // },
+ // {
+ // label: '未缴费',
+ // value: 2,
+ // }
+ // ],
+ // props: {
+ // label: "label",
+ // value: "value"
+ // },
+ // editDisplay: false,
+ // addDisplay: false,
+ // width: 100,
+ // },
],
},
questionBankSearch: {},
@@ -659,6 +691,7 @@
if (i > 1) {
this.$store.state.tags.tagList.splice(ind, 1);
}
+ this.$store.commit("setWindowSizeHeightAdd");
},
computed: {
...mapState({
@@ -670,6 +703,15 @@
ids.push(ele.id);
});
return ids.join(",");
+ },
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.notice_add, false),
+ viewBtn: this.vaildData(this.permission.notice_view, false),
+ delBtn: this.vaildData(this.permission.notice_delete, false),
+ editBtn: this.vaildData(this.permission.notice_edit, false),
+ };
},
},
methods: {
@@ -691,7 +733,7 @@
auditStatus: this.questionBankSearch.auditStatus,
deptName: this.questionBankSearch.deptName,
isExam: this.questionBankSearch.isExam,
- realName: this.questionBankSearch.realName
+ realName: this.questionBankSearch.realName,
};
data["examId"] = this.$route.query.id;
//序列号url形式,用&拼接
@@ -736,6 +778,7 @@
this.questionBankData = data.records;
this.questionBankLoading = false;
this.questionBankSelectionClear();
+ this.$store.commit("setWindowSizeHeightAdd");
});
},
questionBankSelectionClear() {
@@ -769,7 +812,7 @@
type: "warning",
}).then(() => {
row.cancel = 2;
- cancelTrainAudit(row).then(
+ cancelTrain(row).then(
() => {
this.onLoad(this.page);
this.$message({
@@ -809,7 +852,28 @@
);
});
},
-
+ usesVipConfirm(row) {
+ this.$confirm("确定将选择当前人员确认已缴费?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ var data = {
+ id: row.id,
+ userId: row.userId,
+ vipStatus: 1,
+ };
+ return vipSign(data);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
// 新增
questionBankRowSave(row, done, loading) {
adddata({
--
Gitblit v1.9.3