import { httpList, httpStatus } from "/@/api/serviceParam/workCompany";

import { h } from "vue";
import dayjs from "dayjs";
import { ContentConfig } from "/@/components/PageContent";
import { ElTag } from "element-plus";
import { renderIconLabelLeft } from "/@/utils/columnRenderHelper";

const columns = [
  {
    prop: "companyNo",
    label: "编号",
    width: "170px",
  },

  {
    prop: "company",
    label: "公司名称",
    minWidth:'200px'
  },
  {
    prop:'invoice_title',
    label:'公司抬头',
    minWidth:'200px'
  },
  {
    label: "状态",
    prop: "status",
    width: 100,
    cellRenderer: ({ row }) => {
      return h(
        ElTag,
        {
          type: String(row.status) === "1" ? "success" : "danger"
        },
        {
          default: () => (String(row.status) === "1" ? "启用" : "禁用")
        }
      );
    }
  },
  {
    prop: "creater",
    label: "创建人",
    width: "100px",
  },
  {
    prop: "addtime",
    label: "创建时间",
    width: "145px",
  },
  {
    prop: "",
    label: "操作",
    fixed: "right",
    width: "140px",
    _noset_: true,
    slot: "operation",
  },
];

const contentConfig: ContentConfig = {
  title: "公司账号角色查询",
  columns,
  apis: {
    httpList,
    httpAdd: true,
    httpStatus,
    httpUpdate: true
  }
};

export default contentConfig;
