|
@@ -17,8 +17,8 @@
|
|
|
placeholder="结束时间"
|
|
|
/>
|
|
|
<a-button style="margin-left: 8px" type="default" @click="getData()">查询</a-button>
|
|
|
- <!-- <a-button style="margin-left: 8px" type="primary" icon="printer" @click="handlePrint()">打印</a-button>
|
|
|
- <a-button style="margin-left: 8px" type="primary" @click="doExport()">导出</a-button> -->
|
|
|
+ <!-- <a-button style="margin-left: 8px" type="primary" icon="printer" @click="handlePrint()">打印</a-button>-->
|
|
|
+ <a-button style="margin-left: 8px" type="primary" @click="doExport()">导出</a-button>
|
|
|
</div>
|
|
|
<a-tab-pane loading="true" tab="图形统计" key="1">
|
|
|
<a-row>
|
|
@@ -41,7 +41,9 @@
|
|
|
:scroll="{x: 1000, y: BaseTool.Constant.scrollY }"
|
|
|
rowKey="month">
|
|
|
<span slot="action" slot-scope="record">
|
|
|
-
|
|
|
+ <a @click="handleView(record)">查看明细</a>
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a @click="doExportDetail(record)">导出</a>
|
|
|
</span>
|
|
|
</a-table>
|
|
|
</div>
|
|
@@ -50,13 +52,19 @@
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
</div>
|
|
|
+ <Detail ref="detail" />
|
|
|
+
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getPreparationReportGroupByStatus, getAllPreparationReport } from '@/api/preparation/preparation'
|
|
|
+import { getPreparationReportGroupByStatus, getAllPreparationReport, exportPreparationReportGroupByStatus, exportPreparationReportGroupByStatusDetail } from '@/api/preparation/preparation'
|
|
|
+import Detail from './modules/Detail.vue'
|
|
|
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ Detail
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
loading: false,
|
|
@@ -91,6 +99,13 @@ export default {
|
|
|
title: '个数',
|
|
|
width: 120,
|
|
|
dataIndex: 'num'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ key: 'action',
|
|
|
+ width: '200px',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -160,6 +175,11 @@ export default {
|
|
|
itemStyle: {
|
|
|
borderRadius: 8
|
|
|
},
|
|
|
+ label: {
|
|
|
+ formatter: '{b}: {c}',
|
|
|
+ fontSize: 16
|
|
|
+
|
|
|
+ },
|
|
|
data: this.chartsData2.map(item => {
|
|
|
return {
|
|
|
value: item.num,
|
|
@@ -187,8 +207,41 @@ export default {
|
|
|
this.chartsData1 = res[0].data
|
|
|
this.chartsData2 = res[1].data
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleView (record) {
|
|
|
+ console.log(record)
|
|
|
+ this.$refs.detail.base(record)
|
|
|
+ },
|
|
|
+ doExport () {
|
|
|
+ if (this.queryParam.startMonth) {
|
|
|
+ this.queryParam.startMonth = this.BaseTool.Date.formatter(this.queryParam.startMonth, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ }
|
|
|
+ if (this.queryParam.endMonth) {
|
|
|
+ this.queryParam.endMonth = this.BaseTool.Date.formatter(this.queryParam.endMonth, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ }
|
|
|
+ const parameter = {
|
|
|
+ ...this.queryParam
|
|
|
+ }
|
|
|
+ exportPreparationReportGroupByStatus(parameter).then(file => {
|
|
|
+ this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ doExportDetail (record) {
|
|
|
+ if (this.queryParam.startMonth) {
|
|
|
+ this.queryParam.startMonth = this.BaseTool.Date.formatter(this.queryParam.startMonth, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ }
|
|
|
+ if (this.queryParam.endMonth) {
|
|
|
+ this.queryParam.endMonth = this.BaseTool.Date.formatter(this.queryParam.endMonth, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ }
|
|
|
+ const parameter = {
|
|
|
+ ...this.queryParam,
|
|
|
+ status: record.status
|
|
|
|
|
|
+ }
|
|
|
+ exportPreparationReportGroupByStatusDetail(parameter).then(file => {
|
|
|
+ this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|