import request from '@/utils/request'

// 查询合同履历列表
export function listContractHistory(query) {
  return request({
    url: '/business/contractHistory/list',
    method: 'get',
    params: query
  })
}

// 查询合同履历详细
export function getContractHistory(id) {
  return request({
    url: '/business/contractHistory/' + id,
    method: 'get'
  })
}

export function getContractHistory4Contract(id) {
  return request({
    url: '/business/contractHistory/getContractHistory4Contract/' + id,
    method: 'get'
  })
}

// 新增合同履历
export function addContractHistory(data) {
  return request({
    url: '/business/contractHistory',
    method: 'post',
    data: data
  })
}

// 修改合同履历
export function updateContractHistory(data) {
  return request({
    url: '/business/contractHistory',
    method: 'put',
    data: data
  })
}

// 删除合同履历
export function delContractHistory(id) {
  return request({
    url: '/business/contractHistory/' + id,
    method: 'delete'
  })
}
