...
|
...
|
@@ -47,6 +47,11 @@ class AdminLightOrderController extends AdminBaseController |
|
|
$param = $this->request->param();
|
|
|
//添加搜索条件
|
|
|
$where=[];
|
|
|
$where1=[];
|
|
|
if (cmf_get_current_admin_id()!=1){
|
|
|
$where['t.user_id']=cmf_get_current_admin_id();
|
|
|
$where1['user_id']= $where['t.user_id'];
|
|
|
};
|
|
|
$user_name = empty($param['user_name']) ? '' : $param['user_name'];
|
|
|
if (!empty($user_name)) {
|
|
|
$where['u.user_name'] = ['like', "%$user_name%"];
|
...
|
...
|
@@ -73,7 +78,7 @@ class AdminLightOrderController extends AdminBaseController |
|
|
}
|
|
|
|
|
|
//所有寺庙
|
|
|
$temples=Db::name('temple')->select();
|
|
|
$temples=Db::name('temple')->where($where1)->select();
|
|
|
$this->assign('temples',$temples);
|
|
|
|
|
|
//数据提取
|
...
|
...
|
@@ -148,6 +153,10 @@ class AdminLightOrderController extends AdminBaseController |
|
|
public function edit()
|
|
|
{
|
|
|
$id = $this->request->param('id');
|
|
|
$where=[];
|
|
|
if (cmf_get_current_admin_id()!=1){
|
|
|
$where['user_id']=cmf_get_current_admin_id();
|
|
|
};
|
|
|
$data = Db::name('light_order')
|
|
|
->alias('lo')
|
|
|
->join('light l','lo.light_id=l.id')
|
...
|
...
|
@@ -158,9 +167,9 @@ class AdminLightOrderController extends AdminBaseController |
|
|
->field('lo.*,l.*,u.mobile,u.user_name,t.name as tname,ta.name as taname,lo.name as loname')
|
|
|
->find();
|
|
|
|
|
|
$address = Db::name('temple')->field('address')->distinct('true')->select();
|
|
|
$address = Db::name('temple')->where($where)->field('address')->distinct('true')->select();
|
|
|
$this->assign('address',$address);
|
|
|
$temple = Db::name('temple')->where('address',$data['address'])->select();
|
|
|
$temple = Db::name('temple')->where('address',$data['address'])->where($where)->select();
|
|
|
$this->assign('temple', $temple);
|
|
|
$area = Db::name('temple_area')->where('temple_id', $data['temple_id'])->select();
|
|
|
$this->assign('area', $area);
|
...
|
...
|
|