import { ContentConfig } from "/@/components/PageContent";
import { httpList } from "/@/api/parameter/supplierPay";

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: "code"
  },
  {
    label: "供应商名称",
    prop: "name"
  },
  {
    label: "公司类型",
    prop: "nature"
  },
  {
    label: "创建时间",
    prop: "createTime",
    formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
  }
];

const contentConfig: ContentConfig = {
  title: "供应商管理",
  columns,
  powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
  apis: {
    httpList
  }
};

export default contentConfig;
