瀏覽代碼

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

高敬炎 2 年之前
父節點
當前提交
8ea3f1c4a6
共有 1 個文件被更改,包括 30 次插入6 次删除
  1. 30 6
      src/views/statisticalReport/stockSaleOutReportList.vue

+ 30 - 6
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -1345,8 +1345,36 @@
           })
       },
       getPassYearFormatDate() {
-      if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
-        var nowDate = new Date()
+      // if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
+      //   var nowDate = new Date()
+      //   var _date = new Date()
+      //   nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+      //   var year = nowDate.getFullYear()
+      //   var year1 = _date.getFullYear()
+      //   var month = nowDate.getMonth() + 1
+      //   var month1 = _date.getMonth() + 1
+      //   var strDate = nowDate.getDate()
+      //   var strDate1 = _date.getDate()
+      //   if (month >= 1 && month <= 9) {
+      //     month = '0' + month
+      //   }
+      //   if (month1 >= 1 && month1 <= 9) {
+      //     month1 = '0' + month1
+      //   }
+
+      //   if (strDate >= 0 && strDate <= 9) {
+      //     strDate = '0' + strDate
+      //   }
+      //   if (strDate1 >= 0 && strDate1 <= 9) {
+      //     strDate1 = '0' + strDate1
+      //   }
+      //   this.startDate = year + '-' + month + '-' + strDate
+      //   this.endDate = year1 + '-' + month1 + '-' + strDate1
+      // } else {
+      //   this.startDate = localStorage.getItem('startDate')
+      //   this.endDate = localStorage.getItem('endDate')
+      // }
+      var nowDate = new Date()
         var _date = new Date()
         nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
         var year = nowDate.getFullYear()
@@ -1370,10 +1398,6 @@
         }
         this.startDate = year + '-' + month + '-' + strDate
         this.endDate = year1 + '-' + month1 + '-' + strDate1
-      } else {
-        this.startDate = localStorage.getItem('startDate')
-        this.endDate = localStorage.getItem('endDate')
-      }
       this.value2 = [this.startDate, this.endDate]
     },
       //收款截图