diff --git a/src/views/supermarketerp/supermarketSpu/components/auxiliary-code.vue b/src/views/supermarketerp/supermarketSpu/components/auxiliary-code.vue
index 2ff4fa9..16db13a 100644
--- a/src/views/supermarketerp/supermarketSpu/components/auxiliary-code.vue
+++ b/src/views/supermarketerp/supermarketSpu/components/auxiliary-code.vue
@@ -31,11 +31,11 @@
-
-
-
+
+
+
-
+
@@ -63,6 +63,7 @@ import { type rowVU } from "./package-unit.vue"
export interface rowVC {
id: string
unitId: string
+ unit: string
barCode: string
isNew?: boolean
}
@@ -72,6 +73,7 @@ const auxiliaryCodeList = defineModel("modelValue", {
{
id: nanoid(5),
unitId: "",
+ unit: "",
barCode: "",
},
],
@@ -100,6 +102,7 @@ const pushEvent = () => {
const newRow: rowVC = {
id: nanoid(5),
unitId: "",
+ unit: "",
barCode: "",
isNew: true,
}
@@ -125,6 +128,11 @@ watch(
// 计算辅助条码中可选择的包装单位下拉菜单
const computedSmErpUnitEntityList = computed(() => props.smErpUnitEntityList?.filter((item: rowVU) => item.unit))
+// 包装单位下拉选择变化
+const handleUnitIdChange = (unitId: string, rowIndex: number) => {
+ ;(auxiliaryCodeList.value[rowIndex] as any).unit = computedSmErpUnitEntityList.value?.find((item: rowVU) => item.id == unitId)?.unit
+}
+
// 删除选中的行
const removeSelectRowEvent = () => {
const $table = editableTableRef.value
diff --git a/src/views/supermarketerp/supermarketSpu/form.vue b/src/views/supermarketerp/supermarketSpu/form.vue
index 22a8966..b06d4b1 100644
--- a/src/views/supermarketerp/supermarketSpu/form.vue
+++ b/src/views/supermarketerp/supermarketSpu/form.vue
@@ -224,7 +224,7 @@ const usePackageUnitList = () => {
item.retailPrice = storePrice(item.retailPrice)
if (item.isNew) {
item.id = ""
- // delete item.isNew
+ delete item.isNew
}
return item
})