chenrui преди 2 години
родител
ревизия
c12eb83f0d
променени са 1 файла, в които са добавени 17 реда и са изтрити 2 реда
  1. 17 2
      src/views/numsGoodsShelves/shelfMonitoring/list.vue

+ 17 - 2
src/views/numsGoodsShelves/shelfMonitoring/list.vue

@@ -162,7 +162,8 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import addModal from './addModal.vue'
 import shelfSList from '@/views/common/shelfList'
-import { shelfControlList } from '@/api/shelf'
+import { shelfControlList, exportShelfControlReport } from '@/api/shelf'
+import { downloadExcel } from '@/libs/JGPrint.js'
 export default {
   components: { STable, VSelect, addModal, shelfSList },
   mixins: [commonMixin],
@@ -301,7 +302,21 @@ export default {
     },
     // 导出
     handleExport () {
-
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          exportShelfControlReport(params).then(res => {
+            downloadExcel(res, this.shelfName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
     },
     // 新增调回单
     handleAddBack () {