/**
 * 资金认领详情
 */

import { ElTag } from "element-plus";
import { h } from "vue";
import { DescriptionColumns } from "/@/components/BasicDescriptions";

//资金认领审核状态
export const CAPITAL_STATUS = [
  {
    value: "1",
    label: "待审批"
  },
  {
    value: "2",
    label: "审批通过"
  },
  {
    value: "3",
    label: "审批驳回"
  }
];

//认领详情描述列表

export const CAPITAL_COLUMNS: DescriptionColumns = [
  {
    field: "tradNo",
    label: "资金编号"
  },
  {
    field: "logNo",
    label: "认领编号"
  },
  {
    field: "trade_time",
    label: "交易时间"
  },
  {
    field: "total_fee",
    label: "总金额"
  },
  {
    field: "status",
    label: "资金认领审核状态",
    render(status) {
      return h(ElTag, null, {
        default: () =>
          CAPITAL_STATUS.find(s => s.value === status)?.label || "---"
      });
    }
  },
  {
    field: "addtime",
    label: "认领时间"
  },
  {
    field: "trade_out",
    label: "付款公司"
  },
  {
    field: "trade_bank",
    label: "银行"
  },
  {
    field: "balance",
    label: "资金余额"
  },
  {
    field: "used_fee",
    label: "资金使用金额"
  },
  {
    field: "remark",
    label: "备注"
  }
];
