This commit is contained in:
weiwei committed 2025-06-13 09:30:20 +08:00
1 parent bd0e9c3dd2
commit 658380c60d
3 files changed
+1 -56

No files matched your search

@@ -130,11 +130,6 @@ const computedSmErpUnitEntityList = computed(() => props.smErpUnitEntityList?.fi
// 包装单位下拉选择变化
const handleUnitIdChange = (unitId: string, rowIndex: number) => {
nextTick(() => {
if (!isFieldUnique(auxiliaryCodeList.value, "unit")) {
useMessage().error("包装单位重复")
}
})
;(auxiliaryCodeList.value[rowIndex] as any).unit = computedSmErpUnitEntityList.value?.find((item: rowVU) => item.id == unitId)?.unit
}
@@ -149,19 +144,6 @@ const removeSelectRowEvent = () => {
}
}
// 判断辅助条码是否重复
const isFieldUnique = (arr: any[], field: string) => {
const seen = new Set()
for (const item of arr) {
const value = item[field]
if (seen.has(value)) {
return false
}
seen.add(value)
}
return true
}
// 校验可编辑表格 成功返回 true 失败返回 false
// const editableTableValidate = async () => {
// // 全量校验
@@ -224,7 +224,7 @@ const usePackageUnitList = () => {
item.retailPrice = storePrice(item.retailPrice)
if (item.isNew) {
item.id = ""
// delete item.isNew
delete item.isNew
}
return item
})