import request from '@/utils/request';

// 获取承包方列表
export function listCbf(params) {
  return request({
    url: '/service/cbf/list',
    method: 'get',
    params: params
  });
}

// 获取承包方详情
export function getCbf(cbfbm) {
  return request({
    url: '/service/cbf/obtain/' + cbfbm,
    method: 'get',
  });
}

// 获取承包方详情
export function getCbfById(id) {
  return request({
    url: '/service/cbf/get/' + id,
    method: 'get'
  });
}

// 新增承包方信息
export function addCbf(data) {
  return request({
    url: '/service/cbf/add',
    method: 'post',
    data: data
  });
}

// 更新承包方信息
export function updateCbf(data) {
  return request({
    url: '/service/cbf/edit',
    method: 'post',
    data: data
  })
}

// 删除承包方信息
export function deleteCbf(id) {
  return request({
    url: '/service/cbf/mobile/remove/' + id,
    method: 'get'
  });
}

// 生成承包方编码
export function generateContractorCode(params) {
  return request({
    url: '/service/cbf/generateCode',
    method: 'get',
    params: params
  });
}

// 承包方调查签字
export function contractorSignature(data) {
  return request({
    url: '/service/cbf/surveySign',
    method: 'post',
    data: data
  });
}

// 调查挂起
export function hangUp(data) {
  return request({
    url: '/service/cbf/hangUp',
    method: 'post',
    data: data
  });
}
