From cd81b1488cad912dc1e6f20a8e181a4e3a8c34d1 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 6 Aug 2024 14:49:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=A4=B1=E5=8E=BB=E7=84=A6=E7=82=B9=E4=BB=8E=E5=BA=93?= =?UTF-8?q?=E4=BD=8D=E4=BB=A3=E7=A0=81=E6=97=A0=E6=B3=95=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/business/inputBlur.ts | 34 ++++++++++--------- .../purchasereturnRequestMain.data.ts | 1 + 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/api/wms/business/inputBlur.ts b/src/api/wms/business/inputBlur.ts index 9fb2ca26e..0bd0e3d38 100644 --- a/src/api/wms/business/inputBlur.ts +++ b/src/api/wms/business/inputBlur.ts @@ -158,24 +158,26 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f } } } - // 判断改包装号是否已经添加 - const seen = new Set() - const repeatCode = new Set() - const arr = tableData.map((item) => item[headerItem.field]?.trim()) - arr.forEach((item) => { - if (item) { - if (seen.has(item)) { - repeatCode.add(item) - } else { - seen.add(item) + // 判断代码是否存在 + if (!headerItem?.tableForm.isRepeat) { + const seen = new Set() + const repeatCode = new Set() + const arr = tableData.map((item) => item[headerItem.field]?.trim()) + arr.forEach((item) => { + if (item) { + if (seen.has(item)) { + repeatCode.add(item) + } else { + seen.add(item) + } } + }) + const arr1 = Array.from(repeatCode) + if (arr1.length > 0) { + message.warning(`${arr1.join(',')}${t('ts.已经存在')}`) + row[headerItem.field] = '' + return } - }) - const arr1 = Array.from(repeatCode) - if (arr1.length > 0) { - message.warning(`${arr1.join(',')}${t('ts.已经存在')}`) - row[headerItem.field] = '' - return } if (filters.length > 0) { params.value.isSearch = true diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index eba4510f2..13199b0e4 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -1035,6 +1035,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive searchTitle: '库位代码信息', searchAllSchemas: Location.allSchemas, searchPage: LocationApi.getLocationListByAreaAndBusinesstype, + isRepeat:true, searchCondition: [{ key: 'businessType', value: 'PurchaseReturn',