From d266800487ae23e3676ad96b92d9eebe89a5e418 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Mon, 8 Jun 2026 15:31:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=8A=A5=E5=AE=A1?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E7=9A=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/edit/controlPrice.vue | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/views/report/edit/controlPrice.vue b/src/views/report/edit/controlPrice.vue index 854e82e..8538e2d 100644 --- a/src/views/report/edit/controlPrice.vue +++ b/src/views/report/edit/controlPrice.vue @@ -358,6 +358,23 @@ const saveFun = async () => { loading.value = false; return true; } + +const formatDateOnly = (value) => { + if (!value) return ''; + if (value instanceof Date) { + return timeFormat(value, 'yyyy-mm-dd'); + } + return String(value).slice(0, 10); +} + +const isInitialSubmitApplicantTimeValid = () => { + if (formData.value.project.node !== 'initial') { + return true; + } + const applicantDate = formatDateOnly(formData.value.project.applicantTime); + const today = formatDateOnly(new Date()); + return applicantDate === today; +} //保存并且恢复 const saveUpRecessed =async ()=>{ loading.value = true; @@ -382,6 +399,10 @@ const saveUpRecessed =async ()=>{ //提交数据 const submitFun = async () => { + if (!isInitialSubmitApplicantTimeValid()) { + feedback.msgError('请检查报审日期是否为今天!'); + return; + } await saveFun() dialog.value = true }