import request from '@/utils/request'

// 查询物料字典列表
export function listMtd(query) {
  return request({
    url: '/information/mtd/list',
    method: 'get',
    params: query
  })
}

// 查询物料字典详细
export function getMtd(Id) {
  return request({
    url: '/information/mtd/' + Id,
    method: 'get'
  })
}

// 新增物料字典
export function addMtd(data) {
  return request({
    url: '/information/mtd',
    method: 'post',
    data: data
  })
}

// 修改物料字典
export function updateMtd(data) {
  return request({
    url: '/information/mtd',
    method: 'put',
    data: data
  })
}

// 删除物料字典
export function delMtd(Id) {
  return request({
    url: '/information/mtd/' + Id,
    method: 'delete'
  })
}

export function mtdRenew() {
  return request({
    url: '/information/mtd/syncFromPlan',
    method: 'get'
  })
}
