<template>
  <reportPage
    :columnList="columnDefs" 
    :searchConfig="searchConfig"
    :searchForm="searchForm"
    :BottomFixedItem="BottomFixedItem"
    :reportName="'供应商发货报表'"
    :procName="'Proc_供应商发货报表'"
  ></reportPage>
</template>
  
<script>
import reportPage from "@/components/reportPage/index"
import util from '@/utils/util'

export default {
  name: "SupplierDeliver",
  components: {
    reportPage
  },
  data () {
    return {
      columnDefs: [
        { field: '供应商编码',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '供应商名称',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '供应商描述',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: 'ERP料号',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '料号描述',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '批次',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '目检状态',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '创建时间',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '合格', type:"kiloNumber", cellClass:"rightAlign", valueFormatter: ((data)=>{return util.numberFixedFormatter(data.value,true)}), filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
      ],
      searchConfig:[
        {type:'selectExcess',prop:'ItemCode',label:'ERP料号',optionsProc:'itemCode',options:[],optionsTS:[],rangeNumber:100,rangeSize:100},
        {type:'date',prop:'beginDate',label:'起始'},
        {type:'date',prop:'endDate',label:'截止'},
      ],
      searchForm:{
        ItemCode:"",
        beginDate:"",
        endDate:'',
      },
      BottomFixedItem:['合格'],
    };
  }
};
</script>