import request from '@/utils/request'

// 往来单位-下拉
export function getUnitList(query) {
  return request({
    url: '/material/select/getUnitList',
    method: 'post',
    data: {

    },
  })
}

// 工程名称-下拉
export function getProjectList(query) {
  return request({
    url: '/material/select/getProjectList',
    method: 'post',
    data: {},
  })
}

//协议管理-列表
export function getListAgreement(query) {
  return request({
    url: '/material/bm_agreement_info/list',
    method: 'get',
    params: query,
  })
}


// 协议管理-详情
export function getAgreementDetail(id) {
  return request({
    url: '/material/bm_agreement_info/'+id,
    method: 'get',
  })
}


//协议管理--删除
export function delAgreement(id) {
  return request({
    url: '/material/bm_agreement_info/'+id,
    method: 'delete',
  })
}

// 协议管理--修改
export function editAgreement(data) {
  return request({
    url: '/material/bm_agreement_info',
    method: 'put',
    data: data,
  })
}

//协议管理--新增
export function addAgreement(data) {
  return request({
    url: '/material/bm_agreement_info',
    method: 'post',
    data: data,
  })
}

//协议管理--删除
export function deleteFile(objectKey) {
  return request({
    url: '/material/bm_agreement_info/'+id,
    method: 'delete',
  })
}
