From 528c412c8872cdbfb4e82dd5616e15e48a8caee4 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 13 Sep 2021 19:11:46 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/api/exam/examPayment.js | 52 ++++++
src/views/exam/examPayment.vue | 394 +++++++++++++++++++++++++++++++++++++++++++++++++
src/views/system/user.vue | 1
src/views/zc/zc.vue | 1
src/views/dispatch/dispatchChildoperable.vue | 17 -
5 files changed, 452 insertions(+), 13 deletions(-)
diff --git a/src/api/exam/examPayment.js b/src/api/exam/examPayment.js
new file mode 100644
index 0000000..3c41947
--- /dev/null
+++ b/src/api/exam/examPayment.js
@@ -0,0 +1,52 @@
+import request from '@/router/axios';
+
+
+export const getExamPaymentList = (current, size, params) => {
+ return request({
+ url: '/api/examPayment/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size
+ }
+ })
+}
+
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/examPayment/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/examPayment/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/examPayment/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+
+export const getExamPayment = (id) => {
+ return request({
+ url: '/api/examPayment/detail',
+ method: 'get',
+ params: {
+ id,
+ }
+ })
+}
\ No newline at end of file
diff --git a/src/views/dispatch/dispatchChildoperable.vue b/src/views/dispatch/dispatchChildoperable.vue
index 175a1aa..5082b01 100644
--- a/src/views/dispatch/dispatchChildoperable.vue
+++ b/src/views/dispatch/dispatchChildoperable.vue
@@ -434,19 +434,10 @@
this.onLoad1(this.page1, this.query1);
},
- // beforeOpen(done, type) {
- // var that = this;
- // if (["add", "edit", "view"].includes(type)) {
- // if (this.userInfo.role_name == "保安公司管理员") {
- // getListByDeptId(that.userInfo.dept_id).then((res) => {
- // const userColumn = that.findObject(this.option1.column, "userIds");
- // userColumn.dicData = res.data.data;
- // });
- // }
- // }
- // this.initFlag = true;
- // done();
- // },
+ beforeOpen(done, type) {
+ this.initFlag = true;
+ done();
+ },
getStartTime() {
if (
diff --git a/src/views/exam/examPayment.vue b/src/views/exam/examPayment.vue
new file mode 100644
index 0000000..6ea508b
--- /dev/null
+++ b/src/views/exam/examPayment.vue
@@ -0,0 +1,394 @@
+/*
+ * @Author: Morpheus
+ * @Date: 2021-07-05 16:31:54
+ * @Last Modified by: Morpheus
+ * @Last Modified time: 2021-07-18 19:44:47
+ * menu-name 考试缴费管理
+ */
+<template>
+ <el-row class="morpheus-box">
+ <el-col :span="24" class="recruitmentManagement">
+ <el-card>
+ <div class="exam-card-body">
+ <avue-crud
+ v-model="obj"
+ class="company-box"
+ :option="questionBankOption"
+ :permission="permissionList"
+ :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-del="rowDel"
+ @row-update="questionBankRowUpdate"
+ >
+ <template slot-scope="{ row }" slot="sex">
+ <el-tag v-if="row.sex == 1">男</el-tag>
+ <el-tag v-if="row.sex == 2">女</el-tag>
+ </template>
+
+ <!-- 自定义按钮 -->
+ <template slot="menuLeft">
+ <!-- <el-button type="danger"
+ size="mini"
+ icon="el-icon-delete"
+ plain
+ @click="handleDelete">新增
+ </el-button> -->
+ <!-- <el-button type="danger"
+ size="mini"
+ icon="el-icon-delete"
+ plain
+ @click="handleDelete">删除
+ </el-button> -->
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ v-if="permission.performance_import"
+ @click="handleImport"
+ >缴费凭证批量上传
+ </el-button>
+ </template>
+
+ <template slot-scope="{ row }" slot="menu">
+ <el-button
+ style="display:none"
+ type="text"
+ size="mini"
+ icon="el-icon-collection"
+ class="start-kaoshi"
+ v-if="permission.performance_print"
+ :disabled="row.qualified==1"
+ @click="securityPrint(row)"
+ >保安证打印
+ </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"
+ >
+ </avue-form>
+ </el-dialog>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
+</template>
+
+<script>
+import { getExamPaymentList, update,remove } from "@/api/exam/examPayment";
+import { mapGetters } from "vuex";
+import { getRoleDetail } from "@/api/system/role";
+
+export default {
+ data() {
+ return {
+ obj: {
+ name: "张三",
+ },
+ excelBox: false,
+ questionBankOption: {
+ // 操作栏多余按钮去除
+ delBtn: true,
+ editBtn: false,
+ addBtn: false,
+ selection: false,
+ viewBtn: true,
+ // title: '成绩',
+ align: "center",
+ height: "auto",
+ calcHeight: 80,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 4,
+ index: true,
+ indexLabel: "序号",
+ dialogClickModal: false,
+ // 操作栏宽度
+ menu: true,
+ menuWidth: 186,
+ labelWidth: 120,
+
+ column: [
+ // {
+ // label: "缴费类型",
+ // prop: "type",
+ // dicData:[
+ // {
+ // label:"公司缴费",
+ // value: 1
+ // },
+ // {
+ // label:"个人缴费",
+ // value: 2
+ // }
+ // ],
+ // searchSpan: 4,
+ // search: true,
+ // type: "select",
+ // },
+ {
+ label: "缴费人",
+ prop: "realName",
+ search:true,
+ searchSpan:4,
+ },
+ {
+ label: "身份证号",
+ prop: "idCardNo",
+ search:true,
+ searchSpan:4,
+ },
+ {
+ label: "性别",
+ prop: "sex",
+ slot:true,
+ dicData: [
+ {
+ label:"男",
+ value:1
+ },
+ {
+ label:"女",
+ value:2
+ }
+ ],
+ },
+ {
+ label: "联系方式",
+ prop: "phone",
+ },
+ {
+ label: "所在单位",
+ prop: "deptName",
+ search:true,
+ searchSpan:6,
+ },
+ // {
+ // label: "缴费状态",
+ // prop: "paymentStatus",
+ // searchSpan: 4,
+ // search: true,
+ // dicData: [
+ // {
+ // label:"已缴费",
+ // value:1
+ // },
+ // {
+ // label:"未缴费",
+ // value:2
+ // },
+ // {
+ // label:"部分缴费",
+ // value:3
+ // },
+ // ],
+ // type: "select",
+ // },
+ {
+ label: "缴费凭证",
+ prop: "certificateUrl",
+ overHidden: true,
+ type: "upload",
+ listType: "picture-img",
+ },
+ {
+ label: "缴费时间",
+ prop: "paymentTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ labelWidth: 120,
+ searchSpan: 4,
+ // search: true,
+ overHidden: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入时间",
+ trigger: "click",
+ },
+ ],
+ },
+ ],
+ },
+ questionBankSearch: {},
+ questionBankLoading: true,
+ questionBankData: [],
+ questionBankPage: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 16,
+ },
+ questionBankQuery: {},
+ questionBankSelectionList: [],
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "模板上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "模板上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 zip 压缩文件",
+ action: "/api/blade-resource/oss/endpoint/put-file-exam-payment-zip",
+ }
+ ],
+ },
+ };
+ },
+ computed:{
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(null, false),
+ viewBtn: this.vaildData(this.permission.notice_view, false),
+ delBtn: this.vaildData(this.permission.notice_delete, false),
+ editBtn: this.vaildData(this.permission.performance__edit, false),
+ excelBtn: this.vaildData(this.permission.performance_export, false),
+ };
+ },
+ },
+ created() {},
+ mounted() {},
+ methods: {
+ questionBankOnLoad(page, params = {}) {
+ //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
+ var that = this;
+ //获取当前登录人员的角色信息
+ var roleIds = this.userInfo.role_id.split(",");
+ roleIds.forEach((roleId) => {
+ getRoleDetail(roleId).then((res) => {
+ var roleAlias = res.data.data.roleAlias;
+ if (
+ roleAlias == "保安公司管理员" ||
+ roleAlias == "保安" ||
+ roleAlias == "未持证保安"
+ ) {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ that.questionBankLoading = false;
+ params["examType"] = 1;
+ getExamPaymentList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ that.questionBankPage.total = data.total;
+ that.questionBankData = data.records;
+ that.questionBankLoading = false;
+ that.questionBankSelectionClear();
+ });
+ })
+ });
+
+ },
+
+ rowDel(row) {
+ this.$confirm("确定删除当前缴费数据?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ questionBankSelectionClear() {
+ this.questionBankSelectionList = [];
+ this.$refs.questionBankCrud.toggleSelection();
+ },
+ questionBankSelectionChange(list) {
+ this.questionBankSelectionList = list;
+ },
+ questionBankSearchChange(params, done) {
+ this.questionBankQuery = params;
+ this.questionBankPage.currentPage = 1;
+ this.questionBankOnLoad(this.questionBankPage, params);
+ done();
+ },
+ questionBankSearchReset() {
+ this.questionBankQuery = {};
+ this.questionBankOnLoad(this.questionBankPage);
+ },
+ questionBankCurrentChange(currentPage) {
+ this.questionBankPage.currentPage = currentPage;
+ },
+ questionBankSizeChange(pageSize) {
+ this.questionBankPage.pageSize = pageSize;
+ },
+
+ questionBankRowUpdate(row, index, done, loading) {
+ // debugger;
+ update({
+ theoryGrade: row.theoryGrade,
+ learnGrade: row.learnGrade,
+ examId: row.examId,
+ id: row.id,
+ }).then(
+ () => {
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ handleImport() {
+ this.excelBox = true;
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox = false;
+ this.refreshChange();
+ done();
+ },
+ refreshChange() {
+ this.questionBankOnLoad(this.page, this.query);
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+</style>
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 1a726da..a94be80 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -985,6 +985,7 @@
},
onLoad(page, params = {}) {
this.loading = true;
+ params['status'] = 1;
getList(
page.currentPage,
page.pageSize,
diff --git a/src/views/zc/zc.vue b/src/views/zc/zc.vue
index c95d4b0..1ff5804 100644
--- a/src/views/zc/zc.vue
+++ b/src/views/zc/zc.vue
@@ -101,6 +101,7 @@
{
label: "身份证号",
disabled:true,
+ search: true,
display: false,
prop: "cardid",
},
--
Gitblit v1.9.3