|
@@ -47,6 +47,14 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ class="button-warning"
|
|
|
+ id="inventoryWarningList-export-btn">导出</a-button>
|
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
@@ -156,6 +164,7 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { stockWarnList, stockWarnSaveBatch } from '@/api/stockWarn'
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
import ProductType from '../../common/productType.js'
|
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
|
export default {
|
|
@@ -242,6 +251,25 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ handleExport () {
|
|
|
+ const _this = this
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params = _this.queryParam
|
|
|
+ _this.exportLoading = true
|
|
|
+ _this.spinning = true
|
|
|
+ reportSparePartsReturnExport(params).then(res => {
|
|
|
+ downloadExcel(res, '库存预警')
|
|
|
+ _this.exportLoading = false
|
|
|
+ _this.spinning = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 保存
|
|
|
handleSave (row, isBatch) {
|
|
|
const params = []
|