<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: '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: '规格颜色', headerName:"规格/颜色", filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '库位', maxWidth:100, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: 'ERP储位', maxWidth:100, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '专案代码',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '专案代码描述',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '项目分类', maxWidth:100, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '项目分类描述',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '申请人', maxWidth:120, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '申请部门',  filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '实际发货人', maxWidth:115, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
        { field: '发料时间', maxWidth:180, valueFormatter: ((data)=>{return util.formatTimeStrToStr(data.value)}), 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:'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>