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

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: "companyNo"
  },
  {
    label: "客户名称",
    prop: "companyName"
  },
  {
    label: "归属集团",
    prop: "parent"
  },
  {
    label: "创建时间",
    prop: "createTime",
    formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
  }
];

const contentConfig: ContentConfig = {
  title: "企业客户",
  powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
  columns,
  apis: {
    httpList
  }
};

export default contentConfig;
