代码更新
This commit is contained in:
@@ -72,7 +72,19 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-thumb"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -120,6 +132,8 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import crudInbillquery from '@/views/wms/stat/inbillquery/inbillquery'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'InQuery',
|
||||
@@ -139,7 +153,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
storlist: []
|
||||
storlist: [],
|
||||
showDtlLoading: false
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
@@ -157,7 +172,23 @@ export default {
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_IN_TYPE[row.bill_type]
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
const data = {
|
||||
'stor_id': this.crud.query.stor_id,
|
||||
'bill_type': this.crud.query.bill_type,
|
||||
'with': this.crud.query.with,
|
||||
'begin_time': this.crud.query.createTime[0],
|
||||
'end_time': this.crud.query.createTime[1]
|
||||
}
|
||||
download('/api/in/InQuery/download', data).then(result => {
|
||||
downloadFile(result, '成品入库查询', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,19 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-thumb"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -129,6 +141,8 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import crudOutbillquery from '@/views/wms/stat/outbillquery/outbillquery'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'OutQuery',
|
||||
@@ -148,7 +162,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
storlist: []
|
||||
storlist: [],
|
||||
showDtlLoading: false
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
@@ -166,7 +181,24 @@ export default {
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_OUT_TYPE[row.bill_type]
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
const data = {
|
||||
'stor_id': this.crud.query.stor_id,
|
||||
'bill_type': this.crud.query.bill_type,
|
||||
'with': this.crud.query.with,
|
||||
'customer_name': this.crud.query.customer_name,
|
||||
'begin_time': this.crud.query.createTime[0],
|
||||
'end_time': this.crud.query.createTime[1]
|
||||
}
|
||||
download('/api/out/OutQuery/download', data).then(result => {
|
||||
downloadFile(result, '成品出库查询', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user