|
@@ -632,6 +632,20 @@ const selectBOM = (item) => {
|
|
|
formData.data.skuSpecList[rowIndex.value].netWeight = item.netWeight;
|
|
|
ElMessage({ message: "选择完成", type: "success" });
|
|
|
openBOM.value = false;
|
|
|
+ proxy.post("/skuDefaultPackageSpec/getPackList", { skuId: formData.data.id, spec: item.length + "*" + item.width + "*" + item.height }).then((res) => {
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ formData.data.skuSpecList[rowIndex.value].packagingMaterialList = res.map((val) => {
|
|
|
+ return {
|
|
|
+ bomSpecId: val.bomSpecId,
|
|
|
+ quantity: 1,
|
|
|
+ name: val.bomSpecName,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ formData.data.skuSpecList[rowIndex.value].packagingMaterialList = [];
|
|
|
+ }
|
|
|
+ ElMessage({ message: "根据规格尺寸替换包材配件完成", type: "success" });
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
const clickRemoveBOM = (index) => {
|