hrjy il y a 2 ans
Parent
commit
c08c2b8c18

+ 2 - 1
app/admin/controller/many/ManyOrder.php

@@ -60,7 +60,8 @@ class ManyOrder extends AuthController
             ['excel', 0],
             ['data', ''],
             ['many_id',''],
-            ['name', '']
+            ['name', ''],
+            ['type', 0]
         ]);
 
         return Json::successlayui(\app\admin\model\many\ManyOrder::list($where));

+ 4 - 0
app/admin/model/many/ManyOrder.php

@@ -50,6 +50,10 @@ class ManyOrder extends BaseModel
         if (trim($where['many_id']) != '')$model->where('b.id' , '=', $where['many_id']);
         if (trim($where['name']) != '')$model->where('u.uid|u.account|u.nickname' , 'like', '%'.$where['name'].'%');
         if (trim($where['data']) != '') $model = self::getModelTime($where, $model,  'a.create_time');
+        if ($where['type']){
+            $data['price'] = ManyOrder::where('status', '=', 0)->sum('price');
+            return $data;
+        }
         $data['count'] = $model->count();
 
         if (isset($where['excel']) && $where['excel'] == 1) {

+ 17 - 0
app/admin/view/many/many_order/index.php

@@ -107,6 +107,17 @@
                                         </div>
                                     </div>
                                 </div>
+                                <div class="col-sm-3 ui-sortable">
+                                    <div class="ibox float-e-margins">
+                                        <div class="ibox-title">
+                                            <span class="label label-danger pull-right">总</span>
+                                            <h5>冻结金额</h5>
+                                        </div>
+                                        <div class="ibox-content">
+                                            <h1 class="no-margins" id="user_price"></h1>
+                                        </div>
+                                    </div>
+                                </div>
                             </div>
                         </form>
                     </div>
@@ -180,6 +191,12 @@
         ];
     });
 
+    layList.baseGet(layList.U({a:'list',q:{type:1}}), function (res) {
+        console.log(res);
+    }, function (res) {
+        $('#user_price').text(res.count.price);
+    });
+
     //查询
     layList.search('search',function(where){
         layList.reload(where,true);