import request from '@/utils/request'

// 获取采购合同管理列表
export function getPurchManagementList(params) {
  return request({
    url: '/purchManagement/list',
    method: 'get',
    params
  })
}

// 获取项目名称
export function salesContractManagementGetCompletedSales(params) {
  return request({
    url: '/salesContractManagement/getCompletedSales',
    method: 'get',
    params
  })
}

// 获取质保金
export function purchManagementGetRetention(params) {
  return request({
    url: '/purchManagement/getRetention',
    method: 'get',
    params
  })
}

// 获取详情
export function getDeatail(params) {
  return request({
    url: '/purchManagement/create',
    method: 'get',
    params
  })
}

// 采购合同录入-提交
export function submitInfo(data) {
  return request({
    url: '/purchManagement/doCreate',
    method: 'post',
    data
  })
}

// 选择货物
export function getGoodsList(data) {
  return request({
    url: '/purchManagement/selectGoods',
    method: 'post',
    data
  })
}

// 获取签署详情
export function getSignDetail(params) {
  return request({
    url: '/purchContract/confirm/add',
    method: 'get',
    params
  })
}

// 签署合同提交
export function submitSign(data) {
  return request({
    url: '/purchContract/confirm/sign',
    method: 'post',
    data
  })
}

// 计算暂定单价
export function calculateMoney(data) {
  return request({
    url: '/purchManagement/calculateGoods',
    method: 'post',
    data
  })
}

// 刷新认证状态
export function refreshReStatus(params) {
  return request({
    url: '/purchContract/confirm/getAuthStatus',
    method: 'get',
    params
  })
}

// 刷新签署状态
export function refreshSiStatus(params) {
  return request({
    url: '/purchContract/confirm/signType',
    method: 'get',
    params
  })
}

// 签署回调
export function getSignFile(data) {
  return request({
    url: '/purchContract/confirm/signBack',
    method: 'post',
    data
  })
}

// 变更详情
export function getUpdateDetail(params) {
  return request({
    url: '/purchContract/change/add',
    method: 'get',
    params
  })
}

// 变更提交
export function submitUpdate(data) {
  return request({
    url: '/purchContract/change/doChange',
    method: 'post',
    data
  })
}

// 变更签署详情
export function getChangeSignDetail(params) {
  return request({
    url: '/purchContract/change/confirm/add/signPage',
    method: 'get',
    params
  })
}

// 变更签署提交
export function submitChangeSign(data) {
  return request({
    url: '/purchContract/change/add/sign',
    method: 'post',
    data
  })
}

// 详情
export function getDetail(params) {
  return request({
    // url: '/purchManagement/getView',
    url: '/businessProcessingTask/doBusinessCHistoryView',
    method: 'get',
    params
  })
}

