import request from "@/utils/request";

export function getFamilyAssetLiabilityList(projectId) {
  return request({
    url: "/ccdi/project/special-check/family-asset-liability/list",
    method: "get",
    params: { projectId },
  });
}

export function getFamilyAssetLiabilityDetail(projectId, staffIdCard) {
  return request({
    url: "/ccdi/project/special-check/family-asset-liability/detail",
    method: "get",
    params: {
      projectId,
      staffIdCard,
    },
  });
}

export function getExtendedPurchaseList(params) {
  const { projectId, applicantName, applyDateStart, applyDateEnd, pageNum, pageSize } = params;
  return request({
    url: "/ccdi/project/special-check/extended-query/purchase/list",
    method: "get",
    params: {
      projectId,
      applicantName,
      applyDateStart,
      applyDateEnd,
      pageNum,
      pageSize,
    },
  });
}

export function getExtendedPurchaseDetail(params) {
  const { projectId, purchaseId } = params;
  return request({
    url: "/ccdi/project/special-check/extended-query/purchase/detail",
    method: "get",
    params: {
      projectId,
      purchaseId,
    },
  });
}

export function getExtendedRecruitmentList(params) {
  const { projectId, interviewerName, pageNum, pageSize } = params;
  return request({
    url: "/ccdi/project/special-check/extended-query/recruitment/list",
    method: "get",
    params: {
      projectId,
      interviewerName,
      pageNum,
      pageSize,
    },
  });
}

export function getExtendedRecruitmentDetail(params) {
  const { projectId, recruitId } = params;
  return request({
    url: "/ccdi/project/special-check/extended-query/recruitment/detail",
    method: "get",
    params: {
      projectId,
      recruitId,
    },
  });
}

export function getExtendedTransferList(params) {
  const { projectId, staffName, transferDateStart, transferDateEnd, pageNum, pageSize } = params;
  return request({
    url: "/ccdi/project/special-check/extended-query/transfer/list",
    method: "get",
    params: {
      projectId,
      staffName,
      transferDateStart,
      transferDateEnd,
      pageNum,
      pageSize,
    },
  });
}

export function getExtendedTransferDetail(params) {
  const { projectId, id } = params;
  return request({
    url: "/ccdi/project/special-check/extended-query/transfer/detail",
    method: "get",
    params: {
      projectId,
      id,
    },
  });
}

export function getIncreaseLendingList(params) {
  const { projectId, staffId, staffIdCard, approver, loanStartDate, loanEndDate, pageNum, pageSize } = params;
  return request({
    url: "/ccdi/project/special-check/increase-lending/list",
    method: "get",
    params: {
      projectId,
      staffId,
      staffIdCard,
      approver,
      loanStartDate,
      loanEndDate,
      pageNum,
      pageSize,
    },
  });
}
