'工序库位+报表'

This commit is contained in:
Fanzink
2022-03-06 19:36:26 +08:00
parent 82f44b5a62
commit 97997681a2
14 changed files with 376 additions and 193 deletions

View File

@@ -4,7 +4,7 @@
* @Author: fzq
* @Date: 2022-03-04 20:54:54
* @LastEditors: fzq
* @LastEditTime: 2022-03-05 15:43:29
* @LastEditTime: 2022-03-06 19:32:34
-->
<template>
<div class="app-container">
@@ -13,6 +13,7 @@
:key-name="keyName"
:show-add="false"
@getDataList="getList"
@downl="downl"
/>
<base-table
:page="listQuery.current"
@@ -40,10 +41,10 @@
</template>
<script>import i18n from '@/lang'
import HeadForm from '@/components/basicData/HeadForm'
import HeadForm from './components/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import { list } from '@/api/report-manage/report'
import { list, download } from '@/api/report-manage/report'
import substrateBtn from './components/substrateBtn.vue'
/**
* 表格表头配置项 TypeScript接口注释
@@ -141,7 +142,8 @@ export default {
listLoading: true,
listQuery: {
current: 1,
size: 10
size: 10,
enabled: 1
}
}
},
@@ -176,7 +178,7 @@ export default {
getList(key) {
this.listLoading = true
this.listQuery.code = key
console.log(this.listQuery)
// console.log(this.listQuery)
list(this.listQuery).then(response => {
console.log(response)
if (response.data) {
@@ -187,6 +189,25 @@ export default {
// this.total = response.data.total
this.listLoading = false
})
},
downl(key) {
this.listLoading = true
this.listQuery.code = key
// console.log(this.listQuery)
download(this.listQuery).then(res => {
console.log(res)
// const fileName = `${+new Date()}.xlsx`
// const blob = new Blob([res], { type: 'application/vnd.ms-excel;charset=utf-8' })
// if (navigator.msSaveBlob) {
// navigator.msSaveBlob(blob, fileName)
// } else {
// const link = document.createElement('a')
// link.href = URL.createObjectURL(blob)
// link.download = fileName
// link.click()
// URL.revokeObjectURL(link.href)
// }
})
}
// 新增 / 修改
// addNew(id) {