import {get, post, put, del} from '../http'

const financial = {
  getTransactionsPages(data) {
    return post('financial/getChargingTransactions', data)
  },
  getIdleFeesPages(data) {
    return post('financial/getIdleFees', data)
  },
  getTopUpPages(data) {
    return post('financial/getTopUps', data)
  },
  getPaymentOptions() {
    return get("financial/getPaymentStatus")
  },
  getSystemTransactionsPages(data) {
    return post("system-transaction/credits", data)
  },
  getCreditTypeOptions() {
    return get("system-transaction/credit-types")
  },
  getPaymentStatusOptions() {
    return get("system-transaction/payment-statuses")
  },
  getBillingAccountTypes() {
    return get("financial/billing-account/account-types")
  },
  getAdditionalItemTypes() {
    return get("financial/billing-account/billing-additional-item-types")
  },
  getBillingAccountPages(data) {
    return post("financial/billing-account/billing-account-pages", data)
  },
  addBillingAccount(data) {
    return post("financial/billing-account/billing-accounts", data)
  },
  viewBillingAccount(entityId) {
    return get("financial/billing-account/billing-accounts/" + entityId)
  },
  updateBillingAccount(data) {
    return put("financial/billing-account/billing-accounts", data)
  },
  deleteBillingAccount(entityId) {
    return del("financial/billing-account/billing-accounts/" + entityId)
  },
  deleteAdditionalItem(itemId) {
    return del("financial/billing-account/additional-items/" + itemId)
  },
  getAssignStatusOptions() {
    return get('financial/billing-account/assignment-statuses')
  },
  getAssignSitePages(data) {
    return post('financial/billing-account/assign-site-pages', data)
  },
  getAssignGroupPages(data) {
    return post('financial/billing-account/assign-group-pages', data)
  },
  assignEligible(data) {
    return post('financial/billing-account/assign-eligible', data)
  },
  unassignEligible(data) {
    return post('financial/billing-account/unassign-eligible', data)
  },
  getBillingAccountOptions(data) {
    return get("financial/billing-account/billing-account-select", data)
  },
  getAccountSettlementPages(data) {
    return post("financial/account-settlement/account-settlement-pages", data)
  },
  manualGenerationSettlement(data) {
    return post("financial/account-settlement/redo-account-settlement", data)
  },
  getBillingTypeOptions() {
    return get("dawn/api/v1/billing-type-select")
  },
  /*信用余额操作部分-Start*/
  getCreditTypeOptions() {
    return get("dawn/api/v1/credit-action-type-select")
  },
  getCreditStatusOptions() {
    return get("dawn/api/v1/credit_action_status-select")
  },
  getCreaitActionPages(data) {
    return post("dawn/api/v1/credit-action-pages", data)
  },
  createCreditApply(data) {
    return post("dawn/api/v1/credit-action-application", data)
  },
  approveCreditApply(data) {
    return put("dawn/api/v1/credit-action-application", data)
  },
  viewCreditApply(creditActionId) {
    return get("dawn/api/v1/credit-action-application/" + creditActionId)
  },
  /**
   * 获取用户列表(模糊查询)
   * @param {Object} data {email}
   */
  getUserOptions(data) {
    return get("dawn/api/v1/user-select", data)
  },
  /*信用余额操作部分-End*/
}

export default financial;