From 96f68c4f500aee66d1d53867d76a505afcfd56c0 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 8 Jul 2020 09:24:00 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=B8=93=E5=91=98?= =?UTF-8?q?=E7=AD=9B=E9=80=89=EF=BC=8C=E6=9C=88=E4=BB=BD=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=EF=BC=8C=E5=8F=8A=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MarketPercentageController.class.php | 50 +++++++++++++++++-- .../MarketPercentage/marketstaffsettle.html | 2 +- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index 615c3529b..070f0ee21 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -24,6 +24,15 @@ class MarketPercentageController extends ThinkController $map['admin_id'] = $admin_id; if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) { unset($map['admin_id']); + $admin_data = M("member") + ->field("access.uid admin_id") + ->join("left join sys_auth_group_access access on sys_member.uid = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['group_id'=>['in','11,12,21']]) + ->select(); + if ($admin_data) { + $map['admin_id'] = ['in',array_column($admin_data,'admin_id')]; + } $_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):''; } @@ -52,7 +61,7 @@ class MarketPercentageController extends ThinkController $date = date('Y-m', strtotime($start . ' + ' . $i . ' month')); $search_date[] = $date; $i++; - }while ($date < date('Y-m', strtotime("{$end} -1 month"))); + }while ($date < date('Y-m', strtotime("{$end}"))); if ($search_date) { $map['pay_time'] = ['in', $search_date]; @@ -67,13 +76,13 @@ class MarketPercentageController extends ThinkController $date = date('Y-m', strtotime($start . ' + ' . $i . ' month')); $search_date[] = $date; $i++; - }while ($date < date('Y-m', strtotime("{$end} -1 month"))); + }while ($date < date('Y-m', strtotime("{$end}"))); if ($search_date) { $map['pay_time'] = ['in', $search_date]; } } - +// dump($map);die(); // var_dump($map);die(); $data = M("settleup_marketorder","tab_") @@ -186,14 +195,27 @@ class MarketPercentageController extends ThinkController $_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):''; $_REQUEST['group_id']?($map['level'] = $_REQUEST['group_id']):''; + $admin_id = $_SESSION['onethink_admin']['user_auth']['uid']; $map['admin_id'] = $admin_id; if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) { unset($map['admin_id']); + + $admin_data = M("member") + ->field("access.uid admin_id") + ->join("left join sys_auth_group_access access on sys_member.uid = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['group_id'=>['in','11,12,21']]) + ->select(); + if ($admin_data) { + $map['admin_id'] = ['in',array_column($admin_data,'admin_id')]; + } + $_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):''; } + $search_date = []; if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { @@ -507,6 +529,17 @@ class MarketPercentageController extends ThinkController $map['admin_id'] = $admin_id; if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) { unset($map['admin_id']); + + $admin_data = M("member") + ->field("access.uid admin_id") + ->join("left join sys_auth_group_access access on sys_member.uid = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['group_id'=>['in','11,12,21']]) + ->select(); + if ($admin_data) { + $map['admin_id'] = ['in',array_column($admin_data,'admin_id')]; + } + $_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):''; } @@ -675,6 +708,17 @@ class MarketPercentageController extends ThinkController public function sendBonus() { $map['pay_time'] = $_REQUEST['pay_time']; + + $admin_data = M("member") + ->field("access.uid admin_id") + ->join("left join sys_auth_group_access access on sys_member.uid = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['group_id'=>['in','11,12,21']]) + ->select(); + if ($admin_data) { + $map['admin_id'] = ['in',array_column($admin_data,'admin_id')]; + } + $map['admin_id'] = $_REQUEST['admin_id']; if (!$_REQUEST['pay_time']||!$_REQUEST['admin_id']) { diff --git a/Application/Admin/View/MarketPercentage/marketstaffsettle.html b/Application/Admin/View/MarketPercentage/marketstaffsettle.html index c8f53cae9..f35167965 100644 --- a/Application/Admin/View/MarketPercentage/marketstaffsettle.html +++ b/Application/Admin/View/MarketPercentage/marketstaffsettle.html @@ -134,7 +134,7 @@ {$data['achievement_bonus']|default='0.00'} {$data['commission']|default='0.00'} {$data['extend_commission']|default='0.00'} - {$data['wait_commission']|default='0.00'} + {$data['wait_commission']|default='0.00'} 合计 From 039b496b2813308709664201737ae19b0b0992f1 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 8 Jul 2020 09:27:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=B8=93=E5=91=98?= =?UTF-8?q?=E7=AD=9B=E9=80=89=EF=BC=8C=E6=9C=88=E4=BB=BD=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=EF=BC=8C=E5=8F=8A=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/MarketPercentage/marketstaffsettle.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/MarketPercentage/marketstaffsettle.html b/Application/Admin/View/MarketPercentage/marketstaffsettle.html index f35167965..c5b39f591 100644 --- a/Application/Admin/View/MarketPercentage/marketstaffsettle.html +++ b/Application/Admin/View/MarketPercentage/marketstaffsettle.html @@ -143,7 +143,7 @@ {$sum['performance_commission']|default='0.00'} {$sum['achievement_bonus']|default='0.00'} {$sum['commission']|default='0.00'} - {$sum['extend_commission']|default='0.00'} + {$sum['extend_commission']|default='0.00'} From ce2540919ca4591ddc442ba7ffe8c27ce0207c2c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 8 Jul 2020 09:36:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=B8=93=E5=91=98?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/MarketPercentageController.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index 070f0ee21..13d73fb09 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -833,6 +833,16 @@ class MarketPercentageController extends ThinkController $map = []; + $admin_data = M("member") + ->field("access.uid admin_id") + ->join("left join sys_auth_group_access access on sys_member.uid = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['group_id'=>['in','11,12,21']]) + ->select(); + if ($admin_data) { + $map['admin_id'] = ['in',array_column($admin_data,'admin_id')]; + } + $_REQUEST['pay_time']?$map['pay_time'] = $_REQUEST['pay_time']:''; $_REQUEST['real_name']?$map['real_name'] = $_REQUEST['real_name']:''; $_REQUEST['nickname']?$map['nickname'] = $_REQUEST['nickname']:'';