Browse Source

分页+汇总同步处理

faster_AG_grid
安虹睿 1 year ago
parent
commit
de020929fe
  1. 28
      PC/UI.WinIn.FasterZ.AgGridReport/src/api/api.js
  2. 116
      PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue
  3. 6
      PC/UI.WinIn.FasterZ.AgGridReport/src/components/reportPage/index.vue
  4. 49
      PC/UI.WinIn.FasterZ.AgGridReport/src/components/reportPageHeader/index.vue
  5. 24
      PC/UI.WinIn.FasterZ.AgGridReport/src/router/index.js
  6. 29
      PC/UI.WinIn.FasterZ.AgGridReport/src/views/Home.vue
  7. 57
      PC/UI.WinIn.FasterZ.AgGridReport/src/views/inventoryAndAge.vue
  8. 56
      PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/inventoryAndAge.vue
  9. 49
      PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/inventoryERPWMS.vue
  10. 57
      PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/inventoryTrans.vue
  11. 52
      PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/procureHasPOReport.vue

28
PC/UI.WinIn.FasterZ.AgGridReport/src/api/api.js

@ -1,29 +1,41 @@
import axiosUtil from '@/utils/request'
let baseURL = window.SITE_CONFIG['apiURL']
let procApi = baseURL + '/api/app/report-proc/execute-procedure-by-sql?procName='
let procApi = baseURL + '/api/app/report-proc/execute-procedure-by-proc?procName='
// 通用获取页面数据
export function getReportPageList(procName, data) {
return axiosUtil.ajax_post(
procApi+procName,
data
)
return axiosUtil.ajax_post(procApi+procName,data)
}
// 获取物料
// 获取 物料
export function getItemCodeList() {
return axiosUtil.ajax_post(procApi+'Proc_Zheng_InputWhere_ItemCode',{})
}
// 获取库位组
// 获取 ERP库位
export function getLocationErpCodeList() {
return axiosUtil.ajax_post(procApi+'Proc_Zheng_InputWhere_LocationErpCode',{})
}
// 获取 库位组
export function getLocationGroupCodeList() {
return axiosUtil.ajax_post(procApi+'Proc_Zheng_InputWhere_LocationGroupCode',{})
}
// 获取状态
// 获取 状态
export function getInventoryStatusList() {
return axiosUtil.ajax_post(procApi+'Proc_Zheng_InputWhere_InventoryBalance_Status',{})
}
// 获取 事务分类
export function getTransTypeList() {
return axiosUtil.ajax_post(procApi+'Proc_Zheng_InputWhere_TransType',{})
}
// 获取 供应商
export function getSupplierCodeList() {
return axiosUtil.ajax_post(procApi+'Proc_Zheng_InputWhere_SupplierCode',{})
}

116
PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue

