|
|
@@ -159,7 +159,8 @@ const formData = ref({
|
|
|
supplier: '',
|
|
|
expirationDate: undefined,
|
|
|
materialsTypePicture: '',
|
|
|
- properties: ''
|
|
|
+ properties: '',
|
|
|
+
|
|
|
})
|
|
|
|
|
|
// 表单校验规则
|
|
|
@@ -314,7 +315,7 @@ watch(
|
|
|
|
|
|
/** 选择属性值 - 修正字段映射 */
|
|
|
const selectValue = (propertyId: string, recordId: string) => {
|
|
|
- if (selectedValues.value[propertyId] === recordId) {
|
|
|
+ if (selectedValues.value[propertyId] == recordId) {
|
|
|
selectedValues.value[propertyId] = null
|
|
|
} else {
|
|
|
selectedValues.value[propertyId] = recordId
|
|
|
@@ -326,16 +327,16 @@ const selectValue = (propertyId: string, recordId: string) => {
|
|
|
.map(([propertyId, recordId]) => {
|
|
|
// 修正:使用正确的字段名
|
|
|
const property = PropertyList.value.find(
|
|
|
- (p) => p.id === propertyId // 使用 id 字段
|
|
|
+ (p) => p.id == propertyId // 使用 id 字段
|
|
|
)
|
|
|
const value = PropertyValueList.value.find(
|
|
|
- (v) => v.id === recordId // 使用 id 字段
|
|
|
+ (v) => v.id == recordId // 使用 id 字段
|
|
|
)
|
|
|
return {
|
|
|
propertyId,
|
|
|
recordId,
|
|
|
- valueName: value ? value.valueName : '',
|
|
|
- propertyName: property ? property.propertyName : ''
|
|
|
+ valueName: value.valueName,
|
|
|
+ propertyName: property.propertyName
|
|
|
}
|
|
|
})
|
|
|
|