|
@ -158,24 +158,26 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 判断改包装号是否已经添加
|
|
|
// 判断代码是否存在
|
|
|
const seen = new Set() |
|
|
if (!headerItem?.tableForm.isRepeat) { |
|
|
const repeatCode = new Set() |
|
|
const seen = new Set() |
|
|
const arr = tableData.map((item) => item[headerItem.field]?.trim()) |
|
|
const repeatCode = new Set() |
|
|
arr.forEach((item) => { |
|
|
const arr = tableData.map((item) => item[headerItem.field]?.trim()) |
|
|
if (item) { |
|
|
arr.forEach((item) => { |
|
|
if (seen.has(item)) { |
|
|
if (item) { |
|
|
repeatCode.add(item) |
|
|
if (seen.has(item)) { |
|
|
} else { |
|
|
repeatCode.add(item) |
|
|
seen.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) { |
|
|
if (filters.length > 0) { |
|
|
params.value.isSearch = true |
|
|
params.value.isSearch = true |
|
|