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

const columns = [
  {
    prop: 'apply_name',
    label: '创建人',
    minWidth: '155px'
  },
  {
    prop: 'depart',
    label: '创建人部门',
    minWidth: '155px'
  },
  {
    prop: 'addtime',
    label: '下单时间',
    minWidth: '155px'
  },

  {
    prop: 'orderCode',
    label: '订单号',
    minWidth: '155px'
  },
  {
    prop: 'first_customer_org',
    label: '一级企业',
    minWidth: '155px'
  },
  {
    prop: 'second_customer_org',
    label: '二级企业',
    minWidth: '155px'
  },
  {
    prop: 'customerName',
    label: '客户名称',
    minWidth: '155px'
  },
  {
    prop: 'good_name',
    label: '产品名称',
    minWidth: '155px'
  },
  {
    prop: 'good_num',
    label: '数量',
    minWidth: '155px'
  },
  {
    prop: 'unit',
    label: '单位',
    minWidth: '155px'
  },
  {
    prop: 'sale_price',
    label: '单价',
    minWidth: '155px'
  },
  {
    prop: 'total_price',
    label: '金额',
    minWidth: '155px'
  },
  {
    prop: 'arrive_time',
    label: '要求到货时间',
    minWidth: '155px'
  }
]


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


export default contentConfig;
