import request from '@/utils/request';
import { praseStrEmpty } from "@/utils/ruoyi";

/**
 * 查询列表
 */
export function listFullPartyMember(query) {
  return request({
    url: '/town/partymember/list',
    method: 'get',
    params: query
  });
}

// 新增基本信息
export function addFullPartyMemberBasicInfo(data) {
  return request({
    url: '/town/partymember',
    method: 'post',
    data: data
  });
}

// 新增流程信息
export function addFullPartyMemberProgressInfo(data) {
  return request({
    url: '/town/partymemberflowlog/saveProgress',
    method: 'post',
    data: data
  });
}

// 修改用户
export function updateFullPartyMemberBasicInfo(data) {
  return request({
    url: '/town/partymember',
    method: 'put',
    data: data
  });
}

// 查询基本信息
export function viewFullPartyMember(id) {
  return request({
    url: '/town/partymember/' + praseStrEmpty(id),
    method: 'get'
  });
}

// 查询详细信息
export function viewDetailFullPartyMember(query) {
  return request({
    url: '/town/partymember/detail',
    method: 'get',
    params: query
  });
}

// 重新激活
export function reactivateFullPartyMember(query) {
  return request({
    url: '/town/partymember/active',
    method: 'get',
    params: query
  });
}

// 删除
export function delFullPartyMember(ids) {
  return request({
    url: '/town/partymember/' + ids,
    method: 'delete'
  });
}

// 查询所有党员选项列表
export function getFullPartyMemberOptions() {
  return request({
    url: '/town/partymember/nameList',
    method: 'get'
  });
}

// 检查过程和资料完整性
export function checkProgressAndCompletion(query) {
  return request({
    url: '/town/partymember/checkProgressAndCompletion',
    method: 'get',
    params: query
  });
}

// 转为正式党员
export function changeOfficialFullPartyMember(query) {
  return request({
    url: '/town/partymember/changeOfficial',
    method: 'get',
    params: query
  });
}
