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/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index 539a42f47..b90d7a7c3 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -709,6 +709,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( value: 'in', isMainValue: false }], + isRepeat:true, verificationParams: [{ key: 'code', action: '==',