lilei há 1 mês atrás
pai
commit
125c8c9a7d
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      src/views/reportData/dailyReport/table.vue

+ 3 - 1
src/views/reportData/dailyReport/table.vue

@@ -256,7 +256,7 @@ export default {
       this.nowDate = moment().format('DD日HH点mm分')
       this.spinning = true
       const data = await salesReportDailyList({ reportType, reportDate }).then(res => res.data)
-      if (data) {
+      if (data && data.length) {
         this.tableData = data
         // 全国销售日报
         if (this.activeKey == 0) {
@@ -283,6 +283,8 @@ export default {
             this.$refs['table' + this.activeKey].pageInit()
           }
         })
+      } else {
+        this.tableData = []
       }
       this.spinning = false
     },