...
|
...
|
@@ -139,7 +139,23 @@ class UsersController extends AdminBaseController{ |
|
|
public function users_money(){
|
|
|
|
|
|
$uid = $this -> request -> param();
|
|
|
$data = Db::name('money_income') -> where('uid',$uid['uid']) -> select();
|
|
|
$data = Db::name('money_income') -> where('uid',$uid['uid']) -> select() -> toArray();
|
|
|
if(!empty($data)){
|
|
|
foreach ($data as $key => $val){
|
|
|
if($val['type'] == 2){
|
|
|
$data[$key]['indent'] = Db::name('indent') -> where('id',$val['indent_id']) -> find();
|
|
|
$indent_good = Db::name('indent_goods') -> where('indent_id',$val['indent_id']) -> select() -> toArray();
|
|
|
$indent_goods = '';
|
|
|
foreach ($indent_good as $key1 => $val1){
|
|
|
$indent_goods .= $val1['book_name'].',';
|
|
|
}
|
|
|
$data[$key]['indent_good'] = $indent_goods;
|
|
|
}else{
|
|
|
$data[$key]['indent'] = Db::name('indent') -> where('id',$val['indent_id']) -> find();
|
|
|
$data[$key]['indent_good'] = $val['book_name'];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
$this -> assign('data',$data);
|
|
|
return $this -> fetch();
|
|
|
|
...
|
...
|
|