import request from '@/utils/request';

export interface ContractLedgerReportQuery {
  pageNum: number;
  pageSize: number;
  customerContractCode?: string;
  internalContractCode?: string;
  projectCode?: string;
  businessDirection?: string;
  contractIdList?: Array<string | number>;
  params?: any;
}

export interface ContractLedgerReportVO {
  contractId: string | number;
  month: string;
  internalContractCode: string;
  externalContractCode: string;
  customerContractCode: string;
  contractDate: string;
  contractTerritorialFlag: string;
  contractTerritorialCountry: string;
  settlementCurrency: string;
  orderContractCode: string;
  projectContractCode: string;
  customerName: string;
  productName: string;
  mesnacContractPrice: number;
  totalPrice: number;
  paymentMethod: string;
  deliveryStart: string;
  warrantyPeriod: number;
  contractManagerName: string;
  contractDeptName: string;
  businessDirection: string;
  projectCode: string;
  projectName: string;
  managerName: string;
  typeName: string;
  finalCustomerName: string;
}

// 查询合同台账报表列表
export function listContractLedgerReport(query: ContractLedgerReportQuery) {
  return request({
    url: '/oa/erp/contractLedgerReport/list',
    method: 'get',
    params: query
  });
}

// 导出合同台账报表
export function exportContractLedgerReport(query: ContractLedgerReportQuery) {
  return request({
    url: '/oa/erp/contractLedgerReport/export',
    method: 'post',
    data: query
  });
}
