This commit is contained in:
2021-05-26 09:48:18 +08:00
parent 76839bc258
commit 5c89ca9e7d
2 changed files with 159 additions and 41 deletions

View File

@@ -11,6 +11,9 @@
<a-radio value="1" :disabled="disableEdit">法人电子印章</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="未申请证书" v-if="formModel.sealType == '0'">
<a-switch checked-children="" v-model:checked="formModel.noCert" />
</a-form-item>
<a-form-item
:label="formModel.sealType == '1' ? '统一信用代码' : '身份证号码'"
>
@@ -23,18 +26,32 @@
<a-input v-model:value="formModel.sealName" :disabled="disableEdit" />
</a-form-item>
<a-form-item label="印章申领表">
<Upload
v-model:fileId="formModel.sealImageId"
name="印章申领表"
:disabled="disableEdit"
:fileUrl="filePath"
/>
<div>
<div style="display: inline-block">
<Upload
v-model:fileId="formModel.sealImageId"
name="印章申领表"
:disabled="disableEdit"
:fileUrl="filePath"
/>
</div>
<div style="display: inline-block; vertical-align: top">
<a-button type="link"
><a
:href="
formModel.sealType == '0'
? 'http://183.136.157.18:7308/stgl/sources/202102/附件4个人电子印章启用申请表.docx'
: 'http://183.136.157.18:7308/stgl/sources/202102/附件1法人电子印章启用申请表.docx'
"
target="_blank"
><DownloadOutlined />模板下载</a
></a-button
>
</div>
</div>
</a-form-item>
<a-form-item :wrapper-col="{ span: 12, offset: 10 }">
<a-button v-if="progressingId" type="primary" @click="onSubmit"
>查询</a-button
>
<a-button v-else type="primary" @click="onSubmit">提交</a-button>
<a-button type="primary" @click="createSealApply">提交</a-button>
<a-button style="margin-left: 10px" @click="toggleDrawer"
>历史提交记录</a-button
>
@@ -58,7 +75,7 @@
<template #title>
{{ sealApply.sealName
}}<a-tag
style="margin-left:4px;"
style="margin-left: 4px"
:color="status[sealApply.status].color"
>{{ status[sealApply.status].text }}</a-tag
>
@@ -69,10 +86,11 @@
{{ sealApply.idCardNumOrTydm }}
</p>
<p>发起时间: {{ sealApply.createTime }}</p>
<p v-if="sealApply.dealReason">
不通过原因:{{ sealApply.rejectMsg }}
</p></a-card
>
<p v-if="sealApply.dealReason">不通过原因:{{ sealApply.rejectMsg }}</p>
<a-button type="primary" @click="onSubmit(sealApply.id)">
进度查询
</a-button>
</a-card>
</div>
</a-drawer>
</template>
@@ -96,7 +114,8 @@ export default {
sealType: "",
sealName: "",
idCardNumOrTydm: "",
sealImageId: 0
sealImageId: 0,
noCert: false
});
var sealApplyList = ref([]);
var progressingId = ref(0);
@@ -107,17 +126,17 @@ export default {
var resp = await get("/api2/ca/sealApplyList");
if (resp.data) {
sealApplyList.value = resp.data;
var currentApply = sealApplyList.value.find(
p => p.status == 0 || p.status == 1
);
progressingId.value = currentApply?.id || 0;
disableEdit.value = progressingId.value !== 0;
if (currentApply) {
formModel.sealType = currentApply.sealType;
formModel.sealName = currentApply.sealName;
formModel.idCardNumOrTydm = currentApply.idCardNumOrTydm;
filePath.value = currentApply.sealApplyFilePath;
}
// var currentApply = sealApplyList.value.find(
// p => p.status == 0 || p.status == 1
// );
// progressingId.value = currentApply?.id || 0;
// disableEdit.value = progressingId.value !== 0;
// if (currentApply) {
// formModel.sealType = currentApply.sealType;
// formModel.sealName = currentApply.sealName;
// formModel.idCardNumOrTydm = currentApply.idCardNumOrTydm;
// filePath.value = currentApply.sealApplyFilePath;
// }
}
});
async function createSealApply() {
@@ -139,23 +158,20 @@ export default {
async function querySealApply(id) {
var resp = await get("/api2/ca/querySealApply", { id });
if (resp.errorCode == 0) {
message.success("申请成功", useReload);
message.success(
"当前状态:" + ["待审核", "已通过", "已拒绝"][resp.data],
useReload
);
} else {
message.error(resp.errorMsg);
}
}
async function onSubmit() {
if (progressingId.value) {
var sealApply = sealApplyList.value.find(
p => p.id == progressingId.value
);
if (sealApply.status == 0) {
await sendSealApply(progressingId.value);
} else {
await querySealApply(progressingId.value);
}
async function onSubmit(id) {
var sealApply = sealApplyList.value.find(p => p.id == id);
if (sealApply.status == 0) {
await sendSealApply(id);
} else {
await createSealApply();
await querySealApply(id);
}
}
const toggleDrawer = () => {
@@ -170,6 +186,9 @@ export default {
filePath,
showDrawer,
toggleDrawer,
querySealApply,
sendSealApply,
createSealApply,
status: {
0: {
color: "orange",