import { ContentConfig } from "/@/components/PageContent";
import { httpList } from "/@/api/InvoiceSales/capitalClaim";

import dayjs from "dayjs";

const columns = [
  {
    type: "selection",
    width: 55,
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    label: "序号",
    type: "index",
    width: 70,
    hide: ({ checkList }) => !checkList.includes("序号列")
  },
  {
    label: "资金编号",
    prop: "tradNo",
    width: 150
  },
  {
    label: "付款单位账号",
    prop: "trade_account",
    width: 120
  },
  {
    label: "付款银行名称",
    prop: "trade_out",
    width: 120
  },
  {
    label: "付款账号",
    prop: "invoice_mobile",
    width: 120
  },
  {
    label: "汇款金额",
    prop: "total_fee",
    width: 140
  },
  {
    label: "收款单位名称",
    prop: "trade_in",
    width: 120
  },
  // {
  //   label: "收款银行名称",
  //   prop: "invoice_bankNo",
  //   width: 120
  // },
  // {
  //   label: "收款账号",
  //   prop: "apply_name",
  //   width: 100
  // },
  {
    label: "未核销",
    prop: "balance",
    width: 80
  },
  {
    label: "已核销",
    prop: "used_fee",
    width: 80
  },
  {
    label: "交易时间",
    prop: "addTime",
    formatter: ({ createTime }) =>
      dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
  },
  {
    label: "操作",
    fixed: "right",
    width: 120,
    slot: "operation"
  }
];

const contentConfig: ContentConfig = {
  title: "资金认领管理",
  columns,
  notPreview: true,
  apis: {
    httpList
  },
  powers: ["001", "002", "003", "004", "005", "006", "007", "008"]
};

export default contentConfig;
