xieruidong 2 年之前
父节点
当前提交
0f549bf0dc
共有 2 个文件被更改,包括 15 次插入1 次删除
  1. 6 1
      application/admin/controller/Overview.php
  2. 9 0
      application/admin/view/overview/index.html

+ 6 - 1
application/admin/controller/Overview.php

@@ -4,6 +4,7 @@ namespace app\admin\controller;
 
 use app\admin\model\Admin;
 use app\admin\model\AdminMoneyLog;
+use app\admin\model\Refund;
 use app\common\controller\Backend;
 
 /**
@@ -51,7 +52,7 @@ class Overview extends Backend
                 'total'=>$list->total(),
             ]);
         }
-        list($postTime) = $this->rangeTime('startTime');
+        list($postTime,$postTimeArr) = $this->rangeTime('startTime');
         $where = [];
         $map = [];
         if($postTime){
@@ -77,6 +78,10 @@ class Overview extends Backend
         //下单用户数
         $buy = Db('Orders')->where($where)->where('status','in','5,10,20')->group('user_id')->count();
 
+        #投诉量
+        $tsNum=Refund::filterDate($postTimeArr)->count();
+        $this->assign('tsNum',$tsNum);
+
         //毛利、毛利率
         $install = Db('Orders')->where($where)->where('status','in','5,10,20')->sum('amount_install');//总安装费
         $orderIds =  Db('Orders')->where($where)->where('status','in','5,10,20')->column('id');

+ 9 - 0
application/admin/view/overview/index.html

@@ -253,6 +253,15 @@
                             </div>
                         </div>
                     </div>
+                    <div class="col-sm-3 col-xs-6">
+                        <div class="sm-st clearfix">
+                            <span class="sm-st-icon bg-gray"><i class="fa fa-taxi"></i></span>
+                            <div class="sm-st-info">
+                                <span>{$tsNum}</span>
+                                投诉量
+                            </div>
+                        </div>
+                    </div>
 
 
                 </div>