Pārlūkot izejas kodu

Merge branch 'develop_szhj07' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_szhj07

lilei 2 gadi atpakaļ
vecāks
revīzija
1328c3ef1e

+ 9 - 0
src/api/shelf.js

@@ -162,6 +162,15 @@ export const shelfPutOutDetailList = (params) => {
     method: 'post'
   })
 }
+// 货架监控 导出
+export const exportShelfControlReport = (params) => {
+  return axios({
+    url: `/shelf/control/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 
 // 修改完成标识
 export const modifFinishFlag = (params) => {

+ 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 () {