import request from '@/utils/request' // 查询物料列表 export function listMaterial(query) { return request({ url: '/worn/material/list', method: 'get', params: query }) } // 查询物料详细 export function getMaterial(id) { return request({ url: '/worn/material/' + id, method: 'get' }) } // 新增物料 export function addMaterial(data) { return request({ url: '/worn/material', method: 'post', data: data }) } // 修改物料 export function updateMaterial(data) { return request({ url: '/worn/material', method: 'put', data: data }) } // 删除物料 export function delMaterial(id) { return request({ url: '/worn/material/' + id, method: 'delete' }) } // 获取物料类型的树形结构 export function getMaterTypeTree() { return request({ url: '/worn/type/tree' , method: 'get' }) }