2025-03-06 13:08:28 +08:00
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
|
|
|
|
// 原料类别
|
|
|
|
|
export function systemMaterialTreeApi(data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/smart-canteen/api/v1/menumaterialcategory/tree/list',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
"merchant-id":"378915229716713472",
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-03-11 18:32:06 +08:00
|
|
|
// 新增原料类别
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-03-06 13:08:28 +08:00
|
|
|
|
2025-03-11 18:32:06 +08:00
|
|
|
// 查询原料列表
|
2025-03-06 13:08:28 +08:00
|
|
|
export function getMaterialListApi(data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/smart-canteen/api/v1/menumaterial/page',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
"merchant-id":"378915229716713472",
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-03-11 18:32:06 +08:00
|
|
|
|
|
|
|
|
// 新增原料
|
2025-03-06 13:08:28 +08:00
|
|
|
export function addMaterialApi(data) {
|
2025-03-11 18:32:06 +08:00
|
|
|
return request({
|
|
|
|
|
url: '/smart-canteen/api/v1/menumaterial/add',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
"merchant-id":"378915229716713472",
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 编辑原料
|
2025-03-06 13:08:28 +08:00
|
|
|
export function updateMaterialApi(data) {
|
2025-03-11 18:32:06 +08:00
|
|
|
return request({
|
|
|
|
|
url: '/smart-canteen/api/v1/menumaterial/edit',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
"merchant-id":"378915229716713472",
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除原料
|
2025-03-06 13:08:28 +08:00
|
|
|
export function removeMaterialApi(data) {
|
2025-03-11 18:32:06 +08:00
|
|
|
return request({
|
2025-03-26 15:47:02 +08:00
|
|
|
url: '/smart-canteen/api/v1/menumaterial/remove/'+data.materialId,
|
2025-03-11 18:32:06 +08:00
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
"merchant-id":"378915229716713472",
|
2025-03-26 15:47:02 +08:00
|
|
|
}
|
2025-03-11 18:32:06 +08:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 批量删除原料
|
|
|
|
|
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
|
|
|
|
|
})
|
2025-03-19 18:36:55 +08:00
|
|
|
}
|
2025-03-11 18:32:06 +08:00
|
|
|
// 根据区域ID-获取原料单位下拉选
|
|
|
|
|
//{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'}
|
|
|
|
|
export function getDrpUnitListApi(data) {
|
2025-03-06 13:08:28 +08:00
|
|
|
return request({
|
2025-03-11 18:32:06 +08:00
|
|
|
url: '/smart-canteen//api/v1/drpunit/page',
|
2025-03-06 13:08:28 +08:00
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
"merchant-id":"378915229716713472",
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
})
|
2025-03-28 17:33:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 下载模板
|
|
|
|
|
export function downLoadExportTemplate(data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/smart-canteen/api/v4/export/downLoad',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
"merchant-id":"378915229716713472",
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// export function downLoadExportTemplate(data) {
|
|
|
|
|
// return request({
|
|
|
|
|
// url: '/smart-canteen/api/v4/export/downLoad',
|
|
|
|
|
// method: 'post',
|
|
|
|
|
// data: data,
|
|
|
|
|
// responseType: 'blob'
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|