From 1cd943473fbce0c59e6468446a836d3a260653f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Thu, 24 Jul 2025 10:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E6=89=AB=E7=A0=81=E6=9E=AA?= =?UTF-8?q?=E5=92=8C=E6=89=8B=E5=8A=A8=E5=BD=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- klp-ui/src/App.vue | 5 +- klp-ui/src/views/login.vue | 1 + klp-ui/src/views/wms/stockIo/index.vue | 2 +- .../src/views/wms/stockIo/panels/barcode.vue | 6 +- .../src/views/wms/stockIo/panels/detail.vue | 202 ++++++++++-------- 5 files changed, 126 insertions(+), 90 deletions(-) diff --git a/klp-ui/src/App.vue b/klp-ui/src/App.vue index 1f1fbc74..df2ff63b 100644 --- a/klp-ui/src/App.vue +++ b/klp-ui/src/App.vue @@ -13,7 +13,10 @@ export default { components: { ThemePicker }, created() { // 应用启动时全局初始化分类数据 - this.$store.dispatch('category/getCategoryList'); + if (this.$store.getters.token) { + this.$store.dispatch('category/getCategoryList'); + } + console.log(this.$store) }, metaInfo() { return { diff --git a/klp-ui/src/views/login.vue b/klp-ui/src/views/login.vue index 485542f5..c7b9a6df 100644 --- a/klp-ui/src/views/login.vue +++ b/klp-ui/src/views/login.vue @@ -141,6 +141,7 @@ export default { Cookies.remove('rememberMe'); } this.$store.dispatch("Login", this.loginForm).then(() => { + this.$store.dispatch('category/getCategoryList'); this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); }).catch(() => { this.loading = false; diff --git a/klp-ui/src/views/wms/stockIo/index.vue b/klp-ui/src/views/wms/stockIo/index.vue index 05e0379e..29060cb2 100644 --- a/klp-ui/src/views/wms/stockIo/index.vue +++ b/klp-ui/src/views/wms/stockIo/index.vue @@ -443,7 +443,7 @@ export default { const res = await listStockIoDetail({ stockIoId: row.stockIoId }); const details = res.data || res.rows || []; // 拼接条码内容 stockIoId_warehouseId_materialId_quantity - const barcodes = details.map(item => { + const barcodes = details.filter(el => el.recordType == 0).map(item => { return encodeURIComponent(`${row.stockIoId}_${item.warehouseId || ''}_${item.itemId || ''}_${item.quantity || ''}`); }); this.drawerBarcodeData = { diff --git a/klp-ui/src/views/wms/stockIo/panels/barcode.vue b/klp-ui/src/views/wms/stockIo/panels/barcode.vue index f3b1a326..c50bf942 100644 --- a/klp-ui/src/views/wms/stockIo/panels/barcode.vue +++ b/klp-ui/src/views/wms/stockIo/panels/barcode.vue @@ -39,7 +39,11 @@ - + + +