add:半成品出入库导出功能

This commit is contained in:
2023-08-24 17:09:51 +08:00
parent 25c51f7c6c
commit 909766d20e
10 changed files with 166 additions and 6 deletions

View File

@@ -134,6 +134,17 @@
>
强制确认
</el-button>
<el-button
slot="right"
:loading="downloading"
class="filter-item"
type="warning"
icon="el-icon-download"
size="mini"
@click="downloadButton"
>
导出
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
@@ -203,6 +214,8 @@ import AddDialog from '@/views/wms/storage_manage/semiproduct/semiproductIn/AddD
import ViewDialog from '@/views/wms/storage_manage/semiproduct/semiproductIn/ViewDialog'
import { mapGetters } from 'vuex'
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
export default {
name: 'SemiproductIn',
@@ -237,6 +250,7 @@ export default {
currentRow: null,
storlist: [],
loadingAutodiv: false,
downloading: false,
storId: null
}
},
@@ -340,6 +354,16 @@ export default {
querytable() {
this.onSelectAll()
this.crud.toQuery()
},
downloadButton() {
this.downloading = true
download('/api/in/semiproductIn/download', this.query).then(result => {
debugger
downloadFile(result, '半成品入库单', 'xlsx')
this.downloading = false
}).catch(() => {
this.downloading = false
})
}
}
}

View File

@@ -134,6 +134,17 @@
>
强制确认
</el-button>
<el-button
slot="right"
:loading="downloading"
class="filter-item"
type="warning"
icon="el-icon-download"
size="mini"
@click="downloadButton"
>
导出
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
@@ -201,6 +212,8 @@ import AddDialog from '@/views/wms/storage_manage/semiproduct/semiproductout/Add
import ViewDialog from '@/views/wms/storage_manage/semiproduct/semiproductout/ViewDialog'
import { mapGetters } from 'vuex'
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
export default {
name: 'SemiproductOut',
@@ -235,6 +248,7 @@ export default {
loadingAutodiv: false,
currentRow: null,
storlist: [],
downloading: false,
storId: null
}
},
@@ -338,6 +352,15 @@ export default {
querytable() {
this.onSelectAll()
this.crud.toQuery()
},
downloadButton() {
this.downloading = true
download('/api/out/semiproduct/download', this.query).then(result => {
downloadFile(result, '半成品出库单', 'xlsx')
this.downloading = false
}).catch(() => {
this.downloading = false
})
}
}
}