import { ContentConfig } from "/@/components/PageContent";
import { createHttpRequset } from "../../../_http/createRequset";
import { xs_order_type_options } from "/@/utils/status";

const columns = [
  {
    prop: "addtime",
    label: "下单时间",
    minWidth: "155px"
  },
  {
    prop: "orderCode",
    label: "订单编号",
    minWidth: "155px"
  },
  {
    prop: "order_type",
    label: "商品类型",
    width: "100px",
    cellRenderer({ row }) {
      console.log(row);
      return (
        xs_order_type_options.find(({ value }) => value === row.order_type)
          ?.label || "--"
      );
    }
  },
  {
    prop: "cgdNo",
    label: "采购单编号",
    minWidth: "155px"
  },
  {
    prop: "company",
    label: "公司名称",
    minWidth: "155px"
  },
  {
    prop: "apply_name",
    label: "申请人",
    minWidth: "155px"
  },
  {
    prop: "apply_company",
    label: "部门",
    minWidth: "155px"
  },
  {
    prop: "status",
    label: "状态",
    minWidth: "155px"
  },
  {
    prop: "send_num",
    label: "出库总数",
    minWidth: "155px"
  },
  {
    prop: "cat",
    label: "商品分类",
    minWidth: "155px"
  },
  {
    prop: "good_code",
    label: "商品编码",
    minWidth: "155px"
  },
  {
    prop: "good_name",
    label: "商品名称",
    minWidth: "155px"
  },
  {
    prop: "companyName",
    label: "客户名称",
    minWidth: "155px"
  },
  {
    prop: "wsend_num",
    label: "未发货数量",
    minWidth: "155px"
  },
  {
    prop: "send_date",
    label: "应发货日期",
    minWidth: "155px"
  }
];

const contentConfig: ContentConfig = {
  notPagination: true,
  superUserNoAction: false,
  notNeedCompanyFilter: true,
  columns,
  apis: {
    httpList: createHttpRequset("seoona")
  }
};

export default contentConfig;
