<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: "InventoryBalanceEnRoute",
  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: '配置',  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:'LocationCode',label:'库位',optionsProc:'LocationCode',options:[]},
      ],
      searchForm:{
        ItemCode:"",
        LocationCode:"",
      },
      BottomFixedItem:['余额汇总'],
    };
  }
};
</script>