From e622697d7cbd36300a1a60dd678aa0689aa9821a Mon Sep 17 00:00:00 2001 From: yueli Date: Wed, 9 Sep 2026 10:53:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(borrow):=20=E5=80=9F=E5=BA=93=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=89=8D=E7=AB=AF=E5=BF=85=E5=A1=AB=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E4=B8=8E=E6=98=9F=E6=A0=87=E2=80=94=E2=80=94=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E3=80=81=E9=A2=84=E8=AE=A1=E5=BD=92=E8=BF=98?= =?UTF-8?q?=E6=97=A5=E6=9C=9F(=E9=95=BF=E6=9C=9F=E5=80=9F=E7=94=A8?= =?UTF-8?q?=E9=99=A4=E5=A4=96)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 提交前拦截:申请原因为空或(未勾长期借用且无归还日期)提示并 return - 表单加必填星标:申请原因恒必填;预计归还日期仅在非长期借用时 required --- inventory-web/src/views/borrow/apply/index.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/inventory-web/src/views/borrow/apply/index.vue b/inventory-web/src/views/borrow/apply/index.vue index ca90866..dc95fc2 100644 --- a/inventory-web/src/views/borrow/apply/index.vue +++ b/inventory-web/src/views/borrow/apply/index.vue @@ -412,7 +412,7 @@ /> - + - + @@ -1102,6 +1102,17 @@ const buildRemarkWithShortage = (baseRemark: string): string => { } const confirmSubmitRequest = async () => { + // ★ 借库申请必填拦截:申请原因;预计归还日期(除非长期借用/不限归还) + const _reasonText = requestRemark.value.trim() + if (!_reasonText) { + ElMessage.warning('请填写借库申请原因') + return + } + if (!requestIndefinite.value && !requestExpectedReturn.value) { + ElMessage.warning('请填写预计归还日期,或勾选“长期借用(不限归还)”') + return + } + requestSubmitting.value = true try { const items = validSelectedItems.value.map((item: any) => ({