From 448b19cf29a38ef532a603358a23a6b765f95869 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 11 Nov 2021 16:00:44 +0800
Subject: [PATCH] 新增证书制证申请

---
 src/views/securityGuard/securityGuard.vue |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index cb9f2c5..bad5cde 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -66,6 +66,15 @@
               @click="handleSecurityApply"
               >上岗证制证申请
             </el-button>
+            <el-button
+              type="primary"
+              size="small"
+              plain
+              v-if="permission.securityGuard_security_apply"
+              icon="el-icon-collection-tag"
+              @click="handleSecurityPaperApply"
+              >证书制证申请
+            </el-button>
 
             <el-button
               type="danger"
@@ -1575,6 +1584,45 @@
           const data = {
             ids: str,
             createUser: this.userInfo.user_id,
+            type:1
+          };
+          return securityApply(data);
+        })
+        .then(() => {
+          // this.$refs.crud.toggleSelection();
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+        });
+    },
+    //证书制证申请
+    handleSecurityPaperApply() {
+      if (this.choiceList.length === 0) {
+        this.$message.warning("请勾选至少一位持证保安员");
+        return;
+      }
+      this.$confirm(
+        "共选择制证申请人数" + this.choiceList.length + "人,确定申请制证?",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          let cho = this.choiceList;
+          let str = "";
+          for (let k in cho) {
+            str += cho[k].id;
+            if (k != cho.length - 1) {
+              str += ",";
+            }
+          }
+          const data = {
+            ids: str,
+            createUser: this.userInfo.user_id,
+            type:2
           };
           return securityApply(data);
         })

--
Gitblit v1.9.3