From 2cdc19093dc2ed2340d7654405d245a7160f777c Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Tue, 11 Mar 2025 18:32:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=9F=E6=96=99=EF=BC=8C=E8=90=A5=E5=85=BB?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dish/material.js | 159 ++++-- src/api/dish/nutritionInfo.js | 20 +- src/views/dish/material/index.vue | 720 ++++++++++++++----------- src/views/dish/nutritionInfo/index.vue | 53 +- 4 files changed, 570 insertions(+), 382 deletions(-) diff --git a/src/api/dish/material.js b/src/api/dish/material.js index 596411e8..96115a51 100644 --- a/src/api/dish/material.js +++ b/src/api/dish/material.js @@ -11,6 +11,39 @@ export function systemMaterialTreeApi(data) { data: data }) } +// 新增原料类别 +export function addMaterialTypeApi(data) { + return request({ + url: '/smart-canteen/api/v1/menumaterialcategory/add', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +//修改原料类别 +export function updateMaterialTypeApi(data) { + return request({ + url: '/smart-canteen/api/v1/menumaterialcategory/edit', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +//删除原料类别 +export function removeMaterialTypeApi(data) { + return request({ + url: '/smart-canteen/api/v1/menumaterialcategory/remove', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} // 系统区域权限树 export function systemAreaTreeApi(data) { @@ -24,7 +57,7 @@ export function systemAreaTreeApi(data) { }) } -// 查询区域列表 +// 查询原料列表 export function getMaterialListApi(data) { return request({ url: '/smart-canteen/api/v1/menumaterial/page', @@ -35,54 +68,72 @@ export function getMaterialListApi(data) { data: data }) } -// 根据区域id,查询区域名称 -export function getMaterialNameApi(data) { - return request({ - url: '/smart-canteen/api/v2/alloc/area/get-area-name', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} -// 查询区域(食堂,档口,餐线)编号 -export function getMaterialNumApi(data) { - return request({ - url: 'smart-canteen/api/v2/alloc/canteen/get-canteen-num', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} -// 新增区域 + +// 新增原料 export function addMaterialApi(data) { - return request({ - url: 'smart-canteen/api/v2/alloc/area/add', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} -//修改区域 + return request({ + url: '/smart-canteen/api/v1/menumaterial/add', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 编辑原料 export function updateMaterialApi(data) { - return request({ - url: 'smart-canteen/api/v2/alloc/area/update', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} -//删除区域 + return request({ + url: '/smart-canteen/api/v1/menumaterial/edit', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 删除原料 export function removeMaterialApi(data) { + return request({ + url: '/smart-canteen/api/v1/menumaterial/remove', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 批量删除原料 +export function batchRemoveMaterialApi(data) { + return request({ + url: '/smart-canteen/api/v1/menumaterial/remove/batch', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 批量修改原料 +export function batchUpdateMaterialApi(data) { + return request({ + url: '/smart-canteen/api/v1/menumaterial/material/batch/update/category', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + + +// 根据区域ID-获取原料单位下拉选 +//{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'} +export function getDrpUnitListApi(data) { return request({ - url: 'smart-canteen/api/v2/alloc/area/remove', + url: '/smart-canteen//api/v1/drpunit/page', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -90,3 +141,21 @@ export function removeMaterialApi(data) { data: data }) } + + + + + +// // 查询区域(食堂,档口,餐线)编号 +// export function getMaterialNumApi(data) { +// return request({ +// url: 'smart-canteen/api/v2/alloc/canteen/get-canteen-num', +// method: 'post', +// headers: { +// "merchant-id":"378915229716713472", +// }, +// data: data +// }) +// } + + diff --git a/src/api/dish/nutritionInfo.js b/src/api/dish/nutritionInfo.js index 3b018886..ede0b09b 100644 --- a/src/api/dish/nutritionInfo.js +++ b/src/api/dish/nutritionInfo.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 查询获取所有食材营养信息 +// 查询获取所有营养信息 export function listNutrition(query) { return request({ url: '/smart-canteen/api/v1/menunutrition/getMenuNutritionPage', @@ -45,7 +45,7 @@ export function delNutrition(data) { }) } -// 获取所有食材类别 +// 获取营养信息类别 export function typeList(data) { return request({ url: '/smart-canteen/api/v1/menunutrition/all/type/list', @@ -53,4 +53,20 @@ export function typeList(data) { data: data }) } +// 获取所有营养信息 +export function nutritionAllListApi(data) { + return request({ + url: '/smart-canteen/api/v1/menunutrition/all/list', + method: 'post', + data: data + }) +} +// 获取营养信息-详细数据 +export function nutritionDetailApi(nutritionId) { + return request({ + url: '/smart-canteen/api/v1/menumaterial/nutrition/detail/'+nutritionId, + method: 'post', + // data: data + }) +} diff --git a/src/views/dish/material/index.vue b/src/views/dish/material/index.vue index c618f056..45da2901 100644 --- a/src/views/dish/material/index.vue +++ b/src/views/dish/material/index.vue @@ -7,7 +7,7 @@
原料类别 - + {{ node.label.slice(0, 10) + "..." }} @@ -81,27 +77,44 @@ :inline="true" v-show="showSearch" label-width="68px" - > - - + > + + + + + - - + + + + 新增 + + 批量删除 + + + 批量修改类别 + + + + + 批量导入 + + + - + + + - - - - - - - - - - - - + + + + + + + + + + + +