|
@@ -207,20 +207,22 @@ const selectBOM = (item) => {
|
|
|
return ElMessage("该BOM已添加");
|
|
|
}
|
|
|
}
|
|
|
- if (item.id) {
|
|
|
- formData.data.inOutStorageBomList.push({
|
|
|
- bomSpecId: item.id || item.bomSpecId,
|
|
|
- code: item.code,
|
|
|
- name: item.name,
|
|
|
- length: item.length,
|
|
|
- width: item.width,
|
|
|
- height: item.height,
|
|
|
- quantity: undefined,
|
|
|
- purchaseQuantity: item.purchaseQuantity,
|
|
|
- arrivalQuantity: item.arrivalQuantity,
|
|
|
- });
|
|
|
- ElMessage({ message: "选择完成", type: "success" });
|
|
|
+ let id = item.id;
|
|
|
+ if (formData.data.purchaseId) {
|
|
|
+ id = item.bomSpecId;
|
|
|
}
|
|
|
+ formData.data.inOutStorageBomList.push({
|
|
|
+ bomSpecId: id,
|
|
|
+ code: item.code,
|
|
|
+ name: item.name,
|
|
|
+ length: item.length,
|
|
|
+ width: item.width,
|
|
|
+ height: item.height,
|
|
|
+ quantity: undefined,
|
|
|
+ purchaseQuantity: item.purchaseQuantity,
|
|
|
+ arrivalQuantity: item.arrivalQuantity,
|
|
|
+ });
|
|
|
+ ElMessage({ message: "选择完成", type: "success" });
|
|
|
};
|
|
|
const clickDelete = (index) => {
|
|
|
formData.data.inOutStorageBomList.splice(index, 1);
|