...
|
...
|
@@ -606,12 +606,13 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
'a.indent_type' => 2,
|
|
|
'a.salesman_uid' => $uid
|
|
|
];
|
|
|
|
|
|
if($res['grade_class'] != ''){
|
|
|
$school_grade_class = explode(' ',$res['grade_class']);
|
|
|
$where['a.school'] = $school_grade_class[0];
|
|
|
$where['a.grade'] = $school_grade_class[1];
|
|
|
$where['a.class'] = $school_grade_class[3];
|
|
|
if($res['school'] != ''){
|
|
|
$where['a.school'] = $res['school'];
|
|
|
}
|
|
|
if($res['grade'] != ''){
|
|
|
$school_grade_class = explode('-',$res['grade']);
|
|
|
$where['a.grade'] = $school_grade_class[0];
|
|
|
$where['a.class'] = $school_grade_class[1];
|
|
|
}
|
|
|
|
|
|
if($res['start_time'] != '' && $res['end_time'] != ''){
|
...
|
...
|
@@ -620,7 +621,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
$where['a.pay_time'] = [['>=',$start_time],['<=',$end_time]];
|
|
|
}
|
|
|
/*$indent_goods = Db::name('indent') -> alias('a') -> field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail") -> join('indent_goods b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> select();*/
|
|
|
$indent_money = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
|
|
|
$indent_money = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
|
|
|
if(count($indent_money)!=0){
|
|
|
foreach ($indent_money as $key => $val){
|
|
|
$indent_money[$key]['book_name'] = Db::name('indent_goods') -> where('indent_id',$val['id']) -> select() -> toArray();
|
...
|
...
|
@@ -630,12 +631,13 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
}else{
|
|
|
|
|
|
/*$indent_goods = Db::name('indent') -> alias('a') -> field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail") -> join('indent_goods b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> select();*/
|
|
|
$indent_goods = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
|
|
|
$indent_goods = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
|
|
|
if(count($indent_goods)!=0){
|
|
|
foreach ($indent_goods as $key => $val){
|
|
|
$indent_goods[$key]['book_name'] = Db::name('indent_goods') -> where('indent_id',$val['id']) -> select() -> toArray();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$this -> assign('indent_goods',$indent_goods);
|
|
|
$indent_money = Db::name('money_income') -> where("uid =".$uid) -> select();
|
|
|
}
|
...
|
...
|
|