update:企业法人电子印章申请改为必填项
This commit is contained in:
112
src/components/UnitApply/config.js
Normal file
112
src/components/UnitApply/config.js
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
import regex from "@/services/regex";
|
||||||
|
|
||||||
|
const checkSealList = async (rule, sealList) => {
|
||||||
|
if (!sealList || sealList.length == 0) {
|
||||||
|
return Promise.reject("必须上传法人电子印章申请表");
|
||||||
|
}
|
||||||
|
if (sealList.some(s => !s.sealName || !s.sealApplyFileId)) {
|
||||||
|
return Promise.reject("必须填写法人电子印章名称,并上传对应申请表");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const rules = {
|
||||||
|
operatorId: [
|
||||||
|
{ required: true, message: "请输入18位身份证号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern: regex.IdCardNo,
|
||||||
|
message: "输入正确的18位身份证号码",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
operatorName: [
|
||||||
|
{ required: true, message: "请输入经办人姓名", trigger: "blur" }
|
||||||
|
],
|
||||||
|
unitName: [{ required: true, message: "请选择企业名称", trigger: "change" }],
|
||||||
|
unitType: [{ required: true, message: "请选择企业类型", trigger: "change" }],
|
||||||
|
operatorPhone: [
|
||||||
|
{ required: true, message: "请输入你的手机号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern: regex.Phone,
|
||||||
|
message: "请输入正确的11位手机号码",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tydm: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入企业统一社会信用代码",
|
||||||
|
trigger: "blur"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: regex.Tydm,
|
||||||
|
message: "请输入正确的18位统一社会信用代码",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
address: [{ required: true, message: "请输入邮寄信息", trigger: "blur" }],
|
||||||
|
code: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择省市区信息",
|
||||||
|
type: "string",
|
||||||
|
trigger: "blur",
|
||||||
|
transform: v => v && v.join("-")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /\d+-\d+-\d+/,
|
||||||
|
message: "信息不完整",
|
||||||
|
trigger: "blur",
|
||||||
|
transform: v => v && v.join("-")
|
||||||
|
}
|
||||||
|
],
|
||||||
|
loaPicId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请上传授权承诺书照片",
|
||||||
|
trigger: "change",
|
||||||
|
type: "number"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
idCardFrontPicId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请上传身份证正面照片",
|
||||||
|
trigger: "change",
|
||||||
|
type: "number"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
idCardBackPicId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请上传身份证背面照片",
|
||||||
|
trigger: "change",
|
||||||
|
type: "number"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
businessLicensePicId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请上营业执照照片",
|
||||||
|
trigger: "change",
|
||||||
|
type: "number"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
sealApplyPicId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请上电子印章申请表",
|
||||||
|
trigger: "change",
|
||||||
|
type: "number"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
phoneCode: [
|
||||||
|
{ required: true, message: "请输入短信验证码", trigger: "change" }
|
||||||
|
],
|
||||||
|
sealApplyList: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: "change",
|
||||||
|
validator: checkSealList
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form :label-col="{ span: 9 }" :wrapper-col="{ span: 15 }">
|
<a-form :label-col="{ span: 9 }" :wrapper-col="{ span: 15 }">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="11">
|
<a-col :span="12">
|
||||||
<a-form-item label="企业名称" v-bind="validateInfos.unitName">
|
<a-form-item label="企业名称" v-bind="validateInfos.unitName">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="modelRef.unitName"
|
v-model:value="modelRef.unitName"
|
||||||
@@ -105,24 +105,42 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="11">
|
<a-col :span="12">
|
||||||
<a-form-item label="授权委托书" v-bind="validateInfos.loaPicId">
|
<div class="relative">
|
||||||
<input v-model="modelRef.loaPicId" hidden />
|
<a-form-item label="授权委托书" v-bind="validateInfos.loaPicId">
|
||||||
<a-upload
|
<input v-model="modelRef.loaPicId" hidden />
|
||||||
accept="application/pdf"
|
<a-upload
|
||||||
action="/api2/upload/uploadfile"
|
accept="application/pdf"
|
||||||
v-model:fileList="loaPicFileList"
|
action="/api2/upload/uploadfile"
|
||||||
:beforeUpload="
|
v-model:fileList="loaPicFileList"
|
||||||
(file, fileList) => beforeUpload(file, fileList, true)
|
:beforeUpload="
|
||||||
"
|
(file, fileList) => beforeUpload(file, fileList, true)
|
||||||
@change="info => handleChange(info, 'loaPicId')"
|
"
|
||||||
>
|
@change="info => handleChange(info, 'loaPicId')"
|
||||||
<a-button block :disabled="disabledUpload">
|
>
|
||||||
<UploadOutlined />
|
<a-button block :disabled="disabledUpload">
|
||||||
点击{{ modelRef.loaPicId ? "替换" : "上传" }}
|
<UploadOutlined />
|
||||||
</a-button>
|
点击{{ modelRef.loaPicId ? "替换" : "上传" }}
|
||||||
</a-upload>
|
</a-button>
|
||||||
</a-form-item>
|
</a-upload>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item class="tip">
|
||||||
|
<a-popover title="说明">
|
||||||
|
<template #content>
|
||||||
|
<p>上传的文件pdf大小不得超过2Mb</p>
|
||||||
|
</template>
|
||||||
|
<a-button type="link"
|
||||||
|
><a
|
||||||
|
href="http://183.136.157.18:7308/stgl/sources/202102/授权书模板.doc"
|
||||||
|
download="授权书模板.doc"
|
||||||
|
target="_blank"
|
||||||
|
><DownloadOutlined />模板</a
|
||||||
|
></a-button
|
||||||
|
>
|
||||||
|
</a-popover>
|
||||||
|
</a-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="身份证正面照"
|
label="身份证正面照"
|
||||||
v-bind="validateInfos.idCardFrontPicId"
|
v-bind="validateInfos.idCardFrontPicId"
|
||||||
@@ -180,22 +198,51 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="电子印章申请">
|
<div class="relative">
|
||||||
<a-button type="dashed" style="width: 100%" @click="addSealApply">
|
<a-form-item
|
||||||
<PlusOutlined />
|
label="电子印章申请"
|
||||||
添加电子印章
|
v-bind="validateInfos.sealApplyList"
|
||||||
</a-button>
|
>
|
||||||
</a-form-item>
|
<a-button
|
||||||
|
type="dashed"
|
||||||
|
style="width: 100%"
|
||||||
|
@click="addSealApply"
|
||||||
|
>
|
||||||
|
<PlusOutlined />
|
||||||
|
添加电子印章
|
||||||
|
</a-button>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item class="tip">
|
||||||
|
<a-button type="link"
|
||||||
|
><a
|
||||||
|
href="http://183.136.157.18:7308/stgl/sources/202102/附件1:法人电子印章启用申请表.docx"
|
||||||
|
download="法人电子印章启用申请表.docx"
|
||||||
|
target="_blank"
|
||||||
|
><DownloadOutlined />模板</a
|
||||||
|
></a-button
|
||||||
|
>
|
||||||
|
</a-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template
|
<template
|
||||||
v-for="(sealApply, index) in modelRef.sealApplyList"
|
v-for="(sealApply, index) in modelRef.sealApplyList"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<a-form-item :wrapper-col="{ span: 15, offset: 9 }">
|
<a-form-item
|
||||||
|
:wrapper-col="{ span: 15, offset: 9 }"
|
||||||
|
class="relative"
|
||||||
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="modelRef.sealApplyList[index].sealName"
|
v-model:value="modelRef.sealApplyList[index].sealName"
|
||||||
:disabled="disabledFeild"
|
:disabled="disabledFeild"
|
||||||
placeholder="印章名称"
|
placeholder="印章名称"
|
||||||
/>
|
/>
|
||||||
|
<MinusCircleOutlined
|
||||||
|
v-if="modelRef.sealApplyList.length > 1"
|
||||||
|
class="dynamic-delete-button"
|
||||||
|
:disabled="modelRef.sealApplyList.length === 1"
|
||||||
|
@click="removeApply(sealApply)"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :wrapper-col="{ span: 15, offset: 9 }">
|
<a-form-item :wrapper-col="{ span: 15, offset: 9 }">
|
||||||
<input
|
<input
|
||||||
@@ -223,23 +270,6 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="2">
|
|
||||||
<a-form-item>
|
|
||||||
<a-popover title="说明">
|
|
||||||
<template #content>
|
|
||||||
<p>上传的文件pdf大小不得超过2Mb</p>
|
|
||||||
</template>
|
|
||||||
<a-button type="link"
|
|
||||||
><a
|
|
||||||
href="http://183.136.157.18:7308/stgl/sources/202102/授权书模板.doc"
|
|
||||||
download="授权书模板.doc"
|
|
||||||
target="_blank"
|
|
||||||
><DownloadOutlined />模板</a
|
|
||||||
></a-button
|
|
||||||
>
|
|
||||||
</a-popover>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-form-item :wrapper-col="{ span: 12, offset: 10 }">
|
<a-form-item :wrapper-col="{ span: 12, offset: 10 }">
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
@@ -330,6 +360,23 @@
|
|||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
background-color: rgba(255, 255, 255, 0.7);
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
}
|
}
|
||||||
|
.relative {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.tip {
|
||||||
|
position: absolute;
|
||||||
|
right: -5em;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.dynamic-delete-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #999;
|
||||||
|
transition: all 0.3s;
|
||||||
|
right: -75px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
@@ -337,14 +384,15 @@ import { message, Modal } from "ant-design-vue";
|
|||||||
import {
|
import {
|
||||||
UploadOutlined,
|
UploadOutlined,
|
||||||
DownloadOutlined,
|
DownloadOutlined,
|
||||||
PlusOutlined
|
PlusOutlined,
|
||||||
|
MinusCircleOutlined
|
||||||
} from "@ant-design/icons-vue";
|
} from "@ant-design/icons-vue";
|
||||||
import { useForm } from "@ant-design-vue/use";
|
import { useForm } from "@ant-design-vue/use";
|
||||||
import { computed, onMounted, reactive, ref, toRaw, inject } from "vue";
|
import { computed, onMounted, reactive, ref, toRaw, inject } from "vue";
|
||||||
import { get, post } from "@/services/http";
|
import { get, post } from "@/services/http";
|
||||||
import regex from "@/services/regex";
|
|
||||||
import { toBit } from "@/services/util";
|
import { toBit } from "@/services/util";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
import { rules } from "@/components/UnitApply/config";
|
||||||
async function getAreaOptions(code) {
|
async function getAreaOptions(code) {
|
||||||
const res = await get("/api2/CA/AreaOptions", { code });
|
const res = await get("/api2/CA/AreaOptions", { code });
|
||||||
if (res.errorCode == 0) {
|
if (res.errorCode == 0) {
|
||||||
@@ -362,7 +410,8 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
UploadOutlined,
|
UploadOutlined,
|
||||||
DownloadOutlined,
|
DownloadOutlined,
|
||||||
PlusOutlined
|
PlusOutlined,
|
||||||
|
MinusCircleOutlined
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const modelRef = reactive({
|
const modelRef = reactive({
|
||||||
@@ -390,103 +439,7 @@ export default {
|
|||||||
const idCardBackPicFileList = ref([]);
|
const idCardBackPicFileList = ref([]);
|
||||||
const businessLicenseFileList = ref([]);
|
const businessLicenseFileList = ref([]);
|
||||||
const sealApplyFileList = ref([]);
|
const sealApplyFileList = ref([]);
|
||||||
const rulesRef = reactive({
|
const rulesRef = reactive(rules);
|
||||||
operatorId: [
|
|
||||||
{ required: true, message: "请输入18位身份证号码", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: regex.IdCardNo,
|
|
||||||
message: "输入正确的18位身份证号码",
|
|
||||||
trigger: "blur"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
operatorName: [
|
|
||||||
{ required: true, message: "请输入经办人姓名", trigger: "blur" }
|
|
||||||
],
|
|
||||||
unitName: [
|
|
||||||
{ required: true, message: "请选择企业名称", trigger: "change" }
|
|
||||||
],
|
|
||||||
unitType: [
|
|
||||||
{ required: true, message: "请选择企业类型", trigger: "change" }
|
|
||||||
],
|
|
||||||
operatorPhone: [
|
|
||||||
{ required: true, message: "请输入你的手机号码", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: regex.Phone,
|
|
||||||
message: "请输入正确的11位手机号码",
|
|
||||||
trigger: "blur"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tydm: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入企业统一社会信用代码",
|
|
||||||
trigger: "blur"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern: regex.Tydm,
|
|
||||||
message: "请输入正确的18位统一社会信用代码",
|
|
||||||
trigger: "blur"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
address: [{ required: true, message: "请输入邮寄信息", trigger: "blur" }],
|
|
||||||
code: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择省市区信息",
|
|
||||||
trigger: "blur",
|
|
||||||
transform: v => v && v.join("-")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern: /\d+-\d+-\d+/,
|
|
||||||
message: "信息不完整",
|
|
||||||
trigger: "blur",
|
|
||||||
transform: v => v && v.join("-")
|
|
||||||
}
|
|
||||||
],
|
|
||||||
loaPicId: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请上传授权承诺书照片",
|
|
||||||
trigger: "change",
|
|
||||||
type: "number"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
idCardFrontPicId: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请上传身份证正面照片",
|
|
||||||
trigger: "change",
|
|
||||||
type: "number"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
idCardBackPicId: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请上传身份证背面照片",
|
|
||||||
trigger: "change",
|
|
||||||
type: "number"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
businessLicensePicId: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请上营业执照照片",
|
|
||||||
trigger: "change",
|
|
||||||
type: "number"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
sealApplyPicId: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请上电子印章申请表",
|
|
||||||
trigger: "change",
|
|
||||||
type: "number"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
phoneCode: [
|
|
||||||
{ required: true, message: "请输入短信验证码", trigger: "change" }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
const { resetFields, validate, validateInfos } = useForm(
|
const { resetFields, validate, validateInfos } = useForm(
|
||||||
modelRef,
|
modelRef,
|
||||||
rulesRef
|
rulesRef
|
||||||
@@ -784,6 +737,12 @@ export default {
|
|||||||
sealApplyFileId: 0
|
sealApplyFileId: 0
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const removeApply = sealApply => {
|
||||||
|
let index = modelRef.sealApplyList.indexOf(sealApply);
|
||||||
|
if (index !== -1) {
|
||||||
|
modelRef.sealApplyList.splice(index, 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
modelRef,
|
modelRef,
|
||||||
@@ -854,7 +813,8 @@ export default {
|
|||||||
readonly,
|
readonly,
|
||||||
popvisible,
|
popvisible,
|
||||||
cancel,
|
cancel,
|
||||||
handleVisibleChange
|
handleVisibleChange,
|
||||||
|
removeApply
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user