diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index d345b94d4..a3abb96bc 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -35,6 +35,7 @@ class MendController extends ThinkController { * 补链记录 * @param integer $p 分页 * @param booble IS_POST post请求时为下一页ajax请求 + * @param booble export 是否导出 * @return void */ public function recordList($p=1,$export=false) @@ -46,13 +47,18 @@ class MendController extends ThinkController { } else { $row = 10; } - if(isset($_REQUEST['account'])){ - if ($_REQUEST['account']=='全部') { - unset($_REQUEST['account']); - } - $map['user_account']=array('like','%'.$_REQUEST['account'].'%'); - unset($_REQUEST['account']); + if(isset($_REQUEST['account'])) $map['user_account']=array('like','%'.$_REQUEST['account'].'%'); + if(isset($_REQUEST['promote_account'])) $map['promote_account']=array('like','%'.$_REQUEST['promote_account'].'%'); + if(isset($_REQUEST['promote_account_to'])) $map['promote_account_to']=array('like','%'.$_REQUEST['promote_account_to'].'%'); + if(isset($_REQUEST['op_account'])) $map['op_account']=array('like','%'.$_REQUEST['op_account'].'%'); + if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { + $map['order_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]]; + } elseif (isset($_REQUEST['time_start'])) { + $map['order_time'] = ['GT', strtotime($_REQUEST['time_start'])]; + } elseif (isset($_REQUEST['time_end'])) { + $map['order_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399]; } + $data = M("Mend","tab_") ->field("user_account,promote_account,promote_account_to,order_time,create_time,op_account,remark") ->where($map) diff --git a/Application/Admin/View/Mend/recordList.html b/Application/Admin/View/Mend/recordList.html index f0d226878..aae3ab3a4 100644 --- a/Application/Admin/View/Mend/recordList.html +++ b/Application/Admin/View/Mend/recordList.html @@ -33,9 +33,27 @@
+
+ +
+
+ +
+
+ +
+
+ +  -  +
+ + +
+
搜索
+ @@ -159,6 +177,14 @@ $(function(){ url += '&' + query; }else{ url += '?' + query; + } + var start = $("#time_start").val(); + var end = $("#time_end").val(); + if(start !='' && end != ''){ + if (Date.parse(start) > Date.parse(end)){ + layer.msg('开始时间必须小于等于结束时间'); + return false; + } } window.location.href = url; }); @@ -169,7 +195,7 @@ $(function(){ $("#search").click(); } }); - $('#time-start').datetimepicker({ + $('#time_start').datetimepicker({ format: 'yyyy-mm-dd', language:"zh-CN", minView:2,