diff --git a/src/views/contract/contractDetil.vue b/src/views/contract/contractDetil.vue index d8dd0b9..c2f3af0 100644 --- a/src/views/contract/contractDetil.vue +++ b/src/views/contract/contractDetil.vue @@ -380,16 +380,21 @@ - + {{ formData.file ? "重新上传" : "上传" @@ -403,10 +408,10 @@ >合同已上传,点击查看 - + 确定 - + { + if (e?.name?.substring(e.name.length - 4, e.name.length) != ".pdf") { + ElMessage.error("仅支持上传.pdf文件"); + return false; + } + return true; +}; + +const upload = ref(null); +const handleExceed = (files: any) => { + upload.value!.clearFiles(); + const file = files[0] as UploadRawFile; + file.uid = genFileId(); + upload.value!.handleStart(file); + upload.value!.submit(); +}; + const handleAvatarSuccess_four: UploadProps["onSuccess"] = ( response, uploadFile