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: "name"
  },
  {
    label: "联系人",
    prop: "contector"
  },
  {
    label: "公司类型",
    prop: "nature"
  },
  {
    label: "联系方式",
    prop: "mobile"
  },
  {
    label: "地址",
    prop: "address"
  },
  {
    label: "创建时间",
    prop: "createTime",
    formatter: ({ createTime }) =>
      dayjs(createTime).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;
