diff --git a/jshERP-web/src/views/report/InOutStockReport.vue b/jshERP-web/src/views/report/InOutStockReport.vue
index 875f2969..3441da40 100644
--- a/jshERP-web/src/views/report/InOutStockReport.vue
+++ b/jshERP-web/src/views/report/InOutStockReport.vue
@@ -7,31 +7,22 @@
-
-
-
-
- {{ depot.depotName }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
查询
@@ -45,11 +36,25 @@
- 本月总结存:{{totalStockStr}},总结存金额:{{totalCountMoneyStr}}
+ 本期总结存:{{totalStockStr}},总结存金额:{{totalCountMoneyStr}}
-
+
+
+
+
+ {{ depot.depotName }}
+
+
+
+
+
@@ -107,7 +112,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@/api/manage'
import {queryMaterialCategoryTreeList} from '@/api/api'
- import { getMpListShort } from "@/utils/util"
+ import { getFormatDate, getMpListShort, getPrevMonthFormatDate } from '@/utils/util'
import JEllipsis from '@/components/jeecg/JEllipsis'
import moment from 'moment'
import Vue from 'vue'
@@ -131,7 +136,9 @@
},
queryParam: {
depotId:'',
- monthTime: moment().format('YYYY-MM'),
+ beginTime: getPrevMonthFormatDate(1),
+ endTime: getFormatDate(),
+ createTimeRange: [moment(getPrevMonthFormatDate(1)), moment(getFormatDate())],
materialParam:'',
categoryId:'',
mpList: getMpListShort(Vue.ls.get('materialPropertyList')) //扩展属性
@@ -160,17 +167,17 @@
{title: '扩展信息', dataIndex: 'materialOther', width: 80, ellipsis:true},
{title: '单位', dataIndex: 'unitName', width: 60, ellipsis:true},
{title: '成本价', dataIndex: 'unitPrice', sorter: (a, b) => a.unitPrice - b.unitPrice, width: 60},
- {title: '上月结存数量', dataIndex: 'prevSum', sorter: (a, b) => a.prevSum - b.prevSum, width: 80},
+ {title: '上期结存数量', dataIndex: 'prevSum', sorter: (a, b) => a.prevSum - b.prevSum, width: 80},
{title: '入库数量', dataIndex: 'inSum', sorter: (a, b) => a.inSum - b.inSum, width: 60},
{title: '出库数量', dataIndex: 'outSum', sorter: (a, b) => a.outSum - b.outSum, width: 60},
- {title: '本月结存数量', dataIndex: 'thisSum', sorter: (a, b) => a.thisSum - b.thisSum, width: 80,
+ {title: '本期结存数量', dataIndex: 'thisSum', sorter: (a, b) => a.thisSum - b.thisSum, width: 80,
scopedSlots: { customRender: 'customRenderStock' }
},
{title: '结存金额', dataIndex: 'thisAllPrice', sorter: (a, b) => a.thisAllPrice - b.thisAllPrice, width: 60}
],
url: {
- list: "/depotItem/findByAll",
- totalCountMoney: "/depotItem/totalCountMoney",
+ list: "/depotItem/getInOutStock",
+ totalCountMoney: "/depotItem/getInOutStockCountMoney",
exportXlsUrl: "/depotItem/exportExcel"
}
}
@@ -193,6 +200,13 @@
param.pageSize = this.ipagination.pageSize-1;
return param;
},
+ onDateChange: function (value, dateString) {
+ this.queryParam.beginTime=dateString[0]
+ this.queryParam.endTime=dateString[1]
+ if(dateString[0] && dateString[1]) {
+ this.queryParam.createTimeRange = [moment(dateString[0]), moment(dateString[1])]
+ }
+ },
getDepotData() {
getAction('/depot/findDepotByCurrentUser').then((res)=>{
if(res.code === 200){
@@ -243,7 +257,7 @@
},
exportExcel() {
let list = []
- let head = '条码,名称,规格,型号,扩展信息,单位,成本价,上月结存数量,入库数量,出库数量,本月结存数量,结存金额'
+ let head = '条码,名称,规格,型号,扩展信息,单位,成本价,上期结存数量,入库数量,出库数量,本期结存数量,结存金额'
for (let i = 0; i < this.dataSource.length; i++) {
let item = []
let ds = this.dataSource[i]
@@ -251,7 +265,7 @@
ds.prevSum, ds.inSum, ds.outSum, ds.thisSum, ds.thisAllPrice)
list.push(item)
}
- let tip = '月份:' + this.queryParam.monthTime
+ let tip = '库存周期:' + this.queryParam.beginTime + '~' + this.queryParam.endTime
this.handleExportXlsPost('进销存统计', '进销存统计', head, tip, list)
}
}