From 7660cda647f36841b3a6f52cad6998c9d66c73cf Mon Sep 17 00:00:00 2001 From: SZCJW <792430652@qq.com> Date: Thu, 9 Apr 2026 23:28:01 +0800 Subject: [PATCH] x --- static/vue-app.js | 68 +---------------------------------------------- 1 file changed, 1 insertion(+), 67 deletions(-) diff --git a/static/vue-app.js b/static/vue-app.js index 736d9a8..e93c2f9 100644 --- a/static/vue-app.js +++ b/static/vue-app.js @@ -2503,22 +2503,6 @@ const InventoryView = { } }; - const editProductBom = async (product) => { - try { - await loadMaterials(); - const bom = await apiRequest(`/api/products/${product.id}/materials`); - state.modalType = 'productBom'; - state.editingItem = product; - state.productBomItems = (bom.items || []).map(item => ({ - material_id: item.material_id, - quantity: item.quantity - })); - state.showModal = true; - } catch (e) { - handleApiError(e, '加载产品 BOM'); - } - }; - const addBomItem = () => { state.productBomItems.push({ material_id: state.materials[0]?.id || null, @@ -2530,20 +2514,6 @@ const InventoryView = { state.productBomItems.splice(idx, 1); }; - const saveProductBom = async () => { - try { - await apiRequest(`/api/products/${state.editingItem.id}/materials`, { - method: 'PUT', - body: JSON.stringify({ items: state.productBomItems }) - }); - addNotification('产品BOM保存成功', 'success'); - closeModal(); - loadProducts(); - } catch (e) { - handleApiError(e, '保存产品BOM'); - } - }; - const saveSupplier = async () => { try { if (state.editingItem) { @@ -2966,10 +2936,8 @@ const InventoryView = { openDateTimePicker, saveProduct, deleteProduct, - editProductBom, addBomItem, removeBomItem, - saveProductBom, saveSupplier, deleteSupplier, saveCustomer, @@ -3631,7 +3599,7 @@ const InventoryView = {