...
|
...
|
@@ -29,7 +29,7 @@ class SalesmanorderController extends AdminBaseController{ |
|
|
$where['state'] = $_POST['state'];
|
|
|
}
|
|
|
if(!empty($_POST['uid'])){
|
|
|
$where['uid'] = $_POST['uid'];
|
|
|
$where['salesman_uid'] = $_POST['uid'];
|
|
|
}
|
|
|
if(!empty($_POST['school'])){
|
|
|
$where['school'] = $_POST['school'];
|
...
|
...
|
@@ -37,7 +37,7 @@ class SalesmanorderController extends AdminBaseController{ |
|
|
if(!empty($_POST['grade'])){
|
|
|
$where['grade'] = $_POST['grade'];
|
|
|
}
|
|
|
$data = Db::name('indent') -> where($where) -> paginate(12);
|
|
|
$data = Db::name('indent') -> where($where) -> paginate(50);
|
|
|
$data_arr = $data -> toArray();
|
|
|
}else{
|
|
|
$data = Db::name('indent') -> where('indent_type',2) -> paginate(12);
|
...
|
...
|
@@ -77,12 +77,18 @@ class SalesmanorderController extends AdminBaseController{ |
|
|
|
|
|
$id = $this -> request -> param();
|
|
|
$data = Db::name('indent') -> where('id',$id['id']) -> find();
|
|
|
if(!empty($data['indent_address'])){
|
|
|
$address = Db::name('address') -> where("id",$data['indent_address']) -> find();
|
|
|
$address_region = $address['region'].$address['detailed'];
|
|
|
//判断订单是业务员订单还是平台订单
|
|
|
if($data['indent_type'] == 1){
|
|
|
if(!empty($data['indent_address'])){
|
|
|
$address = Db::name('address') -> where("id",$data['indent_address']) -> find();
|
|
|
$address_region = $address['region'].$address['detailed'];
|
|
|
}else{
|
|
|
$address_region = '';
|
|
|
}
|
|
|
}else{
|
|
|
$address_region = '';
|
|
|
$address_region = $data['region'].$data['school'].$data['grade'];$data['class'];
|
|
|
}
|
|
|
|
|
|
$data_content = Db::name('indent_goods') -> where('indent_id',$id['id']) -> select();
|
|
|
$this -> assign('data',$data);
|
|
|
$this -> assign('address_region',$address_region);
|
...
|
...
|
|