1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
| <template>
| <div class="rightContent">
| <div class="top">
| <SearchCommonView
| :showAdd="false"
| :add-title="'新建'"
| :placeholder="'请输入产品名称或产品类别'"
| :amount-view="false"
| @searchClick="getList"
| :isDisabled="true"
| :showDownload="true"
| @downloadClick="downHttpClick"
| />
| </div>
| </div>
| </template>
|
| <script>
| import { downloadInventoryForms } from "@/api/downFile"
| import FileSaver from 'file-saver'
| import _ from 'lodash'
| export default {
| name: 'zhuangkouReport',
| data() {
| return {
|
| }
| },
| created() {
|
| },
| methods: {
| // 下载
| downHttpClick: _.debounce(function(){
| downloadInventoryForms({
| page: this.pagerOptions.currPage,
| pageSize: this.pagerOptions.pageSize,
| keyword:this.keyword,
| }).then(res => {
| if (res) {
| FileSaver.saveAs(res, '库存报表.xlsx');
| this.$message.success("下载成功!");
| }
| })
| }, 1000),
| },
| }
| </script>
|
| <style lang="scss" scoped>
|
| </style>
|
|