import { ContentConfig } from "/@/components/PageContent";
import { httpList } from "/@/api/netOrderEnter/netOrderEntry";
import { renderIconLabelLeft } from "/@/utils/columnRenderHelper";

const columns = [
  {
    type: "selection",
    width: 40,
    align: "center",
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    label: "序号",
    type: "index",
    minWidth: 60,
    align: "left",
    hide: ({ checkList }) => !checkList.includes("序号列")
  },
  {
    type: "expand",
    label: "",
    slot: "expand"
  },
  {
    prop: "orderCode",
    label: "销售订单编码",
    width: "150px"
    // fixed: "left",
  },
  {
    prop: "sale_name",
    label: "业务员",
    width: "70px"
  },
  // {
  //   prop: "khNo",
  //   label: "企业客户编码",
  //   width: "150px"
  // },
  {
    prop: "khName",
    label: "企业客户",
    "min-width": "190px",
    ...renderIconLabelLeft('khNo','khName','企业客户编码:')
  },
  // {
  //   prop: "companyNo",
  //   label: "销售公司编码",
  //   width: "150px"
  // },
  {
    prop: "companyName",
    label: "销售方公司",
    "min-width": "190px",
    ...renderIconLabelLeft('companyNo','companyName','销售方公司编码:')
  },

  {
    prop: "cgdNo",
    label: "采购单号",
    width: "165px"
  },
  // {
  //   prop: "supplierNo",
  //   label: "供应商编码",
  //   width: "150px"
  // },
  {
    prop: "supplierName",
    label: "供应商公司",
    "min-width": "190px",
    ...renderIconLabelLeft('supplierNo','supplierName','供应商公司编码:')
  },
  {
    prop: "ordertime",
    label: "创建时间",
    width: "140px"
  },
  {
    prop: "",
    label: "操作",
    width: "85px",
    slot: "operation",
    fixed: "right"
  }
];

const contentConfig: ContentConfig = {
  title: "订单对账查询",
  columns,
  superUserNoAction: true,
  apis: {
    httpList,
    httpAdd: true,
    httpUpdate: true
  }
};

export default contentConfig;
