import request from '@/utils/request'

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

export function listContractBo(query) {
  return request({
    url: '/business/contract/listBo',
    method: 'get',
    params: query
  })
}
// 查询合同列表详细
export function getContract(id) {
  return request({
    url: '/business/contract/' + id,
    method: 'get'
  })
}

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

// 新增合同列表
export function addContract(data) {
  return request({
    url: '/business/contract',
    method: 'post',
    data: data
  })
}

// 修改合同列表
export function updateContract(data) {
  return request({
    url: '/business/contract',
    method: 'put',
    data: data
  })
}

export function editFlow(data) {
  return request({
    url: '/business/contract/editFlow',
    method: 'put',
    data: data
  })
}

// 删除合同列表
export function delContract(id) {
  return request({
    url: '/business/contract/' + id,
    method: 'delete'
  })
}

export function contractSigningStatistic(params) {
  return request({
    url: '/business/contract/contractSigningStatistic',
    method: 'get',
    params
  })
}
