From e6dafc77757ed427183880d63dece354854228e2 Mon Sep 17 00:00:00 2001 From: DXC Date: Wed, 18 Mar 2026 17:25:14 +0800 Subject: [PATCH] feat: add global toast message on form validation failure for inbound operations --- inventory-web/src/views/stock/inbound/buy.vue | 2 ++ inventory-web/src/views/stock/inbound/product.vue | 2 ++ inventory-web/src/views/stock/inbound/semi.vue | 2 ++ 3 files changed, 6 insertions(+) diff --git a/inventory-web/src/views/stock/inbound/buy.vue b/inventory-web/src/views/stock/inbound/buy.vue index 3db5725..1c80add 100644 --- a/inventory-web/src/views/stock/inbound/buy.vue +++ b/inventory-web/src/views/stock/inbound/buy.vue @@ -1457,6 +1457,8 @@ const submitForm = async () => { } catch (e: any) { ElMessage.error(e.msg || '操作失败') } finally { submitting.value = false } + } else { + ElMessage.warning('入库校验未通过,请检查必填项(如:库位)是否已填写完整!') } }) } diff --git a/inventory-web/src/views/stock/inbound/product.vue b/inventory-web/src/views/stock/inbound/product.vue index 9fd9972..ef1880c 100644 --- a/inventory-web/src/views/stock/inbound/product.vue +++ b/inventory-web/src/views/stock/inbound/product.vue @@ -1265,6 +1265,8 @@ const submitForm = async () => { } catch(e:any) { ElMessage.error(e.msg || '操作失败') } finally { submitting.value = false } + } else { + ElMessage.warning('入库校验未通过,请检查必填项(如:库位)是否已填写完整!') } }) } diff --git a/inventory-web/src/views/stock/inbound/semi.vue b/inventory-web/src/views/stock/inbound/semi.vue index b914e7c..3863e4e 100644 --- a/inventory-web/src/views/stock/inbound/semi.vue +++ b/inventory-web/src/views/stock/inbound/semi.vue @@ -1391,6 +1391,8 @@ const submitForm = async () => { } catch (e: any) { ElMessage.error(e.msg || '操作失败') } finally { submitting.value = false } + } else { + ElMessage.warning('入库校验未通过,请检查必填项(如:库位)是否已填写完整!') } }) }