rev:成品报废审核界面新增导出功能
This commit is contained in:
@@ -118,6 +118,16 @@
|
||||
>
|
||||
不通过
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -182,6 +192,8 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/st/inStor/productscrap/AddDialog'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'Productscrap',
|
||||
@@ -303,6 +315,22 @@ export default {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
const queryData = this.crud.query
|
||||
if (this.crud.query.createTime !== undefined) {
|
||||
queryData.begin_time = this.crud.query.createTime[0]
|
||||
queryData.end_time = this.crud.query.createTime[1]
|
||||
}
|
||||
download('/api/productscrap/download', queryData).then(result => {
|
||||
downloadFile(result, '成品报废审核', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user