|
@@ -42,13 +42,13 @@
|
|
|
tableLayout="auto"
|
|
|
:scroll="{x: 1, y: BaseTool.Constant.scrollY }"
|
|
|
rowKey="month">
|
|
|
- <!-- <span slot="action" slot-scope="record">
|
|
|
+ <span slot="action" slot-scope="record">
|
|
|
<template>
|
|
|
- <a @click="handleView(record)">查看明细</a>
|
|
|
- <a-divider type="vertical" />
|
|
|
+ <!-- <a @click="handleView(record)">查看明细</a> -->
|
|
|
+ <!-- <a-divider type="vertical" /> -->
|
|
|
<a @click="doExportDetail(record)">导出</a>
|
|
|
</template>
|
|
|
- </span> -->
|
|
|
+ </span>
|
|
|
</a-table>
|
|
|
</div>
|
|
|
</a-col>
|
|
@@ -63,7 +63,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getOutStoreFormReport, getInStoreFormReport } from '@/api/report/instoredetail'
|
|
|
+import { getOutStoreFormReport, getInStoreFormReport, exportOutSpareNum, exportInSpareNum } from '@/api/report/instoredetail'
|
|
|
import { Chart } from '@antv/g2'
|
|
|
import PrintInRepairReport from '@/views/dashboard/modules/PrintInRepairReport'
|
|
|
// import DetailRepairReport from '@/views/dashboard/modules/DetailRepairReport'
|
|
@@ -116,14 +116,14 @@ export default {
|
|
|
title: '数量',
|
|
|
width: 120,
|
|
|
dataIndex: 'num'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ key: 'action',
|
|
|
+ width: 120,
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
}
|
|
|
- // {
|
|
|
- // title: '操作',
|
|
|
- // key: 'action',
|
|
|
- // width: '200px',
|
|
|
- // align: 'center',
|
|
|
- // scopedSlots: { customRender: 'action' }
|
|
|
- // }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
@@ -195,16 +195,24 @@ export default {
|
|
|
// this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
// })
|
|
|
// },
|
|
|
- // doExportDetail (record) {
|
|
|
- // const parameter = {
|
|
|
- // ...this.queryParam,
|
|
|
- // month: record.month,
|
|
|
- // year: record.year
|
|
|
- // }
|
|
|
- // exportMonthReportBig24Month(parameter).then(file => {
|
|
|
- // this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
- // })
|
|
|
- // },
|
|
|
+ doExportDetail (record) {
|
|
|
+ console.log(record)
|
|
|
+ const parameter = {
|
|
|
+ startMonth: record.month,
|
|
|
+ year: record.year
|
|
|
+ }
|
|
|
+ if (this.searchType === 1) {
|
|
|
+ exportInSpareNum(parameter)
|
|
|
+ .then(file => {
|
|
|
+ this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ exportOutSpareNum(parameter)
|
|
|
+ .then(file => {
|
|
|
+ this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
handlePrint (record) {
|
|
|
const modal = this.$refs.basePrintModal
|
|
|
this.visible = false
|