From 3b725f9c1d5a2a2d0eac89fec181b759ad504494 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 May 2021 11:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B1=87=E6=80=BB=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/GameMarginController.class.php | 2 +- Application/Admin/View/GameMargin/lists.html | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) 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');