Browse Source

资金统计提交

ellisran 8 months ago
parent
commit
521382bb5e
1 changed files with 2 additions and 3 deletions
  1. 2 3
      app/public/js/financial_summary.js

+ 2 - 3
app/public/js/financial_summary.js

@@ -19,8 +19,7 @@ $(document).ready(function() {
         let newTransferList = _.cloneDeep(transferList);
         let newTransferTenderList = _.cloneDeep(transferTenderList);
         let newPayList = _.cloneDeep(payList);
-        if (startMonth === '' && endMonth.length === '') {
-        } else if (startMonth !== '' && endMonth !== '') {
+        if (startMonth !== '' && endMonth !== '') {
             // 判断输入合法和endMonth大于startMonth
             if (!/^\d{4}-\d{2}$/.test(startMonth) || !/^\d{4}-\d{2}$/.test(endMonth)) {
                 toastr.warning('请输入正确的日期格式');
@@ -40,7 +39,7 @@ $(document).ready(function() {
                 const thisMonth = moment(item.create_time).format('YYYY-MM');
                 return thisMonth >= startMonth && thisMonth <= endMonth;
             });
-        } else {
+        } else if (startMonth !== '' || endMonth !== '') {
             toastr.warning('请选择开始和结束日期查询');
             return;
         }