129 lines
2.8 KiB
JavaScript
129 lines
2.8 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
// 商品类别
|
|
export function systemMaterialTreeApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/menu_material_category/getTree',
|
|
method: 'post',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
data: data
|
|
})
|
|
}
|
|
// 新增商品类别
|
|
export function addMaterialTypeApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/menu_material_category/add',
|
|
method: 'post',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
data: data
|
|
})
|
|
}
|
|
//修改商品类别
|
|
export function updateMaterialTypeApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/menu_material_category/edit',
|
|
method: 'post',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
data: data
|
|
})
|
|
}
|
|
//删除商品类别
|
|
export function removeMaterialTypeApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/menu_material_category/del',
|
|
method: 'post',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
data: data
|
|
})
|
|
}
|
|
|
|
|
|
// 查询商品列表
|
|
export function getMaterialListApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/supermarket_product/list',
|
|
method: 'get',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
params: data
|
|
})
|
|
}
|
|
|
|
// 新增商品
|
|
export function addMaterialApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/supermarket_product/add',
|
|
method: 'post',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 编辑商品
|
|
export function updateMaterialApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/supermarket_product/edit',
|
|
method: 'post',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 删除商品
|
|
export function removeMaterialApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/supermarket_product/del',
|
|
method: 'post',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
data: data
|
|
})
|
|
}
|
|
// 批量删除商品
|
|
export function batchRemoveMaterialApi(data) {
|
|
return request({
|
|
url: '/smart-canteen/supermarket_product/dels',
|
|
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/supermarket_unit/list',
|
|
method: 'get',
|
|
headers: {
|
|
"merchant-id":"378915229716713472",
|
|
},
|
|
params: data
|
|
})
|
|
}
|