|
@@ -18,6 +18,13 @@
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOutOfStock-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseOutOfStock-reset">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ id="inventoryWarningList-export-btn">导出</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -54,9 +61,10 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import { outOfStockList } from '@/api/oos'
|
|
|
+import { outOfStockList, outOfStockExportDetail } from '@/api/oos'
|
|
|
import custList from '@/views/common/custList.vue'
|
|
|
import detailModal from './detailModal.vue'
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
export default {
|
|
|
name: 'PurchaseOutOfStock',
|
|
|
components: { STable, VSelect, rangeDate, custList, detailModal },
|
|
@@ -74,6 +82,7 @@ export default {
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
tableHeight: 0,
|
|
|
time: [],
|
|
|
+ exportLoading: false, // 导出loading
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -111,6 +120,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 导出
|
|
|
+ handleExport () {
|
|
|
+ const _this = this
|
|
|
+ _this.exportLoading = true
|
|
|
+ outOfStockExportDetail(_this.queryParam).then(res => {
|
|
|
+ downloadExcel(res, '采购缺货列表')
|
|
|
+ _this.exportLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
// 关闭详情弹窗
|
|
|
closeModal () {
|
|
|
this.openModal = false
|