diff --git a/Application/Admin/Controller/GameMarginController.class.php b/Application/Admin/Controller/GameMarginController.class.php index 8f2beb168..22077c380 100644 --- a/Application/Admin/Controller/GameMarginController.class.php +++ b/Application/Admin/Controller/GameMarginController.class.php @@ -59,7 +59,7 @@ class GameMarginController extends AdminController $where = [ "id"=>["in",$ids] ]; - $info = $this->DBModel->where($where)->order("count_year desc,count_month desc")->select(); + $info = $this->DBModel->where($where)->order("count_year asc,count_month asc")->select(); $data = ["list"=>[]]; if($info){ foreach ($info as $k => $v) { diff --git a/Application/Admin/View/GameMargin/lists.html b/Application/Admin/View/GameMargin/lists.html index 59be741ff..b8cab0876 100644 --- a/Application/Admin/View/GameMargin/lists.html +++ b/Application/Admin/View/GameMargin/lists.html @@ -85,6 +85,7 @@ 生成毛利表 导出 + 汇总查看 @@ -275,6 +276,27 @@ } }) + $("#moreMarginView").click(function () { + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + return $(elem).val(); + }).get(); + + if(text.length < 2){ + layer.msg("" + '请选择大于两条(含)以上的数据' + ""); + return; + } + var ids = text.join(","); + var url = "{:U('moreMarginView')}"+"&ids="+ids + layer.open({ + type: 2, + title: "毛利分析表", + shadeClose: true, + shade: 0.8, + area: ['100%', '100%'], + content: url + }); + }) + $("#search").click(function(){ var url = $(this).attr('url');