...
|
...
|
@@ -606,6 +606,7 @@ 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];
|
...
|
...
|
@@ -621,6 +622,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
$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,b.*") -> 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();
|
|
|
}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_money = Db::name('indent') -> alias('a') -> field("a.id,b.*") -> 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") -> select();*/
|
|
|
$indent_money = Db::name('money_income') -> where("uid =".$uid) -> select();
|
...
|
...
|
@@ -632,14 +634,20 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
}
|
|
|
$total_money = $total_money-$total_money*0.006;
|
|
|
$this -> assign('total_money',$total_money);
|
|
|
|
|
|
//显示学校年级
|
|
|
$school = Db::name('school') -> where('uid',$uid) -> select();
|
|
|
$grade_class = Db::name('grade_class') -> where("school_id",$school[0]['id']) -> select();
|
|
|
foreach ($grade_class as $key => $val){
|
|
|
$class = explode('-',$val['class']);
|
|
|
for($i=$class[0];$i<=$class[1];$i++){
|
|
|
$grade_class_show[] = $val['grade'].' - '.$i."班";
|
|
|
$school = Db::name('school') -> where('uid',$uid) -> select() -> toArray();
|
|
|
if(count($school) != 0){
|
|
|
$grade_class = Db::name('grade_class') -> where("school_id",$school[0]['id']) -> select();
|
|
|
foreach ($grade_class as $key => $val){
|
|
|
$class = explode('-',$val['class']);
|
|
|
for($i=$class[0];$i<=$class[1];$i++){
|
|
|
$grade_class_show[] = $val['grade'].' - '.$i."班";
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
$school = '';
|
|
|
$grade_class_show = '';
|
|
|
}
|
|
|
$this -> assign('school',$school);
|
|
|
$this -> assign('grade_class_show',$grade_class_show);
|
...
|
...
|
|