diff --git a/src/views/CA/SealApply.vue b/src/views/CA/SealApply.vue index 1f2f804..d9df108 100644 --- a/src/views/CA/SealApply.vue +++ b/src/views/CA/SealApply.vue @@ -11,6 +11,9 @@ 法人电子印章 + + + @@ -23,18 +26,32 @@ - +
+
+ +
+
+ 模板下载 +
+
- 查询 - 提交 + 提交 历史提交记录 @@ -58,7 +75,7 @@ @@ -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", diff --git a/src/views/CA/UnitApply.vue b/src/views/CA/UnitApply.vue index 5bc574d..17144ac 100644 --- a/src/views/CA/UnitApply.vue +++ b/src/views/CA/UnitApply.vue @@ -17,6 +17,13 @@ +
+

+ 请将书面申请材料邮寄至 浙江省 杭州市 西湖区 莫干山路18号 蓝天商务中心 + 9楼 张涛 15868462840 +

+

快递费用由申请单位自理

+
@@ -179,6 +186,52 @@
+ + + + 添加电子印章 + + + @@ -302,12 +355,14 @@ export default { loaPicId: null, idCardFrontPicId: null, idCardBackPicId: null, - businessLicensePicId: null + businessLicensePicId: null, + sealApplyList: [] }); const loaPicFileList = ref([]); const idCardFrontPicFileList = ref([]); const idCardBackPicFileList = ref([]); const businessLicenseFileList = ref([]); + const sealApplyFileList = ref([]); const rulesRef = reactive({ operatorId: [ { required: true, message: "请输入18位身份证号码", trigger: "blur" }, @@ -390,6 +445,14 @@ export default { type: "number" } ], + sealApplyPicId: [ + { + required: true, + message: "请上电子印章申请表", + trigger: "change", + type: "number" + } + ], phoneCode: [ { required: true, message: "请输入短信验证码", trigger: "change" } ] @@ -443,7 +506,8 @@ export default { "loaPicId", "idCardFrontPicId", "idCardBackPicId", - "businessLicensePicId" + "businessLicensePicId", + "sealApplyPicId" ]); const resp = await post("/api2/CA/modifyUnitApply", toRaw(modelRef)); if (resp.errorCode != 0) { @@ -490,6 +554,24 @@ export default { } return isValid && isLt2M; }; + const handleChange2 = (info, v) => { + console.log(info.file.status, info.file, info.fileList); + // if (info.file.status !== "uploading") { + // } + if (info.file.status === "done") { + message.success(`${info.file.name} 文件上传成功`); + v.sealApplyFileId = info.file.response.id; + if (info.fileList.length > 1) { + info.fileList.shift(); + } + } else if (info.file.status === "error") { + message.error(`${info.file.name} 文件上传失败`); + info.fileList.pop(); + } + if (info.file.status === "removed") { + v.sealApplyFileId = null; + } + }; const handleChange = (info, name) => { console.log(info.file.status, info.file, info.fileList); // if (info.file.status !== "uploading") { @@ -596,6 +678,13 @@ export default { url: unitApply.businessLicensePicPath } ]; + sealApplyFileList.value = [ + { + uid: "-1", + status: "done", + url: unitApply.sealApplyPicPath + } + ]; }; const modifyOrder = unitApply => { initPage(unitApply); @@ -644,12 +733,20 @@ export default { const toggleDrawer = () => { showDrawer.value = !showDrawer.value; }; + const addSealApply = () => { + modelRef.sealApplyList.push({ + sealName: "", + sealApplyFileId: 0 + }); + }; + return { modelRef, loaPicFileList, idCardFrontPicFileList, idCardBackPicFileList, businessLicenseFileList, + sealApplyFileList, rulesRef, validate, validateInfos, @@ -658,6 +755,7 @@ export default { resetFields, beforeUpload, handleChange, + handleChange2, areaOptions, loadAreaOptions, spining, @@ -675,6 +773,7 @@ export default { modifyOrder, router: useRouter(), progressingId, + addSealApply, status: { 0: { color: "orange",