update
This commit is contained in:
@@ -195,3 +195,20 @@ if (!function_exists('build_heading')) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function session_admin($key=''){
|
||||
$admin = session('admin');
|
||||
if($key){
|
||||
return $admin[$key];
|
||||
}
|
||||
return $admin;
|
||||
}
|
||||
function session_admin_firm_id(){
|
||||
$admin = session('admin.firm_id');
|
||||
return $admin;
|
||||
}
|
||||
function session_admin_firmstore_id(){
|
||||
$admin = session('admin.firmstore_id');
|
||||
return $admin;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ class Dashboard extends Backend
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//dump(session('admin'));
|
||||
try {
|
||||
\think\Db::execute("SET @@sql_mode='';");
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -23,6 +23,7 @@ class Firmbigcategory extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmbigcategory;
|
||||
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\Request;
|
||||
|
||||
/**
|
||||
* 企业客户信息
|
||||
@@ -24,6 +25,8 @@ class Firmcustomer extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmcustomer;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->model->where('firmcustomer.firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmcustomer.firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +56,7 @@ class Firmcustomer extends Backend
|
||||
|
||||
$list = $this->model
|
||||
->with(['firmstoreprojectstwo','firmcustomerorigin','firmemployee'])
|
||||
->where($where)
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ class Firmcustomerfollowuprecord extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmcustomerfollowuprecord;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ class Firmcustomerorigin extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmcustomerorigin;
|
||||
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ class Firmduty extends Backend
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmduty;
|
||||
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ class Firmemployee extends Backend
|
||||
$this->model = new \app\admin\model\Firmemployee;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->view->assign("employeeTypeList", $this->model->getEmployeeTypeList());
|
||||
|
||||
$this->model->where('firmemployee.firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmemployee.firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ class Firmfollowuptemplate extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmfollowuptemplate;
|
||||
|
||||
$this->model->where('firmfollowuptemplate.firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmfollowuptemplate.firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class Firmnotespoints extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmnotespoints;
|
||||
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class Firmstore extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmstore;
|
||||
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ class Firmstoreprojectsone extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmstoreprojectsone;
|
||||
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ class Firmstoreprojectstwo extends Backend
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmstoreprojectstwo;
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ class Firmtags extends Backend
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmtags;
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user