|
@@ -98,6 +98,7 @@ export default {
|
|
|
defaultEndMonth: this.BaseTool.Moment().format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN),
|
|
|
queryParam: {
|
|
|
// year: 2021,
|
|
|
+ pageSize: 50,
|
|
|
startTime: this.BaseTool.Date.formatter(new Date(), this.BaseTool.Date.PICKER_NORM_YEAR) + '-01-01',
|
|
|
endTime: this.BaseTool.Moment().format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
},
|
|
@@ -107,25 +108,25 @@ export default {
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{
|
|
|
- title: '时间',
|
|
|
+ title: '备件名称',
|
|
|
width: 180,
|
|
|
- dataIndex: 'month',
|
|
|
+ dataIndex: 'spareName',
|
|
|
customRender: (text, record, index) => {
|
|
|
return record.year + '-' + text
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- title: '采购单总数',
|
|
|
+ title: '总数',
|
|
|
width: 120,
|
|
|
- dataIndex: 'num'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- key: 'action',
|
|
|
- width: '200px',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'action' }
|
|
|
+ dataIndex: 'totalNum'
|
|
|
}
|
|
|
+ // {
|
|
|
+ // title: '操作',
|
|
|
+ // key: 'action',
|
|
|
+ // width: '200px',
|
|
|
+ // align: 'center',
|
|
|
+ // scopedSlots: { customRender: 'action' }
|
|
|
+ // }
|
|
|
],
|
|
|
typeMap: {}
|
|
|
}
|
|
@@ -152,13 +153,13 @@ export default {
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
- data: this.chartsData.map(item => (item.year + '-' + item.month))
|
|
|
+ data: this.chartsData.map(item => item.spareName)
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
name: '采购单总数',
|
|
|
type: 'bar',
|
|
|
- data: this.chartsData.map(item => item.num),
|
|
|
+ data: this.chartsData.map(item => item.totalNum),
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
label: {
|
|
@@ -196,7 +197,7 @@ export default {
|
|
|
getData () {
|
|
|
getPurchaseFifityReportQuery(this.queryParam)
|
|
|
.then(res => {
|
|
|
- this.chartsData = res.data
|
|
|
+ this.chartsData = res.data.rows
|
|
|
})
|
|
|
},
|
|
|
doExport () {
|