From b8dfc98b089e47fdb3e269941bbd2de3f7fb7de1 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 13 Sep 2021 17:14:57 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_enterprises
---
src/views/trainApply/index.vue | 136 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 126 insertions(+), 10 deletions(-)
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index 231f28f..a201ecf 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -62,9 +62,25 @@
:type="type"
size="small"
icon="el-icon-receiving"
- :disabled="row.candidateNo==''"
+ :disabled="row.candidateNo=='' || row.cancel==2"
@click="handlePrint(row)"
>准考证打印
+ </el-button>
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-refresh-left"
+ :disabled="row.cancel==2"
+ @click="revoke(row)"
+ >取消报名
+ </el-button>
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-circle-check"
+ :disabled="row.auditStatus==1"
+ @click="auditSucess(row)"
+ >审核通过
</el-button>
</template>
@@ -98,7 +114,7 @@
<script>
-import {getdata,adddata,remove} from "@/api/trainingRegistration/trainingRegistration";
+import {getdata,adddata, cancelTrainAudit,auditSucess,remove} from "@/api/trainingRegistration/trainingRegistration";
import { mapState } from 'vuex'
@@ -258,6 +274,24 @@
width: 220
},
{
+ label: "报名状态",
+ prop: "cancel",
+ type:"select",
+ search:true,
+ hide:true,
+ searchSpan:4,
+ searchValue:1,
+ dicData:[
+ {
+ label: '已报名',
+ value: 1
+ }, {
+ label: '已取消',
+ value: 2
+ }
+ ]
+ },
+ {
label: "准考证号",
prop: "candidateNo",
slot: true,
@@ -373,7 +407,7 @@
? "0" + new Date().getSeconds()
: new Date().getSeconds())),
- width: 160
+ width: 150
},
{
label: "考试时间",
@@ -394,7 +428,44 @@
editDisplay: true,
// 表单编辑时是否为查看模式
editDetail: false,
- width: 160
+ width: 150
+ },
+ {
+ label: "审核状态",
+ search: true,
+ searchLabelWidth: 110,
+ type: "select",
+ searchSpan: 4,
+ prop: "auditStatus",
+ searchValue: 4,
+ dicData: [{
+ label: '全部',
+ value: 0,
+ },
+ {
+ label: '审核通过',
+ value: 1,
+ },
+ {
+ label: '审核不通过',
+ value: 2,
+ },
+ {
+ label: '已提交审核',
+ value: 3,
+ },
+ {
+ label: '未提交审核',
+ value: 4,
+ }
+ ],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ editDisplay: false,
+ addDisplay: false,
+ width: 100,
},
// {
// label: "报名状态",
@@ -494,11 +565,8 @@
this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" + this.userInfo.dept_id
}
-
-
-
-
-
+ this.questionBankSearch['cancel'] = 1;
+ this.questionBankSearch['auditStatus'] = 0;
},
mounted() {
var flag = false,
@@ -540,7 +608,7 @@
});
},
questionBankOnLoad (page, params = {}) {
- // debugger;
+ params = this.questionBankSearch;
params['examId'] = this.$route.query.id;
this.questionBankLoading = false;
getdata(page.currentPage, page.pageSize, Object.assign(params, this.questionBankQuery)).then(res => {
@@ -574,6 +642,54 @@
questionBankSizeChange (pageSize) {
this.questionBankPage.pageSize = pageSize;
},
+ //取消报名
+ revoke(row, done, loading) {
+ this.$confirm("确定取消报名?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ row.cancel = 2;
+ cancelTrainAudit(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "取消报名成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ });
+ },
+ //审核通过
+ auditSucess(row, done, loading) {
+ this.$confirm("确定审核通过?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ row.cancel = 1;
+ auditSucess(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ });
+ },
// 新增
questionBankRowSave (row, done, loading) {
--
Gitblit v1.9.3