Jonlin há 6 anos atrás
pai
commit
ca9de573ab
1 ficheiros alterados com 11 adições e 0 exclusões
  1. 11 0
      application/admin/view/system/wordslog.html

+ 11 - 0
application/admin/view/system/wordslog.html

@@ -40,6 +40,7 @@
                         <label>聊天日期:</label>
                         <input type="text" class="form-control" id="start" value="<?php echo date('Y-m-d',time()-604800);?>" style="width: 100px;"> --
                         <input type="text" class="form-control" id="end" value="<?php echo date('Y-m-d',time());?>" style="width: 100px;">
+                        <input type="hidden" id="now" value="<?php echo date('Y-m-d',time());?>">
                     </div>
                     &nbsp;&nbsp;
                     <div class="form-group">
@@ -173,6 +174,7 @@
         $("#search").bind("click", function(){
             var start = $('#start').val();
             var end = $('#end').val();
+            var now = $('#now').val();
 
             if('' == start){
                 layer.tips("输入开始时间", '#start');
@@ -184,6 +186,15 @@
                 return false;
             }
 
+            if(start > now){
+                layer.msg('开始时间不能大于当前时间');
+                return false;
+            }
+            if(end > now){
+                layer.msg('结束时间不能大于当前时间');
+                return false;
+            }
+
             if(start > end){
                 layer.msg('开始时间不能大于结束时间');
                 return false;