|
|
@@ -46,7 +46,13 @@ class ShopDelivery extends Backend
|
|
|
->paginate($limit);
|
|
|
|
|
|
//表格底部要有汇总:发货数量汇总 重量汇总 总价汇总
|
|
|
- $count = $this->model->withJoin($with,'left')->where($where)->field('sum(num) total_num, sum(weigh) total_weigh, sum(total_price) total_price')->select()->toArray();
|
|
|
+ $count = $this->model
|
|
|
+ ->withJoin($with,'left')
|
|
|
+ ->where($where)
|
|
|
+ ->field('sum(num) total_num, sum(weigh) total_weigh, sum(total_price) total_price')
|
|
|
+ ->group('shop_delivery.id')
|
|
|
+ ->select()
|
|
|
+ ->toArray();
|
|
|
|
|
|
$result = ['total' => $list->total(), 'rows' => $list->items(),
|
|
|
'total_num' => $count[0]['total_num']??0,
|