From 5cc33e4ef6be37defcb277b9b08b728545df9dd5 Mon Sep 17 00:00:00 2001
From: yangzifeng <2547435354@qq.com>
Date: Thu, 5 Feb 2026 17:04:00 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B7=BB=E5=8A=A0=E8=87=B3?=
=?UTF-8?q?=E5=87=BA=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/wisdom/outbound/index.vue | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/views/wisdom/outbound/index.vue b/src/views/wisdom/outbound/index.vue
index c24b2c3..58171e0 100644
--- a/src/views/wisdom/outbound/index.vue
+++ b/src/views/wisdom/outbound/index.vue
@@ -731,8 +731,8 @@
-
+
@@ -1151,7 +1151,7 @@ const outQueryParams = ref({
cangku: "",
gysMc: "",
pageNum: 1,
- pageSize: 50,
+ pageSize: 200,
remark: "",
});
const outTotal = ref(0);
@@ -1204,11 +1204,22 @@ function addOutBoundData() {
return;
}
let data = outBoundData.value.concat(checkOutList.value);
- const map = new Map();
- // 遍历数组,Map的键为id值,值为数组元素,自动覆盖重复键
- data.forEach(item => map.set(item.id, item));
- // 把Map的值转为数组(保留最后一次出现的重复项)
- outBoundData.value = Array.from(map.values());
+ let arr = []
+ let spaNoTotal = ''
+ const idList = []; // 用于统计每个id出现的次数
+ // 第一步:遍历数组,统计id出现次数
+ data.forEach(item => {
+ if (idList.includes(item.id)) {
+ spaNoTotal += item.sapNo + ','
+ } else {
+ arr.push(item)
+ idList.push(item.id);
+ }
+ });
+ if (spaNoTotal) {
+ proxy.$modal.msgError("存在重复数据:" + spaNoTotal);
+ }
+ outBoundData.value = arr
}
// 查看所有的出库数据