diff --git a/src/api/dish/material.js b/src/api/dish/material.js index 7866aad9..e51e79e1 100644 --- a/src/api/dish/material.js +++ b/src/api/dish/material.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 原料类别树 export function systemMaterialTreeApi(data) { return request({ - url: '/smart-canteen/menu_material_category/getTree', + url: '/smart-canteen/cook_material_type/getTree', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -14,7 +14,7 @@ export function systemMaterialTreeApi(data) { // 新增原料类别 export function addMaterialTypeApi(data) { return request({ - url: '/smart-canteen/menu_material_category/add', + url: '/smart-canteen/cook_material_type/add', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -25,7 +25,7 @@ export function addMaterialTypeApi(data) { //修改原料类别 export function updateMaterialTypeApi(data) { return request({ - url: '/smart-canteen/menu_material_category/edit', + url: '/smart-canteen/cook_material_type/edit', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -36,19 +36,18 @@ export function updateMaterialTypeApi(data) { //删除原料类别 export function removeMaterialTypeApi(data) { return request({ - url: '/smart-canteen/menu_material_category/del', + url: '/smart-canteen/cook_material_type/del/'+data.id, method: 'post', headers: { "merchant-id":"378915229716713472", - }, - data: data + } }) } // 查询原料列表 export function getMaterialListApi(data) { return request({ - url: '/smart-canteen/menu_material/list', + url: '/smart-canteen/cook_material/list', method: 'get', headers: { "merchant-id":"378915229716713472", @@ -60,7 +59,7 @@ export function getMaterialListApi(data) { // 新增原料 export function addMaterialApi(data) { return request({ - url: '/smart-canteen/menu_material/addMessage', + url: '/smart-canteen/cook_material/add', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -72,7 +71,7 @@ export function addMaterialApi(data) { // 编辑原料 export function updateMaterialApi(data) { return request({ - url: '/smart-canteen/menu_material/edit', + url: '/smart-canteen/cook_material/edit', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -84,14 +83,18 @@ export function updateMaterialApi(data) { // 删除原料 export function removeMaterialApi(data) { return request({ - url: '/smart-canteen/menu_material/del', + url: '/smart-canteen/cook_material/del/'+data.materialId, method: 'post', headers: { "merchant-id":"378915229716713472", - }, - data: data + } }) } + + + + + // 批量删除原料 export function batchRemoveMaterialApi(data) { return request({ @@ -118,12 +121,12 @@ export function batchUpdateMaterialApi(data) { //{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'} export function getDrpUnitListApi(data) { return request({ - url: '/smart-canteen/menu_material/getDrpUnit', - method: 'post', + url: '/smart-canteen/supply_product_unit/list', + method: 'get', headers: { "merchant-id":"378915229716713472", }, - data: data + params: data }) } diff --git a/src/api/dish/nutritionInfo.js b/src/api/dish/nutritionInfo.js index bc7aa936..5fa4d2df 100644 --- a/src/api/dish/nutritionInfo.js +++ b/src/api/dish/nutritionInfo.js @@ -69,8 +69,7 @@ export function delNutrition(data) { method: 'post' }) } - - + // 查询详细数据 export function getNutritionInfo(data) { return request({ @@ -78,24 +77,7 @@ export function getNutritionInfo(data) { method: 'get', }) } - - - - - - - - - - - - - - - - - - + // 获取所有营养信息 export function nutritionAllListApi(data) { return request({ diff --git a/src/views/dish/material/components/MaterialDialog.vue b/src/views/dish/material/components/MaterialDialog.vue index b2093a36..5a38d47a 100644 --- a/src/views/dish/material/components/MaterialDialog.vue +++ b/src/views/dish/material/components/MaterialDialog.vue @@ -13,6 +13,16 @@ + + + + + - - + + - --> + @@ -89,14 +99,14 @@ --> - + - - + + - -

营养信息

@@ -201,28 +166,12 @@ -
- +
-
- - +