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

const columns = [
  {
    prop: 'cgdNo',
    label: '采购单号',
    minWidth: '155px'
  },
  {
    prop: 'bkcode',
    label: '备库申请单号',
    minWidth: '155px'
  },
  {
    prop: 'wsm_code',
    label: '仓库编号',
    minWidth: '155px'
  },
  {
    prop: 'cgder',
    label: '采购员',
    minWidth: '80px'
  },
  {
    prop: 'spuCode',
    label: '商品编号',
    minWidth: '155px'
  },
  {
    prop: 'good_num',
    label: '采购数量',
    minWidth: '100px'
  },
  {
    prop: 'good_price',
    label: '采购单价',
    minWidth: '105px'
  },
  {
    prop: 'total_fee',
    label: '采购总额',
    minWidth: '95px'
  },
  {
    prop: 'nake_fee',
    label: '裸价费',
    minWidth: '95px'
  },
  {
    prop: 'supplierNo',
    label: '供应商编号',
    minWidth: '155px'
  },
  {
    prop: 'supplier_name',
    label: '供应商名称',
    minWidth: '155px'
  },
  {
    prop: 'companyNo',
    label: '业务公司编号',
    minWidth: '155px'
  },
  {
    prop: 'companyName',
    label: '业务公司名称',
    minWidth: '155px'
  },
  {
    prop: 'origin_total',
    label: '原采购总额',
    minWidth: '125px'
  },
  {
    prop: 'good_creater',
    label: '商品创建人',
    minWidth: '105px'
  },
  {
    prop: 'updatetime',
    label: '修改时间',
    minWidth: '155px'
  },
  {
    prop: 'addtime',
    label: '创建时间',
    minWidth: '155px'
  }
]


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;
