diff --git a/src/api/dish/dish.js b/src/api/dish/dish.js index 9d982522..0b6b5e8e 100644 --- a/src/api/dish/dish.js +++ b/src/api/dish/dish.js @@ -1,23 +1,31 @@ import request from '@/utils/request' -// // 查询菜品灶类列表 -// export function getMenuDishesCookListApi(data) { -// return request({ -// url: '/smart-canteen/api/v1/menudishescook/page', -// method: 'get', -// headers: { -// "merchant-id":"378915229716713472", -// }, -// params: data -// }) -// } +// 查询菜品灶类列表 key +// dishes_cook 菜品灶类 +// dishes_label 菜品标签 +// dishes_taste 菜品口味 +// dishes_effec 菜品功效 +// dishes_style 菜品菜系 +// dishes_suitId 适宜人群 +// dishes_meal 餐次 +// dishes_season 事宜季节 +export function getDishesTypeListApi(data) { + return request({ + url: '/smart-canteen/menu_dishes/getDishesType', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} // 菜品种类-全量数据 export function menuDishesTypeAllListApi(data) { return request({ - url: '/smart-canteen/api/v1/menudishestype/all/list', + url: '/smart-canteen/menu_material/getAllMenuDishesTypeList', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -28,7 +36,7 @@ export function menuDishesTypeAllListApi(data) { // 菜品种类-新增 areaId typeName export function addMenuDishesTypeApi(data) { return request({ - url: '/smart-canteen/api/v1/menudishestype/add', + url: '/smart-canteen/menu_material/addMenuDishesType', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -60,6 +68,7 @@ export function removeMenuDishesTypeApi(typeId) { } + // 菜品列表-分页 export function getMenuDishesListApi(data) { return request({ @@ -74,7 +83,7 @@ export function getMenuDishesListApi(data) { // 菜品列表-新增 export function addMenuDishesApi(data) { return request({ - url: '/smart-canteen/api/v2/menudishes/add', + url: '/smart-canteen/menu_dishes/addMenuDishes', method: 'post', headers: { "merchant-id":"378915229716713472", diff --git a/src/api/dish/material.js b/src/api/dish/material.js index 2727b54a..7479c2f4 100644 --- a/src/api/dish/material.js +++ b/src/api/dish/material.js @@ -14,7 +14,7 @@ export function systemMaterialTreeApi(data) { // 新增原料类别 export function addMaterialTypeApi(data) { return request({ - url: '/smart-canteen/api/v1/menumaterialcategory/add', + url: '/smart-canteen/menu_material_category/add', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -25,7 +25,7 @@ export function addMaterialTypeApi(data) { //修改原料类别 export function updateMaterialTypeApi(data) { return request({ - url: '/smart-canteen/api/v1/menumaterialcategory/edit', + url: '/smart-canteen/menu_material_category/edit', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -36,7 +36,7 @@ export function updateMaterialTypeApi(data) { //删除原料类别 export function removeMaterialTypeApi(data) { return request({ - url: '/smart-canteen/api/v1/menumaterialcategory/remove', + url: '/smart-canteen/menu_material_category/del', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -48,19 +48,19 @@ export function removeMaterialTypeApi(data) { // 查询原料列表 export function getMaterialListApi(data) { return request({ - url: '/smart-canteen/api/v1/menumaterial/page', - method: 'post', + url: '/smart-canteen/menu_material/list', + method: 'get', headers: { "merchant-id":"378915229716713472", }, - data: data + params: data }) } // 新增原料 export function addMaterialApi(data) { return request({ - url: '/smart-canteen/api/v1/menumaterial/add', + url: '/smart-canteen/menu_material/addMessage', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -72,7 +72,7 @@ export function addMaterialApi(data) { // 编辑原料 export function updateMaterialApi(data) { return request({ - url: '/smart-canteen/api/v1/menumaterial/edit', + url: '/smart-canteen/menu_material/edit', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -84,11 +84,12 @@ export function updateMaterialApi(data) { // 删除原料 export function removeMaterialApi(data) { return request({ - url: '/smart-canteen/api/v1/menumaterial/remove/'+data.materialId, + url: '/smart-canteen/menu_material/del', method: 'post', headers: { "merchant-id":"378915229716713472", - } + }, + data: data }) } // 批量删除原料 @@ -117,7 +118,7 @@ export function batchUpdateMaterialApi(data) { //{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'} export function getDrpUnitListApi(data) { return request({ - url: '/smart-canteen//api/v1/drpunit/page', + url: '/smart-canteen/api/v1/drpunit/page', method: 'post', headers: { "merchant-id":"378915229716713472", diff --git a/src/views/dish/dish/index.vue b/src/views/dish/dish/index.vue index 4cd5954a..38078697 100644 --- a/src/views/dish/dish/index.vue +++ b/src/views/dish/dish/index.vue @@ -488,9 +488,9 @@ @@ -499,9 +499,9 @@ @@ -511,9 +511,9 @@ @@ -522,9 +522,9 @@ @@ -545,9 +545,9 @@ @@ -557,9 +557,9 @@ @@ -989,6 +989,7 @@ import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { menuDishesTypeAllListApi,addMenuDishesTypeApi, editMenuDishesTypeApi, removeMenuDishesTypeApi} from "@/api/dish/dish"; import { getMenuDishesListApi,addMenuDishesApi, editMenuDishesApi,menuDishesDetailApi,removeMenuDishesApi } from "@/api/dish/dish"; + import { getDishesTypeListApi } from "@/api/dish/dish"; import { getMenuDishesCookListApi, getMenuDishesLabelListApi, getMenuDishesTasteListApi, getMenuDishesEffectListApi, getMenuDishesStyleListApi, getMenuDishesSuitListApi } from "@/api/dish/type" import { getMaterialListApi } from "@/api/dish/material"; import { imgUpLoadTwo } from '@/api/system/upload' @@ -1326,23 +1327,23 @@ "page":{"current":1,"size":-1}, "object":{} } - getMenuDishesCookListApi({"content":JSON.stringify(param)}).then(response => { - this.dishesCookOptions = response.data.records; + getDishesTypeListApi({"key":'dishes_cook'}).then(response => { + this.dishesCookOptions = response.data; }); - getMenuDishesLabelListApi({"content":JSON.stringify(param)}).then(response => { - this.dishesLabelOptions = response.data.records; + getDishesTypeListApi({"key":"dishes_label"}).then(response => { + this.dishesLabelOptions = response.data; }); - getMenuDishesTasteListApi({"content":JSON.stringify(param)}).then(response => { - this.dishesTasteOptions = response.data.records; + getDishesTypeListApi({"key":"dishes_taste"}).then(response => { + this.dishesTasteOptions = response.data; }); - getMenuDishesEffectListApi({"content":JSON.stringify(param)}).then(response => { - this.dishesEffectOptions = response.data.records; + getDishesTypeListApi({"key":"dishes_effec"}).then(response => { + this.dishesEffectOptions = response.data; }); - getMenuDishesStyleListApi({"content":JSON.stringify(param)}).then(response => { - this.dishesStyleOptions = response.data.records; + getDishesTypeListApi({"key":"dishes_style"}).then(response => { + this.dishesStyleOptions = response.data; }); - getMenuDishesSuitListApi({"content":JSON.stringify(param)}).then(response => { - this.dishesSuitOptions = response.data.records; + getDishesTypeListApi({"key":"dishes_suitId"}).then(response => { + this.dishesSuitOptions = response.data; }); }, diff --git a/src/views/dish/material/components/MaterialDialog.vue b/src/views/dish/material/components/MaterialDialog.vue index 90a42919..6068c988 100644 --- a/src/views/dish/material/components/MaterialDialog.vue +++ b/src/views/dish/material/components/MaterialDialog.vue @@ -102,6 +102,11 @@ - + - + @@ -283,7 +288,7 @@