From 21c7375b7b38ebf2c8a2ca8fbf6fe9fb4f28250f Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 12 Jan 2022 10:59:40 +0800
Subject: [PATCH] 新增公司注册机公司注册审核
---
src/views/securityGuard/securityGuard.vue | 86 +++++++++++++++++++++++++------------------
1 files changed, 50 insertions(+), 36 deletions(-)
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 22eaf77..5254e69 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -443,6 +443,7 @@
import { securityApply } from "@/api/accreditationRecords/accreditationRecords";
import { getList } from "@/api/securityGuard/securityGuard";
import { getDeptLazyTree } from "@/api/system/dept";
+import { getInformationDetails } from "@/api/securityUnit/securityUnit";
import { getRoleTree, getRoleDetail } from "@/api/system/role";
import { mapGetters } from "vuex";
import website from "@/config/website";
@@ -583,8 +584,15 @@
}
if (ok) {
- //调用接口进行账户重复校验
- checkAccount(value, callback);
+ // console.log(this.nowCell,123456);
+ if(this.type==1 || this.nowCell==2){
+ //修改不校验身份证hao
+ callback();
+ }else{
+ //调用接口进行账户重复校验
+ checkAccount(value, callback);
+ }
+
} else {
callback(new Error("身份证错误"));
}
@@ -643,6 +651,7 @@
// let optionHeight = +this.windowHeight - (+heard[0].clientHeight + +usNum);
return {
sort: "",
+ type:2,
sortName: "",
nowCell: "", //空为手动,2为身份证设备读取
// 表格数据
@@ -1050,14 +1059,6 @@
},
],
},
- // {
- // label: "发证日期",
- // prop: "paperTime",
- // hide: true,
- // type: "date",
- // format: "yyyy-MM-dd",
- // valueFormat: "yyyy-MM-dd",
- // },
{
label: "保安证书照片",
prop: "email",
@@ -1076,10 +1077,6 @@
tip: "上传jpg,png格式图片,大小不超过2M",
span: 12,
},
- // {
- // label: "籍贯",
- // prop: "nativeplace",
- // },
{
label: "民族",
prop: "nation",
@@ -1907,11 +1904,18 @@
};
updatePaperTime(data);
},
- rowClickSelf(row) {
- this.$router.push({
- path: "/securityUnitChild",
- query: { fromSecunityGuardId: row },
- });
+ rowClickSelf(deptId) {
+ var data = {
+ departmentid:deptId
+ }
+ getInformationDetails(data).then((res) => {
+ var obj = res.data.data;
+ var data = JSON.stringify(obj);
+ this.$router.push({
+ path: "/securityUnitChild",
+ query: { data: data },
+ });
+ })
},
nodeClick(data) {
this.treeDeptId = data.id;
@@ -2524,6 +2528,12 @@
var that = this;
// console.log(type, 123);
this.beginSFZ();
+ if (["edit"].includes(type)) {
+ this.type = 1;
+ }
+ if (["add"].includes(type)) {
+ this.type = 2;
+ }
if (["edit", "view"].includes(type)) {
getUser(this.form.id).then((res) => {
this.form = res.data.data;
@@ -2779,25 +2789,29 @@
//照片上传拦截
uploadBefore(file, done, loading, column) {
//如果你想修改file文件,由于上传的file是只读文件,必须复制新的file才可以修改名字,完后赋值到done函数里,如果不修改的话直接写done()即可
- if (file.type.indexOf("image/") == -1) {
- MessageBox.alert(
- "上传图片格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
- );
- loading();
- return false;
- }
- let data = window.URL.createObjectURL(new Blob([file]));
- this.filename = file;
- this.option.img = data;
- //判断文件大小
- const isLt1M = file.size >= 30 * 1024 && file.size <= 500 * 1024;
- if (!isLt1M) {
- MessageBox.alert("上传图片大小必须大于30KB,且小于500KB!");
- loading();
- return false;
+ //判断角色
+ if (this.userInfo.role_name != "administrator") {
+ if (file.type.indexOf("image/") == -1) {
+ MessageBox.alert(
+ "上传图片格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
+ );
+ loading();
+ return false;
+ }
+ let data = window.URL.createObjectURL(new Blob([file]));
+ this.filename = file;
+ this.option.img = data;
+ //判断文件大小
+ const isLt1M = file.size >= 30 * 1024 && file.size <= 500 * 1024;
+ if (!isLt1M) {
+ MessageBox.alert("上传图片大小必须大于30KB,且小于500KB!");
+ loading();
+ return false;
+ }
+ done();
+ return isLt1M;
}
done();
- return isLt1M;
},
},
};
--
Gitblit v1.9.3