|
@@ -541,11 +541,9 @@ const nodeMaterialChange = async (val) => {
|
|
|
primaryKeyId: val
|
|
|
})
|
|
|
//处理数据
|
|
|
- const records = getObjValue(data)
|
|
|
- nodeMaterialSelectData.value = records
|
|
|
- if (records.length > 0) {
|
|
|
- addEditFormModel.value.specificationNumber = records?.sampleNames
|
|
|
- addEditFormModel.value.materialName = records?.sampleNumbers
|
|
|
+ if (data) {
|
|
|
+ addEditFormModel.value.specificationNumber = data?.sampleNumbers
|
|
|
+ addEditFormModel.value.materialName = data?.sampleNames
|
|
|
} else {
|
|
|
addEditFormModel.value.specificationNumber = ''
|
|
|
addEditFormModel.value.materialName = ''
|