/* eslint-disable prettier/prettier */
import { BeforeRequestType, ContentConfig } from "/@/components/PageContent";
import { isBeyondTime } from "/@/views/reportCollection/_utils";
import { createTooltip } from "/@/utils/tootip";
import apis from "./apis";

const columns = [
  {
    label: '仓库名称',
    minWidth: '180px',
    cellRenderer({ row }) {
      return createTooltip(row.name, "仓库编码 : " + row.wsm_code, 300, 'left')
    }
  },
  {
    label: '业务公司',
    minWidth: '175px',
    cellRenderer({ row }) {
      return createTooltip(row.companyName, "业务公司编码 : " + row.companyNo, 300, 'left')
    }
  },
  {
    label: '供应商公司',
    minWidth: '175px',
    cellRenderer({ row }) {
      return createTooltip(row.supplierName, "供应商编码 : " + row.supplierNo, 300, 'left')
    }
  },
  {
    label: '商品名称',
    minWidth: '175px',
    cellRenderer({ row }) {
      return createTooltip(row.good_name, "商品编码 : " + row.spuCode, 300, 'left')
    }
  },
  {
    prop: 'day_stock',
    label: '当日库存',
    minWidth: '90px'
  },
  {
    prop: 'wait_out_stock',
    label: '当日待出库存',
    minWidth: '90px'
  },
  {
    prop: 'usable_stock',
    label: '当日可用库存',
    minWidth: '100px'
  },
  {
    prop: 'wait_in_stock',
    label: '当日待入库存',
    minWidth: '90px'
  },
  {
    prop: 'day_send_num',
    label: '当日已发货数量',
    minWidth: '110px'
  },
  {
    prop: 'cgder',
    label: '采购员',
    minWidth: '105px'
  }
]


const contentConfig: ContentConfig = {
  columns,
  showTitle: false,
  responseCode: 1,
  superUserNoAction: false,
  // beforeRequestList(params) {
  // const { start, end } = params;
  // const beyondTime = isBeyondTime({ name: "下单时间", len: 30, start, end });
  // if (beyondTime) return BeforeRequestType.EMPTY
  // return BeforeRequestType.NEXT;
  // },
  apis: { httpList: apis.list }
};


export default contentConfig;
