feat(testing): 增加质检报告独立编辑与详情页面,不再使用弹窗
这个提交包含在:
@@ -60,6 +60,7 @@ class Admin extends Backend
|
||||
}
|
||||
|
||||
$this->view->assign('groupdata', $groupdata);
|
||||
$this->view->assign('canSetGranarySites', $this->auth->isSuperAdmin());
|
||||
$this->assignconfig("admin", ['id' => $this->auth->id]);
|
||||
}
|
||||
|
||||
@@ -122,6 +123,18 @@ class Admin extends Backend
|
||||
if ($this->request->isPost()) {
|
||||
$this->token();
|
||||
$params = $this->request->post("row/a");
|
||||
if ($params) {
|
||||
if ($this->auth->isSuperAdmin()) {
|
||||
$scope = isset($params['granary_sites']) ? $params['granary_sites'] : 'all';
|
||||
if (!in_array($scope, ['all', 'center', 'xishui', 'none'], true)) $this->error('无效库区权限');
|
||||
$params['granary_sites'] = $scope;
|
||||
} elseif ($this->request->action() === 'add') {
|
||||
$ownScope = Db::name('admin')->where('id', $this->auth->id)->value('granary_sites');
|
||||
$params['granary_sites'] = $ownScope ?: 'none';
|
||||
} else {
|
||||
unset($params['granary_sites']);
|
||||
}
|
||||
}
|
||||
if ($params) {
|
||||
Db::startTrans();
|
||||
try {
|
||||
@@ -175,6 +188,18 @@ class Admin extends Backend
|
||||
if ($this->request->isPost()) {
|
||||
$this->token();
|
||||
$params = $this->request->post("row/a");
|
||||
if ($params) {
|
||||
if ($this->auth->isSuperAdmin()) {
|
||||
$scope = isset($params['granary_sites']) ? $params['granary_sites'] : 'all';
|
||||
if (!in_array($scope, ['all', 'center', 'xishui', 'none'], true)) $this->error('无效库区权限');
|
||||
$params['granary_sites'] = $scope;
|
||||
} elseif ($this->request->action() === 'add') {
|
||||
$ownScope = Db::name('admin')->where('id', $this->auth->id)->value('granary_sites');
|
||||
$params['granary_sites'] = $ownScope ?: 'none';
|
||||
} else {
|
||||
unset($params['granary_sites']);
|
||||
}
|
||||
}
|
||||
if ($params) {
|
||||
Db::startTrans();
|
||||
try {
|
||||
|
||||
在新工单中引用
屏蔽一个用户