<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: "UnplannedIssueSummary",
  components: {
    reportPage
  },
  data () {
    return {
      columnDefs: [
        { field: '物品代码',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '物品名称',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '物品描述1',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '物品描述2',  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: '申请人',  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:'物料',optionsProc:'itemCode',options:[],optionsTS:[],rangeNumber:100,rangeSize:100},
        {type:'select',prop:'LocationErpCode',label:'ERP储位',optionsProc:'LocationErpCode',options:[]},
        {type:'select',prop:'UnplannedIssueType',label:'领料类别',optionsProc:'UnplannedIssueType',options:[]},
        {type:'date',prop:'beginDate',label:'起始'},
        {type:'date',prop:'endDate',label:'截止'},
      ],
      searchForm:{
        ItemCode:"",
        LocationErpCode:"",
        UnplannedIssueType:"",
        beginDate:"",
        endDate:'',
      },
      BottomFixedItem:['汇总数'],
    };
  }
};
</script>