From d25c285ad695609ff973efc4ddeb1bab86260a6c Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sat, 29 Jun 2024 17:13:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E5=AE=8C=E5=96=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project-management/filing/index.vue | 2 +- .../project-management/implementation/check.vue | 16 ++++++++++++++-- .../project-management/implementation/upload.vue | 8 +++++++- .../implementation/uploadFee.vue | 8 +++++++- .../project-management/initiation/apply.vue | 8 +++++++- src/views/special-fund/add.vue | 8 +++++++- 6 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/views/project-management/filing/index.vue b/src/views/project-management/filing/index.vue index b8c158d..dcae27b 100644 --- a/src/views/project-management/filing/index.vue +++ b/src/views/project-management/filing/index.vue @@ -94,7 +94,7 @@ const searchConfig = reactive([ component: 'el-date-picker', props: { clearable: true, - type: 'datetimerange', + type: 'daterange', startPlaceholder: '开始日期', endPlaceholder: '结束日期', valueFormat: 'YYYY-MM-DD HH:mm:ss', diff --git a/src/views/project-management/implementation/check.vue b/src/views/project-management/implementation/check.vue index 5200207..1d10b04 100644 --- a/src/views/project-management/implementation/check.vue +++ b/src/views/project-management/implementation/check.vue @@ -88,7 +88,13 @@ const getFileParam = (item) => { const handleSubmit = (instance) => { if (!instance) return instance.validate(async (valid) => { - if (!valid) return + if (!valid) { + return ElNotification({ + title: '提示', + message: '请完善数据,再提交!', + type: 'error' + }) + } let files = [] otherFileList.value.forEach(item => { files.push(getFileParam(item)) @@ -132,7 +138,13 @@ const handleSubmit = (instance) => { const handleResubmit = (instance) => { if (!instance) return instance.validate(async (valid) => { - if (!valid) return + if (!valid) { + return ElNotification({ + title: '提示', + message: '请完善数据,再提交!', + type: 'error' + }) + } let otherFiles = [] if (name.value === 'Implementation/edit') { attachment.value.allFileList?.forEach(item => { diff --git a/src/views/project-management/implementation/upload.vue b/src/views/project-management/implementation/upload.vue index fb9d3f0..10f3212 100644 --- a/src/views/project-management/implementation/upload.vue +++ b/src/views/project-management/implementation/upload.vue @@ -168,7 +168,13 @@ const getFile = (val) => { const handleSubmit = async (instance) => { if (!instance) return instance.validate(async (valid) => { - if (!valid) return + if (!valid) { + return ElNotification({ + title: '提示', + message: '请完善数据,再提交!', + type: 'error' + }) + } let params = { fileList: fileList.value, projectId: route.query.id, diff --git a/src/views/project-management/implementation/uploadFee.vue b/src/views/project-management/implementation/uploadFee.vue index 656e936..fe278f8 100644 --- a/src/views/project-management/implementation/uploadFee.vue +++ b/src/views/project-management/implementation/uploadFee.vue @@ -158,7 +158,13 @@ const handleDelete = (index) => { const handleSubmit = (instance) => { if (!instance) return instance.validate(async (valid) => { - if (!valid) return + if (!valid) { + return ElNotification({ + title: '提示', + message: '请完善数据,再提交!', + type: 'error' + }) + } instance.clearValidate() tableForm.tableData.forEach(item=>{ item.projectName=projectName.value diff --git a/src/views/project-management/initiation/apply.vue b/src/views/project-management/initiation/apply.vue index 5ffb219..600263c 100644 --- a/src/views/project-management/initiation/apply.vue +++ b/src/views/project-management/initiation/apply.vue @@ -137,7 +137,13 @@ const getFileParam = (item) => { const handleSubmit = (instance) => { if (!instance) return instance.validate(async (valid) => { - if (!valid) return + if (!valid) { + return ElNotification({ + title: '提示', + message: '请完善数据,再提交!', + type: 'error' + }) + } let files = [] otherFileList.value.forEach(item => { files.push(getFileParam(item)) diff --git a/src/views/special-fund/add.vue b/src/views/special-fund/add.vue index bac3267..ed41db1 100644 --- a/src/views/special-fund/add.vue +++ b/src/views/special-fund/add.vue @@ -187,7 +187,13 @@ const submitParam = (item) => { const handleSubmit = async (instance) => { if (!instance) return instance.validate(async (valid) => { - if (!valid) return + if (!valid) { + return ElNotification({ + title: '提示', + message: '请完善数据,再提交!', + type: 'error' + }) + } const {msg, code} = await addFund(submitParam(formData.value)) ElNotification({ title: '提示',