From 8aaf45468e81e0337d4ef02b027790dc6949f57a Mon Sep 17 00:00:00 2001 From: DXC Date: Fri, 6 Mar 2026 15:00:04 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=E6=A0=91=E5=B1=82=E7=BA=A7=E9=A2=9C=E8=89=B2=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=85=A5=E5=BA=93=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E9=80=89=E6=8B=A9=E4=B8=BA=E6=A0=91=E5=BD=A2?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory-web/src/views/dashboard/index.vue | 26 ++++++++----------- inventory-web/src/views/stock/inbound/buy.vue | 14 +++++++--- .../src/views/stock/inbound/product.vue | 14 +++++++--- .../src/views/stock/inbound/semi.vue | 14 +++++++--- 4 files changed, 41 insertions(+), 27 deletions(-) diff --git a/inventory-web/src/views/dashboard/index.vue b/inventory-web/src/views/dashboard/index.vue index 76f908e..a8aa6a9 100644 --- a/inventory-web/src/views/dashboard/index.vue +++ b/inventory-web/src/views/dashboard/index.vue @@ -85,7 +85,7 @@ {{ node.label }} { } // ==================== 库位管理相关 ==================== -// 根据层级返回按钮颜色类型 -const getLevelButtonType = (level: number, action: string) => { - // 层级颜色映射 - const levelColors: Record> = { - 0: { add: 'primary', edit: 'info', delete: 'danger' }, // 顶级: 蓝/灰/红 - 1: { add: 'success', edit: 'warning', delete: 'danger' }, // 二级: 绿/橙/红 - 2: { add: 'warning', edit: 'info', delete: 'danger' }, // 三级: 橙/灰/红 +// 根据层级返回"新增下级"按钮颜色 +// 第1层(顶级)=primary蓝色, 第2层=success绿色, 第3层=warning橙色, 第4层及以上=info灰色 +const getAddBtnType = (level: number) => { + const levelTypes: Record = { + 0: 'primary', // 第1层(顶级) + 1: 'success', // 第2层 + 2: 'warning', // 第3层 } - // 4级及以上统一使用危险色 - if (level >= 3) { - return 'danger' - } - return levelColors[level]?.[action] || 'primary' + return levelTypes[level] || 'info' // 第4层及以上 } const warehouseDialogVisible = ref(false) diff --git a/inventory-web/src/views/stock/inbound/buy.vue b/inventory-web/src/views/stock/inbound/buy.vue index e0af247..cd24a42 100644 --- a/inventory-web/src/views/stock/inbound/buy.vue +++ b/inventory-web/src/views/stock/inbound/buy.vue @@ -327,15 +327,21 @@ - + check-strictly + :render-after-expand="false" + > + + diff --git a/inventory-web/src/views/stock/inbound/product.vue b/inventory-web/src/views/stock/inbound/product.vue index f05834c..807d3e7 100644 --- a/inventory-web/src/views/stock/inbound/product.vue +++ b/inventory-web/src/views/stock/inbound/product.vue @@ -287,15 +287,21 @@ - + check-strictly + :render-after-expand="false" + > + + diff --git a/inventory-web/src/views/stock/inbound/semi.vue b/inventory-web/src/views/stock/inbound/semi.vue index 762648f..2a50630 100644 --- a/inventory-web/src/views/stock/inbound/semi.vue +++ b/inventory-web/src/views/stock/inbound/semi.vue @@ -346,15 +346,21 @@ - + check-strictly + :render-after-expand="false" + > + +