|
@@ -42,14 +42,14 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
|
|
- <!-- <a-button
|
|
|
|
- style="margin: 0 0 18px 5px"
|
|
|
|
|
|
+ <a-button
|
|
|
|
+ style="margin-left: 5px"
|
|
type="primary"
|
|
type="primary"
|
|
class="button-warning"
|
|
class="button-warning"
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
- id="allocateBillList-export">导出</a-button> -->
|
|
|
|
|
|
+ id="allocateBillList-export">导出</a-button>
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
@@ -121,6 +121,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
import auditModal from '@/views/common/auditModal.vue'
|
|
import auditModal from '@/views/common/auditModal.vue'
|
|
import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
|
|
import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
|
|
import AllocateType from '@/views/common/allocateType.js'
|
|
import AllocateType from '@/views/common/allocateType.js'
|
|
|
|
+import { hdExportExcel } from '@/libs/exportExcel'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType },
|
|
components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType },
|
|
data () {
|
|
data () {
|
|
@@ -261,27 +262,15 @@ export default {
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
|
|
+ const _this = this
|
|
const params = this.queryParam
|
|
const params = this.queryParam
|
|
this.exportLoading = true
|
|
this.exportLoading = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- allocateBillExport(params).then(res => {
|
|
|
|
- this.exportLoading = false
|
|
|
|
- this.download(res)
|
|
|
|
- this.spinning = false
|
|
|
|
|
|
+ hdExportExcel(allocateBillExport, params, '调拨列表', function () {
|
|
|
|
+ _this.exportLoading = false
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- download (data) {
|
|
|
|
- if (!data) { return }
|
|
|
|
- const url = window.URL.createObjectURL(new Blob([data]))
|
|
|
|
- const link = document.createElement('a')
|
|
|
|
- link.style.display = 'none'
|
|
|
|
- link.href = url
|
|
|
|
- const a = moment().format('YYYYMMDDHHmmss')
|
|
|
|
- const fname = '调拨列表' + a
|
|
|
|
- link.setAttribute('download', fname + '.xlsx')
|
|
|
|
- document.body.appendChild(link)
|
|
|
|
- link.click()
|
|
|
|
- },
|
|
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|