166 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			166 lines
		
	
	
		
			3.3 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/menu_material/list',
 | 
						|
      method: 'get',
 | 
						|
      headers: {
 | 
						|
          "merchant-id":"378915229716713472",
 | 
						|
      },
 | 
						|
      params: data
 | 
						|
    })
 | 
						|
}
 | 
						|
 | 
						|
// 新增原料
 | 
						|
export function addMaterialApi(data) {
 | 
						|
  return request({
 | 
						|
    url: '/smart-canteen/menu_material/addMessage',
 | 
						|
    method: 'post',
 | 
						|
    headers: {
 | 
						|
        "merchant-id":"378915229716713472",
 | 
						|
    },
 | 
						|
    data: data
 | 
						|
  })
 | 
						|
}  
 | 
						|
 | 
						|
// 编辑原料
 | 
						|
export function updateMaterialApi(data) {
 | 
						|
  return request({
 | 
						|
    url: '/smart-canteen/menu_material/edit',
 | 
						|
    method: 'post',
 | 
						|
    headers: {
 | 
						|
        "merchant-id":"378915229716713472",
 | 
						|
    },
 | 
						|
    data: data
 | 
						|
  })
 | 
						|
} 
 | 
						|
 | 
						|
// 删除原料
 | 
						|
export function removeMaterialApi(data) {
 | 
						|
  return request({
 | 
						|
    url: '/smart-canteen/menu_material/del',
 | 
						|
    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/v1/drpunit/page',
 | 
						|
      method: 'post',
 | 
						|
      headers: {
 | 
						|
          "merchant-id":"378915229716713472",
 | 
						|
      },
 | 
						|
      data: data
 | 
						|
    })
 | 
						|
} 
 | 
						|
 | 
						|
// 下载模板
 | 
						|
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'
 | 
						|
//   })
 | 
						|
// }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 |