超管后台优化

This commit is contained in:
meimei
2025-05-08 10:47:04 +08:00
parent f0bd04e5d9
commit cd2ed33305
33 changed files with 184 additions and 139 deletions

View File

@@ -72,6 +72,15 @@ class Firm extends Backend
$this->model->validateFailException()->validate($validate);
}
$result = $this->model->allowField(true)->insertGetId($params);
if (!$result){
$this->error(__('No rows were inserted'));
Db::rollback();
}
$firmstoreResult = Db::table('fa_firmstore')->insert(['firm_id'=>$result,'name'=>$params['full_name'].'门店']);
if (!$firmstoreResult){
$this->error(__('No rows were inserted firmstore'));
Db::rollback();
}
$addaicustomerswrvicelistResult = $this->addaicustomerswrvicelist($params,$result);
if (!$addaicustomerswrvicelistResult['res']){
$this->error($addaicustomerswrvicelistResult['text']);

View File

@@ -53,6 +53,7 @@ class Firmbigcategory extends Backend
$list = $this->model
->with(['firm'])
->where($where)
->where('firm_id',1)
// ->order($sort, $order)
->order('firm_id asc,id desc')
->paginate($limit);

View File

@@ -53,6 +53,7 @@ class Firmcustomerorigin extends Backend
$list = $this->model
->with(['firm'])
->where($where)
->where('firm_id',1)
// ->order($sort, $order)
->order('firm_id asc,id desc')
->paginate($limit);

View File

@@ -53,6 +53,7 @@ class Firmduty extends Backend
$list = $this->model
->with(['firm','firmstore'])
->where($where)
->where('firmduty.firm_id',1)
// ->order($sort, $order)
->order('firm_id asc,id desc')
->paginate($limit);

View File

@@ -53,6 +53,7 @@ class Firmstoreprojectsone extends Backend
$list = $this->model
->with(['firm'])
->where($where)
->where('firm_id',1)
// ->order($sort, $order)
->order('firm_id asc,id desc')
->paginate($limit);

View File

@@ -57,6 +57,7 @@ class Firmtags extends Backend
$list = $this->model
->with(['firm'])
->where($where)
->where('firm_id',1)
// ->order($sort, $order)
->order('firm_id asc,id desc')
->paginate($limit);

View File

@@ -39,12 +39,26 @@ class Index extends Backend
config('fastadmin.' . $key, $cookieValue);
}
}
$userRule = ["*","general","category","addon","auth","general/config","general/attachment","general/profile","auth/admin","auth/adminlog","auth/group","auth/rule",
"dashboard/index","dashboard/add","dashboard/del","dashboard/edit","dashboard/multi","general/config/index","general/config/add","general/config/edit","general/config/del","general/config/multi",
"general/attachment/index","general/attachment/select","general/attachment/add","general/attachment/edit","general/attachment/del","general/attachment/multi",
"general/profile/index","general/profile/update","general/profile/add","general/profile/edit","general/profile/del","general/profile/multi",
"category/index","category/add","category/edit","category/del","category/multi","auth/admin/index","auth/admin/add","auth/admin/edit","auth/admin/del",
"auth/adminlog/index","auth/adminlog/detail","auth/adminlog/del","auth/group/index","auth/group/add","auth/group/edit","auth/group/del","auth/rule/index",
"auth/rule/add","auth/rule/edit","auth/rule/del","addon/index","addon/add","addon/edit","addon/del","addon/downloaded","addon/state","addon/config",
"addon/refresh","addon/multi","user","user/user","user/user/index","user/user/edit","user/user/add","user/user/del","user/user/multi",
"user/group","user/group/add","user/group/edit","user/group/index","user/group/del","user/group/multi","user/rule","user/rule/index","user/rule/del","user/rule/add","user/rule/edit","user/rule/multi",
"command","command/index","command/add","command/detail","command/command","command/execute","command/del","command/multi","firm","firm/index","firm/add","firm/edit","firm/del","firm/multi",
"firmbigcategory","firmbigcategory/index","firmbigcategory/add","firmbigcategory/edit","firmbigcategory/del","firmbigcategory/multi","kefuguanli",
"firm","firm/index","firm/add","firm/edit","firm/del","firm/multi","aicustomerservice","aicustomerservice/index","aicustomerservice/add","aicustomerservice/edit","aicustomerservice/del","aicustomerservice/multi",
"mattertemplate","mattertemplate/index","mattertemplate/add","mattertemplate/edit","mattertemplate/del","mattertemplate/multi","jichuguanli","firmcustomerorigin","firmcustomerorigin/index","firmduty","firmduty/index",
"firmstoreprojectsone","firmstoreprojectsone/index","firmtags","firmtags/index","aicustomerservicefirmstorelist","aicustomerservicefirmstorelist/index","mattertemplatecategorization","mattertemplatecategorization/index"];
//左侧菜单
list($menulist, $navlist, $fixedmenu, $referermenu) = $this->auth->getSidebar([
'dashboard' => 'hot',
'addon' => ['new', 'red', 'badge'],
'auth/rule' => __('Menu'),
], $this->view->site['fixedpage']);
], $this->view->site['fixedpage'],$userRule);
$action = $this->request->request('action');
if ($this->request->isPost()) {
if ($action == 'refreshmenu') {

View File

@@ -54,6 +54,7 @@ class Mattertemplatecategorization extends Backend
$list = $this->model
->with(['mattertemplate','firmstoreprojectsone','firmstoreprojectstwo','firm'])
->where($where)
->where('mattertemplatecategorization.firm_id',1)
// ->order($sort, $order)
->order('firm_id asc,id desc')
->paginate($limit);