From 23695946bb52d47b8d4c53709ae065a7eeb7ff08 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Tue, 4 Jul 2023 10:24:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8D=8A=E6=88=90=E5=93=81=E7=9B=98?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../semi-finished-check-search.vue | 1 - .../semifinished/semi-finished-check.vue | 20 +++++++++++++++---- .../semifinished/struct-mater-search.vue | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/pages/modules/semifinished/semi-finished-check-search.vue b/src/pages/modules/semifinished/semi-finished-check-search.vue index c7282dc..81ab4fd 100644 --- a/src/pages/modules/semifinished/semi-finished-check-search.vue +++ b/src/pages/modules/semifinished/semi-finished-check-search.vue @@ -80,7 +80,6 @@ 物料规格 数量 重量(kg) - 盘点重量(kg) 盘点数量 是否异常 盘点状态 diff --git a/src/pages/modules/semifinished/semi-finished-check.vue b/src/pages/modules/semifinished/semi-finished-check.vue index 889711b..fbaaf9f 100644 --- a/src/pages/modules/semifinished/semi-finished-check.vue +++ b/src/pages/modules/semifinished/semi-finished-check.vue @@ -51,9 +51,9 @@ 盘点货位 物料号 物料规格 - 数量 - 单重(g) 重量(kg) + 单重(g) + 数量 载具号 @@ -63,10 +63,10 @@ {{ e.sect_name }} {{e.struct_name}} {{e.material_code}} - {{e.material_name}} + {{e.material_spec}} {{e.canuse_qty | numeric(3)}} {{ e.unit_weight | numeric(3) }} - {{ e.base_qty | numeric(3) }} + {{ e.qty | numeric(3) }} {{ e.storagevehicle_code }} @@ -102,6 +102,7 @@ export default { activated () { if (this.$store.getters.materArr.length > 0) { this.dataList = [...this.dataList, ...this.$store.getters.materArr] + this.removeRepeat(this.dataList) this.dataList.map(el => { let res = accMul(el.canuse_qty, el.unit_weight) res = accDiv(res, 1000) @@ -113,6 +114,17 @@ export default { this._checkGetBcpStor() }, methods: { + // 数组去重 + removeRepeat (arr) { + for (let i = 0; i < arr.length; i++) { + for (let j = i + 1; j < arr.length; j++) { + if (arr[i].a === arr[j].a) { + arr.splice(j, 1) + j-- + } + } + } + }, // 仓库下拉框 async _checkGetBcpStor () { let res = await checkGetBcpStor() diff --git a/src/pages/modules/semifinished/struct-mater-search.vue b/src/pages/modules/semifinished/struct-mater-search.vue index 3c1acf0..1902f04 100644 --- a/src/pages/modules/semifinished/struct-mater-search.vue +++ b/src/pages/modules/semifinished/struct-mater-search.vue @@ -31,7 +31,7 @@ 货位 物料编号 物料名称 - 数量 + 重量 单重(g) 载具号 From bfd5bcf4684f6ed05c7ca707e86cabcc06165ea5 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Tue, 4 Jul 2023 10:34:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=95=B0=E7=BB=84=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/semifinished/semi-finished-check.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/pages/modules/semifinished/semi-finished-check.vue b/src/pages/modules/semifinished/semi-finished-check.vue index fbaaf9f..5e34344 100644 --- a/src/pages/modules/semifinished/semi-finished-check.vue +++ b/src/pages/modules/semifinished/semi-finished-check.vue @@ -101,8 +101,9 @@ export default { }, activated () { if (this.$store.getters.materArr.length > 0) { - this.dataList = [...this.dataList, ...this.$store.getters.materArr] - this.removeRepeat(this.dataList) + let arr = this.$store.getters.materArr + this.removeRepeat(this.dataList, arr) + this.dataList = [...this.dataList, ...arr] this.dataList.map(el => { let res = accMul(el.canuse_qty, el.unit_weight) res = accDiv(res, 1000) @@ -115,11 +116,11 @@ export default { }, methods: { // 数组去重 - removeRepeat (arr) { - for (let i = 0; i < arr.length; i++) { - for (let j = i + 1; j < arr.length; j++) { - if (arr[i].a === arr[j].a) { - arr.splice(j, 1) + removeRepeat (arr1, arr2) { + for (let i = 0; i < arr1.length; i++) { + for (let j = 0; j < arr2.length; j++) { + if (arr1[i].struct_name === arr2[j].struct_name) { + arr2.splice(j, 1) j-- } }