@ -1,14 +1,31 @@
<template>
<AgGridVue
:style="`width: 100%; height: ${tableHeight}`"
class="ag-theme-alpine"
:columnDefs="columnDefs"
@grid-ready="onGridReady"
:defaultColDef="defaultColDef"
:suppressDragLeaveHidesColumns="true"
:columnResized="columnResized"
@filterChanged="onFloatingFilterChanged"
></AgGridVue>
<div class="AgTableComponent">
<AgGridVue
:style="`width: 100%; height: ${tableHeight}`"
class="ag-theme-alpine"
:columnDefs="columnDefs"
@grid-ready="onGridReady"
:defaultColDef="defaultColDef"
:suppressDragLeaveHidesColumns="true"
:columnResized="columnResized"
@filterChanged="onFilterAndSortChanged"
@sortChanged="onFilterAndSortChanged"
:pagination="true"
:suppressPaginationPanel="true"
></AgGridVue>
<div class="paginationContent">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="pageSizes"
:page-size="currentPageSize"
:current-page="currentPage"
layout="total, sizes, prev, pager, next, jumper"
:total="pageTotal">
</el-pagination>
</div>
</div>
</template>
<script>
import "ag-grid-community/styles/ag-grid.css";
@ -36,7 +53,6 @@ export default {
gridApi: null,
gridColumnApi: null,
defaultColDef: {
flex: 1,
filter: true,
sortable: true,
floatingFilter: true,
@ -46,21 +62,43 @@ export default {
autoHeight:true
},
tableHeight:null,
// pagination: true, //
// paginationAutoPageSize: true, //
pageSizes:[10, 100, 300, 500, 1000, 3000, 5000, 10000],
pageTotal:null,
currentPage:1,
currentPageSize:100,
allPageData:null,//
};
},
mounted(){
this.setTableHeight()
},
methods: {
//
onFloatingFilterChanged(data){
const allData = [];
data.api.forEachNodeAfterFilter(node => {
allData.push(node.data)
//
handleSizeChange(value){
this.currentPageSize = Number(value)
this.gridApi.paginationSetPageSize(Number(value));
this.setTableTotal(this.gridApi)
},
//
handleCurrentChange(value){
this.currentPage = Number(value)
this.gridApi.paginationGoToPage(Number(value) - 1);
this.setTableTotal(this.gridApi)
},
//
getCurrentPageData(gridApi){
this.allPageData = [];
gridApi.forEachNodeAfterFilterAndSort(node => {
this.allPageData.push(node.data)
});
this.setTableTotal(allData)
let _begin = (this.currentPage - 1) * this.currentPageSize
let _end = this.currentPage * this.currentPageSize
let _pageData = this.allPageData.slice(_begin,_end)
return _pageData
},
//
onFilterAndSortChanged(data){
this.setTableTotal(data.api)
},
//
columnResized(event){
@ -69,30 +107,38 @@ export default {
}
},
//
setTableTotal(list) {
setTableTotal(gridApi) {
if(!this.BottomFixedItem || this.BottomFixedItem.length <= 0)return
let result = [{}]
this.BottomFixedItem.forEach(item=>{
result[0][item] = 0
})
list.forEach((item,key) => {
let _pageData = this.getCurrentPageData(gridApi)
_pageData.forEach((item,key) => {
for(let o in item){
// if(o == ''){
// //
// }
if(this.BottomFixedItem.indexOf(o) >= 0){
result[0][o] += item[o]
}
}
});
console.log(127,result)
this.pageTotal = this.allPageData.length
this.gridApi.setPinnedBottomRowData(result);
},
//
setTableHeight(){
let _headerH = document.getElementsByClassName('reportPageHeader')[0].clientHeight + 10
this.tableHeight = `calc(100% - ${_headerH}px)`
let _headerH = document.getElementsByClassName('reportPageHeader')[0].clientHeight
let _footH = 50;
let _outH = _headerH + _footH
this.tableHeight = `calc(100vh - ${_outH}px)`
},
// table
updateTableData(data){
this.gridApi.setRowData(data)
this.setTableTotal(data)
this.setTableTotal(this.gridApi)
this.gridApi.resetRowHeights();
},
// agGrid
@ -104,18 +150,20 @@ export default {
};
</script>
<style lang="less">
.ag-theme-alpine{
.AgTableComponent{
.ag-theme-alpine{
// --ag-header-foreground-color: white;
// --ag-header-background-color: #5a81b7;
// --ag-header-cell-hover-background-color: #5a81b7;
// --ag-header-cell-moving-background-color: #5a81b7;
// --ag-border-color:#4d709f;
--ag-header-foreground-color: white;
--ag-header-background-color: #5a81b7;
--ag-header-cell-hover-background-color: #5a81b7;
--ag-header-cell-moving-background-color: #5a81b7;
--ag-border-color:#4d709f;
--ag-header-foreground-color: #333;
--ag-header-background-color: #f2f2f2;
--ag-header-cell-hover-background-color: #f2f2f2;
--ag-header-cell-moving-background-color: #f2f2f2;
--ag-border-color:#cecece;
.ag-floating-filter-input .ag-input-field-input{
color:#333 !important
@ -156,5 +204,13 @@ export default {
padding-top:5px;
padding-bottom:5px
}
}
.paginationContent{
padding:0 20px;
display:flex;
height:50px;
justify-content:flex-end;
align-items:center;
}
}
</style>

6
PC/UI.WinIn.FasterZ.AgGridReport/src/components/reportPage/index.vue

@ -11,9 +11,9 @@
:showReportTitle="showReportTitle"
></reportPageHeader>
<AgTable
ref="AgTable_Ref"
:columnDefs="columnList"
:BottomFixedItem="BottomFixedItem"
ref="AgTable_Ref"
:columnDefs="columnList"
:BottomFixedItem="BottomFixedItem"
></AgTable>
</div>
</template>

49
PC/UI.WinIn.FasterZ.AgGridReport/src/components/reportPageHeader/index.vue

@ -47,7 +47,7 @@
v-model="searchForm[item.prop]"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-ddTHH:mm:ss"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item>
@ -77,8 +77,11 @@ import columnFilter from "@/components/columnFilter/index"
import exportExcel from "@/components/exportExcel/index"
import {
getItemCodeList,
getLocationErpCodeList,
getLocationGroupCodeList,
getInventoryStatusList
getInventoryStatusList,
getTransTypeList,
getSupplierCodeList
} from '@/api/api'
export default {
name: "reportPageHeader",
@ -142,6 +145,14 @@ export default {
item.opV="ItemCode"
})
}
// ERP
if(item.optionsProc == 'ErpLocationCode'){
getLocationErpCodeList().then(res=>{
item.options = res
item.opL="ErpLocationCode"
item.opV="ErpLocationCode"
})
}
//
if(item.optionsProc == 'LocationGroupCode'){
getLocationGroupCodeList().then(res=>{
@ -153,12 +164,29 @@ export default {
//
if(item.optionsProc == 'InventoryStatus'){
getInventoryStatusList().then(res=>{
res.forEach(res_item=>res_item.sValue = String(res_item.Value))
res.forEach(res_item=>res_item.sValue = String(res_item['value'.toUpperCase()]))
item.options = res
item.opL='key'.toUpperCase()
item.opV="sValue"
})
}
//
if(item.optionsProc == 'TransType'){
getTransTypeList().then(res=>{
res.forEach(res_item=>res_item.sValue = String(res_item['value'.toUpperCase()]))
item.options = res
item.opL="Key"
item.opL='key'.toUpperCase()
item.opV="sValue"
})
}
//
if(item.optionsProc == 'SupplierCode'){
getSupplierCodeList().then(res=>{
item.options = res
item.opL='SupplierCode'
item.opV="SupplierCode"
})
}
}
})
},
@ -184,7 +212,9 @@ export default {
</script>
<style scope lang="less">
.reportPageHeader{
background:#2d568e;
// background:#2d568e;
background:#eaf0f6;
.FormHeader{
padding:20px 20px 0;
@ -200,14 +230,15 @@ export default {
}
}
.el-form-item__label{
color:#fff
}
// .el-form-item__label{
// color:#fff
// }
}
.reportTitle{
background:#044c93;
color:#fff;
line-height:40px;
line-height:50px;
text-align:center;
font-size:16px;
font-weight:bold;

24
PC/UI.WinIn.FasterZ.AgGridReport/src/router/index.js

@ -1,7 +1,10 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import inventoryAndAge from '../views/inventoryAndAge.vue'
import inventoryAndAge from '../views/report/inventoryAndAge.vue'
import inventoryERPWMS from '../views/report/inventoryERPWMS.vue'
import inventoryTrans from '../views/report/inventoryTrans.vue'
import procureHasPOReport from '../views/report/procureHasPOReport.vue'
Vue.use(VueRouter)
@ -12,10 +15,29 @@ const routes = [
component: Home
},
{
title:"库存库龄报表",
path: '/inventoryAndAge',
name: 'inventoryAndAge',
component: inventoryAndAge
},
// {
// title:"库存余额_ERP-WMS差异报表",
// path: '/inventoryERPWMS',
// name: 'inventoryERPWMS',
// component: inventoryERPWMS
// },
// {
// title:"库存事务报表",
// path: '/inventoryTrans',
// name: 'inventoryTrans',
// component: inventoryTrans
// },
{
title:"采购收货/采购退货-有PO",
path: '/procureHasPOReport',
name: 'procureHasPOReport',
component: procureHasPOReport
},
]
const router = new VueRouter({

29
PC/UI.WinIn.FasterZ.AgGridReport/src/views/Home.vue

@ -1,18 +1,39 @@
<template>
<div>home</div>
<div class="menuList">
<div
class="menuItem"
v-for="(item,index) in menuList"
:key="index"
@click="goPage(item.path)"
>{{item.title || item.name}}</div>
</div>
</template>
<script>
export default {
name: "home",
data () {
return {
menuList:""
};
},
mounted(){
this.menuList = this.$router.options.routes
console.log(this.menuList)
},
methods: {
goPage(url){
this.$router.push(url)
},
},
};
</script>
<style>
<style lang="less" scoped>
.menuList{
padding:20px;
.menuItem{
cursor: pointer;
padding:10px;
border-bottom:#e8e8e8 solid 1px
}
}
</style>

57
PC/UI.WinIn.FasterZ.AgGridReport/src/views/inventoryAndAge.vue

@ -1,57 +0,0 @@
<template>
<reportPage
:columnList="columnDefs"
:searchConfig="searchConfig"
:searchForm="searchForm"
:reportName="'库存库龄报表'"
:BottomFixedItem="BottomFixedItem"
:procName="'Proc_Zheng_库存库龄'"
:showReportTitle="false"
></reportPage>
</template>
<script>
import reportPage from "@/components/reportPage/index"
import util from '@/utils/util'
export default {
name: "inventoryAndAge",
components: {
reportPage
},
data () {
const numberFormatter = (item) =>{
return Number(item.value).toFixed(2);
}
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: '总数', cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '<=30天', cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '31-180天', cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '181-240天', cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '241-300天', cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '301-360天', cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '>=361天', cellClass: 'rightAlign', valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '单位', cellClass:"centerAlign", filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '状态', cellClass:"centerAlign", filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true }},
],
searchConfig:[
{type:'select',prop:'ItemCode',label:'物料',optionsProc:'itemCode'},
{type:'select',prop:'LocationGroupCode',label:'库位组',optionsProc:'LocationGroupCode'},
{type:'select',prop:'InventoryStatus',label:'状态',optionsProc:'InventoryStatus'},
],
searchForm:{
ItemCode:'',
LocationGroupCode:'',
InventoryStatus:"",
},
BottomFixedItem:['总数','<=30天','31-180天','181-240天','241-300天','301-360天','>=361天']
};
},
};
</script>

56
PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/inventoryAndAge.vue

@ -0,0 +1,56 @@
<template>
<reportPage
:columnList="columnDefs"
:searchConfig="searchConfig"
:searchForm="searchForm"
:reportName="'库存库龄报表'"
:BottomFixedItem="BottomFixedItem"
:procName="'Proc_Zheng_库存库龄'"
></reportPage>
</template>
<script>
import reportPage from "@/components/reportPage/index"
import util from '@/utils/util'
export default {
name: "inventoryAndAge",
components: {
reportPage
},
data () {
const numberFormatter = (item) =>{
return Number(item.value).toFixed(2);
}
return {
columnDefs: [
{ field: '物料代码', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料名称', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述1', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述2', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '库位组', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '总数', flex:1, cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '<=30天', flex:1, cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '31-180天', flex:1, cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '181-240天', flex:1, cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '241-300天', flex:1, cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '301-360天', flex:1, cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '>=361天', flex:1, cellClass: 'rightAlign', valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '单位', flex:1, cellClass:"centerAlign", filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '状态', flex:1, cellClass:"centerAlign", filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true }},
],
searchConfig:[
{type:'select',prop:'ItemCode',label:'物料',optionsProc:'itemCode'},
{type:'select',prop:'LocationGroupCode',label:'库位组',optionsProc:'LocationGroupCode'},
{type:'select',prop:'InventoryStatus',label:'状态',optionsProc:'InventoryStatus'},
],
searchForm:{
ItemCode:'',
LocationGroupCode:'',
InventoryStatus:"",
},
BottomFixedItem:['总数','<=30天','31-180天','181-240天','241-300天','301-360天','>=361天']
};
},
};
</script>

49
PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/inventoryERPWMS.vue

@ -0,0 +1,49 @@
<template>
<reportPage
:columnList="columnDefs"
:searchConfig="searchConfig"
:searchForm="searchForm"
:reportName="'库存余额_ERP-WMS差异报表'"
:BottomFixedItem="BottomFixedItem"
:procName="'Proc_Zheng_库存余额_erp与wms差异'"
></reportPage>
</template>
<script>
import reportPage from "@/components/reportPage/index"
import util from '@/utils/util'
export default {
name: "inventoryERPWMS",
components: {
reportPage
},
data () {
const numberFormatter = (item) =>{
return Number(item.value).toFixed(2);
}
return {
columnDefs: [
{ field: '物料代码', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料名称', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述1', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述2', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: 'ERP库位', cellClass:"centerAlign", width:150, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: 'ERP数量', cellClass:"rightAlign", width:200, valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: 'WMS数量', cellClass:"rightAlign", width:200, valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '差异', cellClass:"rightAlign", width:200, valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '单位', cellClass:"centerAlign", width:150, suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
],
searchConfig:[
{type:'select',prop:'ItemCode',label:'物料',optionsProc:'itemCode'},
{type:'select',prop:'ErpLocationCode',label:'ERP库位',optionsProc:'ErpLocationCode'},
],
searchForm:{
ItemCode:'',
ErpLocationCode:'',
},
BottomFixedItem:['ERP数量','WMS数量','差异']
};
},
};
</script>

57
PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/inventoryTrans.vue

@ -0,0 +1,57 @@
<template>
<reportPage
:columnList="columnDefs"
:searchConfig="searchConfig"
:searchForm="searchForm"
:reportName="'库存事务报表'"
:BottomFixedItem="BottomFixedItem"
:procName="'Proc_Zheng_库存事务'"
></reportPage>
</template>
<script>
import reportPage from "@/components/reportPage/index"
import util from '@/utils/util'
export default {
name: "inventoryERPWMS",
components: {
reportPage
},
data () {
const numberFormatter = (item) =>{
return Number(item.value).toFixed(2);
}
return {
columnDefs: [
{ field: '物料代码', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料名称', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述1', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述2', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ headerName:'库位组代码', field: '库位组', width:200, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '数量', cellClass:"rightAlign", width:200, valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '单位', cellClass:"centerAlign", width:150, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '状态', cellClass:"centerAlign", width:150, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ headerName:'事务分类', field: '类型', width:150, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
],
searchConfig:[
{type:'select',prop:'ItemCode',label:'物料',optionsProc:'itemCode'},
{type:'select',prop:'LocationGroupCode',label:'库位组',optionsProc:'LocationGroupCode'},
{type:'select',prop:'InventoryStatus',label:'状态',optionsProc:'InventoryStatus'},
{type:'select',prop:'TransType',label:'事务分类',optionsProc:'TransType'},
{type:'date',prop:'beginDate',label:'起始'},
{type:'date',prop:'endDate',label:'截止'},
],
searchForm:{
ItemCode:'',
TransType:'',
LocationGroupCode:'',
InventoryStatus:'',
beginDate:'',
endDate:'',
},
BottomFixedItem:['数量']
};
},
};
</script>

52
PC/UI.WinIn.FasterZ.AgGridReport/src/views/report/procureHasPOReport.vue

@ -0,0 +1,52 @@
<template>
<reportPage
:columnList="columnDefs"
:searchConfig="searchConfig"
:searchForm="searchForm"
:reportName="'采购收货/采购退货(有PO)'"
:BottomFixedItem="BottomFixedItem"
:procName="'Proc_Zheng_采购收货_采购退货_有po'"
></reportPage>
</template>
<script>
import reportPage from "@/components/reportPage/index"
import util from '@/utils/util'
export default {
name: "inventoryAndAge",
components: {
reportPage
},
data () {
const numberFormatter = (item) =>{
return Number(item.value).toFixed(2);
}
return {
columnDefs: [
{ field: '供应商代码', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料代码', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料名称', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述1', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '物料描述2', flex:1, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '收货数量', width:200, cellClass:"rightAlign", valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '退货数量', width:200, cellClass: 'rightAlign', valueFormatter: numberFormatter, filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
{ field: '单位', width:150, cellClass:"centerAlign", filter: 'agTextColumnFilter', suppressMenu: true, floatingFilterComponentParams: { suppressFilterButton: true } },
],
searchConfig:[
{type:'select',prop:'ItemCode',label:'物料',optionsProc:'itemCode'},
{type:'select',prop:'SupplierCode',label:'供应商',optionsProc:'SupplierCode'},
{type:'date',prop:'beginDate',label:'起始'},
{type:'date',prop:'endDate',label:'截止'},
],
searchForm:{
ItemCode:'',
SupplierCode:'',
beginDate:"",
endDate:'',
},
BottomFixedItem:['收货数量','退货数量']
};
},
};
</script>
Loading…
Cancel
Save