作者 刘朕
1 个管道 的构建 通过 耗费 37 秒

后台筛选点击分页后条件问题修改

... ... @@ -23,6 +23,7 @@ class AuditController extends AdminBaseController{
$where['phone'] = ['like','%'.trim($param['keyword']).'%'];
}
$data = Db::name('sale_audit')->where($where)->order('create_time','DESC')->paginate(12);
$data->appends($param);
$data_arr = $data -> toArray();
foreach($data_arr['data'] as $key => $val){
$data_user = Db::name('user') -> where('id',$val['uid']) -> find();
... ...
... ... @@ -36,6 +36,7 @@ class GoodsController extends AdminBaseController{
$classif_data = Db::name('classification') -> select();
$this -> assign('classif_data',$classif_data);
$data = Db::name('goods') -> where($where)->order('create_time','DESC')->paginate(12);
$data->appends($param);
$data1 = $data -> toArray();
foreach ($data1['data'] as $key => $val){
$class_data = Db::name('classification') -> where('id',$val['classify_id']) -> find();
... ...
... ... @@ -26,6 +26,7 @@ class OrderscourierController extends AdminBaseController{
$where['state'] = $param['state'];
}
$data = Db::name('indent')->where($where)->where("state = 2 or state = 3 or state = 5")->order('create_time','DESC')->paginate(12);
$data->appends($param);
$this->assign('start_time',!empty($param['start_time']) ? $param['start_time'] : '');
$this->assign('end_time',!empty($param['end_time']) ? $param['end_time'] : '');
$this->assign('keyword',!empty($param['keyword']) ? trim($param['keyword']) : '');
... ...
... ... @@ -35,7 +35,7 @@ class SalesmanController extends AdminBaseController{
->group('a.id')
->order(['a.balance'=>'DESC','a.create_time'=>'DESC'])
->paginate(12);
$data->appends($param);
$data_arr = $data -> toArray();
$data_money = Db::name('money_ratio') -> find();
foreach ($data_arr['data'] as $key => $val){
... ...
... ... @@ -30,6 +30,7 @@ class SalesmangoodsController extends AdminBaseController{
->where($where)
->order('a.create_time','DESC')
->paginate(12);
$data->appends($param);
$this->assign('start_time',!empty($param['start_time']) ? $param['start_time'] : '');
$this->assign('end_time',!empty($param['end_time']) ? $param['end_time'] : '');
$this->assign('keyword',!empty($param['keyword']) ? trim($param['keyword']) : '');
... ...
... ... @@ -23,7 +23,8 @@ class SchoolController extends AdminBaseController{
$keyword = trim($param['keyword']);
$where['school'] = ['like',"%$keyword%"];
}
$data1 = Db::name('school')->where($where)->order('create_time','DESC') -> paginate(12) ;
$data1 = Db::name('school')->where($where)->order('create_time','DESC') -> paginate(12);
$data1->appends($param);
$data = $data1 -> toArray();
foreach ($data['data'] as $key => $val){
$user_data = Db::name('user') -> where('id',$val['uid']) -> find();
... ...
... ... @@ -34,6 +34,7 @@ class UsersController extends AdminBaseController{
->where($where)
->order(['a.balance'=>'DESC','a.create_time'=>'DESC'])
->paginate(12);
$data->appends($param);
$list = $data->items();
foreach ($list as $k=>$v) {
// 获取邀请人昵称
... ...
... ... @@ -24,6 +24,7 @@ class WithdrawalController extends AdminBaseController{
$where['b.phone'] = ['like','%'.trim($param['keyword']).'%'];
}
$data = Db::name('money_expend') -> alias('a') -> field('a.*,b.phone') -> join('my_user b','a.uid=b.uid','LEFT') -> where($where) -> paginate(12);
$data->appends($param);
$data_arr = $data -> toArray();
if(!empty($data_arr)){
foreach($data_arr['data'] as $key => $val){
... ... @@ -62,6 +63,7 @@ class WithdrawalController extends AdminBaseController{
->where($where)
->order("a.create_time desc")
->paginate(12);
$data->appends($param);
$data_arr = $data -> toArray();
$this->assign('start_time',!empty($param['start_time']) ? $param['start_time'] : '');
$this->assign('end_time',!empty($param['end_time']) ? $param['end_time'] : '');
... ...