|
@@ -79,7 +79,7 @@ class Customer extends BaseController
|
|
|
if($status!==""){
|
|
|
$condition[] = ['status',"=",$status];
|
|
|
}
|
|
|
- $pidlist = Db::name("customer_org1")->where($condition)->column("pid");
|
|
|
+ $pidlist = Db::name("customer_org1")->where($condition)->order("addtime desc")->column("pid");
|
|
|
if(!empty($pidlist)){
|
|
|
$where[]=[["itemid","in",$pidlist]];
|
|
|
|
|
@@ -90,7 +90,7 @@ class Customer extends BaseController
|
|
|
$where[]=['itemid','=',$pid];
|
|
|
}
|
|
|
}
|
|
|
- $list = Db::name('customer_org1')->where($condition)->page($page,$size)->column("id,pid,name,level,depart_link,creater,addtime,status");
|
|
|
+ $list = Db::name('customer_org1')->where($condition)->page($page,$size)->order("addtime desc")->column("id,pid,name,level,depart_link,creater,addtime,status");
|
|
|
$var=[];
|
|
|
foreach ($list as $item) {
|
|
|
$iten=[];
|
|
@@ -103,7 +103,7 @@ class Customer extends BaseController
|
|
|
$iten['kh']=0;//组织架构
|
|
|
$var[]=$iten;
|
|
|
}
|
|
|
- $itm = Db::name('customer_info')->where($where)->select();
|
|
|
+ $itm = Db::name('customer_info')->order("addtime desc")->where($where)->select();
|
|
|
foreach ($itm as $vat){
|
|
|
$inm=[];
|
|
|
$inm['name']=$vat['companyName'];
|