diff --git a/inventory-web/src/views/stock/inbound/buy.vue b/inventory-web/src/views/stock/inbound/buy.vue index 3242b1d..b524988 100644 --- a/inventory-web/src/views/stock/inbound/buy.vue +++ b/inventory-web/src/views/stock/inbound/buy.vue @@ -1110,8 +1110,11 @@ const initColumnPermissions = () => { if (cachedData) { try { const parsedCache = JSON.parse(cachedData); - visibleColumnProps.value = parsedCache.filter((prop: string) => allowedProps.includes(prop)); - return; + const filtered = parsedCache.filter((prop: string) => allowedProps.includes(prop)); + if (filtered.length > 0) { + visibleColumnProps.value = filtered; + return; + } } catch (e) { console.error('解析列缓存失败', e); } diff --git a/inventory-web/src/views/stock/inbound/product.vue b/inventory-web/src/views/stock/inbound/product.vue index f6ed6ce..9d3710e 100644 --- a/inventory-web/src/views/stock/inbound/product.vue +++ b/inventory-web/src/views/stock/inbound/product.vue @@ -840,8 +840,11 @@ const initColumnPermissions = () => { if (cachedData) { try { const parsedCache = JSON.parse(cachedData); - visibleColumnProps.value = parsedCache.filter((prop: string) => allowedProps.includes(prop)); - return; + const filtered = parsedCache.filter((prop: string) => allowedProps.includes(prop)); + if (filtered.length > 0) { + visibleColumnProps.value = filtered; + return; + } } catch (e) { console.error('解析列缓存失败', e); } diff --git a/inventory-web/src/views/stock/inbound/semi.vue b/inventory-web/src/views/stock/inbound/semi.vue index c1722e2..f4e9316 100644 --- a/inventory-web/src/views/stock/inbound/semi.vue +++ b/inventory-web/src/views/stock/inbound/semi.vue @@ -922,8 +922,11 @@ const initColumnPermissions = () => { if (cachedData) { try { const parsedCache = JSON.parse(cachedData); - visibleColumnProps.value = parsedCache.filter((prop: string) => allowedProps.includes(prop)); - return; + const filtered = parsedCache.filter((prop: string) => allowedProps.includes(prop)); + if (filtered.length > 0) { + visibleColumnProps.value = filtered; + return; + } } catch (e) { console.error('解析列缓存失败', e); }