rev:销售单导出
This commit is contained in:
@@ -92,6 +92,17 @@
|
||||
>
|
||||
创建出库单
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -194,6 +205,8 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudGroup from '@/views/wms/basedata/material/material'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = {
|
||||
sale_id: null,
|
||||
@@ -241,6 +254,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
ViewDialog: false,
|
||||
showDtlLoading: false,
|
||||
openParam: null,
|
||||
permission: {},
|
||||
suppList: [],
|
||||
@@ -334,6 +348,15 @@ export default {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
downdtl() {
|
||||
this.showDtlLoading = true
|
||||
download('/api/salesorder/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '销售单', 'xlsx')
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user