import request from '@/utils/request';

// 查询承包方家庭成员列表
export function listJtcy(params) {
  return request({
    url: '/service/jtcy/list',
    method: 'get',
    params: params
  });
}

// 查询承包方家庭成员详细
export function getJtcy(id) {
  return request({
    url: '/service/jtcy/get/' + id,
    method: 'get'
  });
}

// 新增承包方家庭成员信息
export function addJtcy(data) {
  return request({
    url: '/service/jtcy/add',
    method: 'post',
    data: data
  });
}

// 修改承包方家庭成员信息
export function updateJtcy(data) {
  return request({
    url: '/service/jtcy/edit',
    method: 'post',
    data: data
  });
}

// 删除承包方家庭成员信息
export function deleteJtcy(id) {
  return request({
    url: '/service/jtcy/remove/' + id,
    method: 'get'
  });
}

// 家庭成员分户
export function divisionJtcy(id) {
  return request({
    url: '/service/jtcy/division/' + id,
    method: 'get'
  });
}

// 家庭成员移户
export function transferJtcy(params) {
  return request({
    url: '/service/jtcy/transfer',
    method: 'get',
    params: params
  });
}

// 家庭成员设为户主
export function setHouseholder(id) {
  return request({
    url: '/service/jtcy/householder/' + id,
    method: 'get'
  });
}

