|
@@ -375,13 +375,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
addMaterialItem (item) {
|
|
|
- this.materialList.push({
|
|
|
- materialId: item.materialId,
|
|
|
- materialName: item.materialName,
|
|
|
- specifications: item.specifications,
|
|
|
- cnt: 0,
|
|
|
- unitName: item.unitName,
|
|
|
- notes: item.notes
|
|
|
+ this.materialList.push({...item,
|
|
|
+ cnt: 0
|
|
|
})
|
|
|
},
|
|
|
validateField (type) {
|
|
@@ -398,9 +393,7 @@ export default {
|
|
|
if (this.dataForm.isCompose === '1' && this.productDetails.length > 0) {
|
|
|
this.productDetails.forEach((item) => {
|
|
|
this.dataForm.composeProductMaterialList.push({
|
|
|
- cnt: item.cnt,
|
|
|
- materialId: item.productId,
|
|
|
- notes: item.notes
|
|
|
+ ...item
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -409,9 +402,7 @@ export default {
|
|
|
if (this.materialList.length > 0) {
|
|
|
this.materialList.forEach((item) => {
|
|
|
this.dataForm.productMaterialList.push({
|
|
|
- cnt: item.cnt,
|
|
|
- materialId: item.materialId,
|
|
|
- notes: item.notes
|
|
|
+ ...item
|
|
|
})
|
|
|
})
|
|
|
}
|