From 7680ba8948be3aeb501e12bab8d87318c3313fa8 Mon Sep 17 00:00:00 2001
From: lccsw <1127794702@qq.com>
Date: Wed, 22 Dec 2021 14:01:30 +0800
Subject: [PATCH] edit-admin-distribution
---
.../appdistribution/Distribution.php | 47 ++++---------------
.../appdistribution/team/get_commission.php | 8 +---
admin/views/appdistribution/team/get_team.php | 10 +++-
3 files changed, 20 insertions(+), 45 deletions(-)
diff --git a/admin/controllers/appdistribution/Distribution.php b/admin/controllers/appdistribution/Distribution.php
index a5ff6f90..dee7b8ed 100755
--- a/admin/controllers/appdistribution/Distribution.php
+++ b/admin/controllers/appdistribution/Distribution.php
@@ -135,9 +135,6 @@ class Distribution extends AppBase
$lists = $where = array();
$_title = $reU['nickname'] ? '【' . $reU['nickname'] . '】分销团队' : '分销团队';
$where_base = array('app_id' => $this->app_id, 'app_uid' => $up_uid);
- if (!$params['time']) {
- $params['time'] = date('Y-m-d') . ' ~ ' . date('Y-m-d');
- }
if ($params['time']) {
$time = explode(' ~ ', $params['time']);
$time[0] && $where_base["c_time >="] = strtotime($time[0] . ' 00:00:00');
@@ -164,6 +161,9 @@ class Distribution extends AppBase
} else if ($params['statistical'] == 2) {//粉丝
$where = array('dealer' => 0, 'up_uid' => $up_uid);
}
+ if ($params['mobile']){
+ $where["mobile like '%{$params['mobile']}%'"] = null;
+ }
$resU = $this->mdAppUser->select($where, 'id DESC', $params['page'], $params['size'], 'id,nickname,mobile');
$count = $this->mdAppUser->count($where);
$params['statistical'] == 1 && $count += 1;
@@ -200,6 +200,11 @@ class Distribution extends AppBase
$lists[] = $setValue;
}
}
+ if($params['mobile']){
+ $uids = 0;
+ $resU && $uids = implode(',',array_column($resU,'id'));
+ $where_base["t_uid in ({$uids})"] = null;
+ }
$this->data['team_orders'] = $this->mdDealLog->count($where_base);
$where3 = $where_base;
$where3['status'] = 1;
@@ -251,43 +256,11 @@ class Distribution extends AppBase
$res = $this->mdDealLog->select($where, 'id DESC', $params['page'], $params['size'], 'cf_sid,type,status,money,c_time');
foreach ($res as $key => $value) {
$setValue = array();
- $source = $item_title = '';
- $item_num = 0;
- $total_price = $expect_money = 0.00;
- if ($reOp) {
- $item_title = $reOp['item_title'];
- $item_num = $reOp['item_num'];
- $total_price = $reOp['total_price'];
- if ($value['type'] == 0) {//自己购买
- $source .= '自己购买';
- } else if ($value['type'] == 1) {//团员购买
- $reU = $this->mdAppUser->get(array('id' => $reOp['app_uid']), 'nickname');
- $source .= '团员 ' . $reU['nickname'];
- } else if ($value['type'] == 2) {//粉丝购买
- $reU = $this->mdAppUser->get(array('id' => $reOp['app_uid']), 'nickname');
- $source .= '粉丝 ' . $reU['nickname'];
- } else if ($value['type'] == 3) {//团员粉丝购买
- $reU = $this->mdAppUser->get(array('id' => $reOp['app_uid']), 'nickname,up_uid');
- if ($this->app_info()['lock_fans'] == 1) {
- $reU2 = $this->mdAppUser->get(array('id' => $reU['up_uid']), 'nickname');
- } else {
- $reU2 = $this->mdAppUser->get(array('id' => $value['t_uid']), 'nickname');
- }
- $nickname = $reU['nickname'] ? $reU['nickname'] : '神秘人';
- $nickname2 = $reU2['nickname'] ? $reU2['nickname'] : '神秘人';
- if ($reU2) {
- $source .= '团粉 ' . $nickname2 . '>>' . $nickname;
- } else {
- $source .= '团粉 ' . $nickname;
- }
- }
- }
- $setValue['source'] = $source;
+ $expect_money = 0.00;
+ $setValue['cf_sid'] = $value['cf_sid'];
$setValue['status'] = $value['status'];
$setValue['status_name'] = $statusAry[$value['status']];
$setValue['expect_money'] = $value['money'];
- $setValue['item_title'] = $item_title;
- $setValue['item_num'] = $item_num;
$setValue['total_price'] = number_format_com($total_price);
$setValue['c_time'] = date('Y-m-d H:i:s', $value['c_time']);
$lists[] = $setValue;
diff --git a/admin/views/appdistribution/team/get_commission.php b/admin/views/appdistribution/team/get_commission.php
index f9facf57..2c214a63 100755
--- a/admin/views/appdistribution/team/get_commission.php
+++ b/admin/views/appdistribution/team/get_commission.php
@@ -30,10 +30,8 @@
- | 商品标题 |
- 商品价格 |
+ 购车订单号 |
佣金 |
- 订单来源 |
状态 |
创建时间 |
@@ -42,10 +40,8 @@
- | = $v['item_title'] ?> |
- = $v['total_price'] ?> |
+ = $v['cf_sid'] ?> |
= $v['expect_money'] ?> |
- = $v['source'] ?> |
= $v['status_name'] ?> |
= $v['c_time'] ?> |
diff --git a/admin/views/appdistribution/team/get_team.php b/admin/views/appdistribution/team/get_team.php
index 232926d0..4a23d1a6 100755
--- a/admin/views/appdistribution/team/get_team.php
+++ b/admin/views/appdistribution/team/get_team.php
@@ -4,9 +4,15 @@