瀏覽代碼

库存预警

lilei 2 年之前
父節點
當前提交
2f81533a95
共有 2 個文件被更改,包括 29 次插入1 次删除
  1. 1 1
      public/version.json
  2. 28 0
      src/views/inventoryManagement/inventoryWarning/list.vue

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1657863760558
+  "version": 1657865279182
 }

+ 28 - 0
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -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 = []