x
This commit is contained in:
+4
-4
@@ -2144,17 +2144,17 @@ const InventoryView = {
|
||||
}))
|
||||
};
|
||||
if (state.editingItem) {
|
||||
await apiRequest(`/api/sales-orders/${state.editingItem.id}`, {
|
||||
const result = await apiRequest(`/api/sales-orders/${state.editingItem.id}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
addNotification('销售订单更新成功', 'success');
|
||||
addNotification(result.production_status === 'bom_missing' ? '订单已保存,但成品未配置BOM,未扣减物料' : '销售订单更新成功并已自动扣减物料', result.production_status === 'bom_missing' ? 'warning' : 'success');
|
||||
} else {
|
||||
await apiRequest('/api/sales-orders', {
|
||||
const result = await apiRequest('/api/sales-orders', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
addNotification('销售订单创建成功并已自动扣减物料', 'success');
|
||||
addNotification(result.production_status === 'bom_missing' ? '订单已创建,但成品未配置BOM,未扣减物料' : '销售订单创建成功并已自动扣减物料', result.production_status === 'bom_missing' ? 'warning' : 'success');
|
||||
}
|
||||
closeModal();
|
||||
loadProductionOrders();
|
||||
|
||||
Reference in New Issue
Block a user