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 @@ - + + +