From 39dac89841a4a106f6fdd9094cbe857e880bc610 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 24 Oct 2023 10:42:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=9D=83=E9=87=8D?= =?UTF-8?q?=E5=80=BC=E6=98=8E=E7=BB=86=E4=BC=98=E5=8C=96=20-=20=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E4=B8=BA=E5=8F=98=E6=9B=B4=E6=98=8E=E7=BB=86=E5=92=8C?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=98=8E=E7=BB=86=E4=B8=A4=E7=A7=8D=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=96=B9=E5=BC=8F=EF=BC=8C=E9=BB=98=E8=AE=A4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=8F=98=E6=9B=B4=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/admin/TeamAgencyController.php | 1 + .../src/admin/IndexController.php | 39 ++- .../views/index/change_record.blade.php | 4 +- .../weight-value/views/index/index.blade.php | 317 +++++++++++++----- 4 files changed, 267 insertions(+), 94 deletions(-) diff --git a/plugins/team-dividend/src/admin/TeamAgencyController.php b/plugins/team-dividend/src/admin/TeamAgencyController.php index 3962960f..f959d505 100644 --- a/plugins/team-dividend/src/admin/TeamAgencyController.php +++ b/plugins/team-dividend/src/admin/TeamAgencyController.php @@ -96,6 +96,7 @@ class TeamAgencyController extends BaseController 'ranking' => ((int)$rankInfo['up_log'][$item['uid']] + 1), ]; } + return []; },$rankList)); } diff --git a/plugins/weight-value/src/admin/IndexController.php b/plugins/weight-value/src/admin/IndexController.php index 427f1fd8..a8b6f159 100644 --- a/plugins/weight-value/src/admin/IndexController.php +++ b/plugins/weight-value/src/admin/IndexController.php @@ -21,23 +21,19 @@ class IndexController extends BaseController{ */ public function index(){ //参数获取 - $pageSize = request()->input('page_size',10); - $search = request()->input('search'); + $showType = request()->input('show_type','show_detail'); // 获取列表信息 - $result = WeightValue::getList($pageSize,$search); $data = [ - 'list' => $result['data'], - 'pager' => PaginationHelper::show($result['total'],$result['current_page'],$result['per_page']), - 'search' => $search, + 'show_type' => $showType, 'level_list' => TeamDividendLevelModel::getAll(['id','level_name']) ]; return view('Yunshop\WeightValue::index.index',$data)->render(); } /** - * Common: 查看变更记录 + * Common: 变更记录 - 变更记录明细 * Author: wu-hui - * Time: 2023/10/16 17:48 + * Time: 2023/10/24 10:25 * @return array|\Illuminate\Http\JsonResponse|string * @throws \Throwable */ @@ -51,6 +47,7 @@ class IndexController extends BaseController{ // 获取变更记录 $field = [ 'id', + 'member_id', 'team_dividend_agency_level_id', 'change_type', 'change_quantity', @@ -60,6 +57,15 @@ class IndexController extends BaseController{ 'created_at' ]; $result = WeightValueLog::getList(10,$search,$field); + // 根据经销商等级id分组 根据id大小排序 获取排序序号 + $group = WeightValue::uniacid()->groupBy('team_dividend_agency_level_id')->pluck('team_dividend_agency_level_id'); + $group = $group ? $group->toArray() : []; + sort($group); + $group = array_flip($group); + // 循环处理数据 + foreach($result['data'] as &$item){ + $item['sort'] = $group[(int)$item['team_dividend_agency_level_id']]; + } return $this->successJson('success',[ 'current_page' => $result['current_page'], @@ -74,6 +80,23 @@ class IndexController extends BaseController{ 'is_get' => $isGet, ])->render(); } + /** + * Common: 变更记录 - 根据用户及等级分组统计 + * Author: wu-hui + * Time: 2023/10/24 10:27 + * @return \Illuminate\Http\JsonResponse + */ + public function changeGroupRecord(){ + // 参数获取 + $pageSize = request()->input('page_size',10); + $search = request()->input('search'); + $result = WeightValue::getList($pageSize,$search); + return $this->successJson('success',[ + 'current_page' => $result['current_page'], + 'data' => $result['data'], + 'last_page' => $result['last_page'], + ]); + } /** * Common: 设置信息编辑 * Author: wu-hui diff --git a/plugins/weight-value/views/index/change_record.blade.php b/plugins/weight-value/views/index/change_record.blade.php index fc5e2cc7..d535ec64 100644 --- a/plugins/weight-value/views/index/change_record.blade.php +++ b/plugins/weight-value/views/index/change_record.blade.php @@ -25,8 +25,8 @@ diff --git a/plugins/weight-value/views/index/index.blade.php b/plugins/weight-value/views/index/index.blade.php index 83094bf9..0425f0ca 100644 --- a/plugins/weight-value/views/index/index.blade.php +++ b/plugins/weight-value/views/index/index.blade.php @@ -50,107 +50,256 @@ background-color: #d9534f!important; } .panel-body .label{ + display: inline-block; + margin-bottom: 2px; + border-radius: 2px; font-size: 14px!important; + padding: 5px !important; + text-transform: uppercase; + font-weight: 700; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + } + .el-pagination{ + text-align: right!important; + margin-top: 20px!important; + } + .panel-body{ + padding-top: 0; + margin-bottom: 30px; + overflow: auto; + padding-right: 30px; } @section('content') -
- {{--顶部搜索--}} -
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
-
-
-
- {{--信息列表--}} +
-
- - - - - - - - - - - - @foreach ($list as $item) - - -
ID用户信息权重值类型 - 平台总数 - 用户持有 - 占比(%) - 操作
{{ $item['id'] }} +
+ + + {{--搜索--}} + + + + + + + + + + + + + + + + + + + 查询 + + + {{--表单--}} + + + + + + + + + + + + + + + + + + + + {{--搜索--}} + + + + + + + + + + + + 查询 + + + {{--表单--}} + + + + + + + + + + + + + + + + + + + {{--分页--}} + +
@endsection