// 与业主关系
export const RELATION_SHIP = [
  {label: '业主', value: 'self'},
  {label: '租户', value: 'tenant'},
  {label: '亲人', value: 'relative'},
  {label: '朋友', value: 'friend'},
  {label: '其他', value: 'other'}
]

// 紧急程度
export const URGENT_DEGREE = [
  {label: '一般', value: 'usual'},
  {label: '紧急', value: 'urgent'}
]

// 是否定时发布
export const SCHEDULED_RELEASE = [
  {label: '是', value: 1},
  {label: '否', value: 0}
]

// 公告状态
export const NOTICE_STATUS = [
  {label: '已发布', value: 'published'},
  {label: '待发布', value: 'waitPublish'}
]

// 付费周期
export const CHARGING_CYCLE = [
  {label: '每月', value: '1'},
  {label: '每季度', value: '2'},
  {label: '每年', value: '3'},
  {label: '一次性付清', value: '4'},
  {label: '预付', value: '5'}
]

// 物业对账审核状态
export const COMPANY_AUDIT_STATUS = [
  {label: '物业待审核', value: 'companyWaitAudit'},
  {label: '物业审核通过', value: 'companyAuditPass'},
  {label: '物业审核驳回', value: 'companyRefuse'}
]

// 总平台对账审核状态
export const CENTRAL_AUDIT_STATUS = [
  {label: '总平台待审核', value: 'centralWaitAudit'},
  {label: '总平台审核通过', value: 'centralAuditPass'},
  {label: '总平台审核驳回', value: 'centralRefuse'}
]

// 分利对账审核状态
export const FENLICENTRAL_AUDIT_STATUS = [
  {label: '未对账', value: '1'},
  {label: '对账待审核', value: '2'},
  {label: '对账完成', value: '3'},
  {label: '对账拒绝', value: '4'}
]

// 分利对账結算状态
export const BALANCE_STATUS = [
  {label: '结算待审核', value: '2'},
  {label: '已结算', value: '3'},
  {label: '结算驳回', value: '4'}
]

// 总平台拨款状态
export const APPROPRIATION_STATUS = [
  {label: '待拨款', value: 'waitAppropriation'},
  {label: '拨款成功', value: 'appropriationed'}
]

// 退款状态
export const REFUND_STATUS = [
  {label: '已付款', value: 'paid'},
  {label: '退款待审核', value: 'refundWaitAudit'},
  {label: '退款驳回', value: 'refundReject'},
  {label: '退款中', value: 'refundRunning'},
  {label: '已退款', value: 'refunded'}
]

// 支付详情
export const PAY_WAY = [
  {label: '抵扣物业费', value: 'payPropertyFee'},
  {label: '申请退款', value: 'refundOrder'},
  {label: '扫码支付', value: 'scanQrCodePay'}
]

/**
 * 翻译字段值对应的文本
 * @param children
 * @returns string
 */
export function filterDictTextByStatic(dictList, value) {
  if(!dictList || dictList.length === 0){
    return;
  }
  let obj = dictList.find(item=>item.value == value)
  return obj ? obj.label : ''
}