Browse Source

修改bug

chenrui 2 years ago
parent
commit
a1e1d2a3f1
1 changed files with 11 additions and 17 deletions
  1. 11 17
      src/views/reportData/receivedSendStorageReport/index.vue

+ 11 - 17
src/views/reportData/receivedSendStorageReport/index.vue

@@ -259,22 +259,19 @@ export default {
       _this.exportLoading = true
       _this.spinning = true
       _this.showExport = true
-      if (this.tabVal == 1) {
-        hdExportExcel(exportDetailReport, params, '收发存报表', function () {
-          _this.exportLoading = false
-          _this.spinning = false
-        })
-      } else {
-        hdExportExcel(exportGroupByProductTypeReport, params, '收发存报表', function () {
-          _this.exportLoading = false
-          _this.spinning = false
-        })
-      }
+      hdExportExcel(exportDetailReport, params, '收发存报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+      hdExportExcel(exportGroupByProductTypeReport, params, '收发存报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
     },
     // 验证表单 type值  search查询 export导出
     testForm (type) {
       const _this = this
-      if (_this.form.time.length != 2) {
+      if (!_this.form.time[0] || !_this.form.time[1]) {
         _this.$message.error('请选择月份')
         return
       }
@@ -294,11 +291,8 @@ export default {
     // 查询
     handleSearch () {
       const _this = this
-      if (_this.tabVal == 1) {
-        _this.$refs.table.refresh(true)
-      } else {
-        _this.$refs.gatherBox.resetCurForm()
-      }
+      _this.$refs.table.refresh(true)
+      _this.$refs.gatherBox.resetCurForm()
     },
     // 重置
     resetSearchForm () {