Commit 19bdda2e authored by 侯贺政's avatar 侯贺政

运费模板权限调整

Signed-off-by: 侯贺政's avatarhouhezheng <houhezheng@romens.cn>
parent 4e6f37b3
......@@ -361,9 +361,13 @@ class TransportSettingController extends BaseController
{
$params = Yii::$app->request->bodyParams;
$userInfo = (new ShopRbacUser)->getRbacUserInfo(Yii::$app->user->identity->GUID);
//只有总部和省级可以添加
if (!in_array($userInfo['ROLE_ID'],[USER_ROLE_REGION_ADMIN,USER_ROLE_HEADQUARTERS_ADMIN])) {
throw new BadRequestHttpException('没有添加权限!');
}
$model = new $this->modelClass();
$model->scenario = 'creation';
$model->attributes = $params;
$model->GUID = Func::create_guid();
$model->ORG_GUID = Yii::$app->user->identity->ORG_GUID;
......
......@@ -457,7 +457,7 @@ class ShopBranch extends BaseModel
}
$query = static::find()
->select(['GUID', 'NAME', 'CODE', 'RECIVER_PROVINCE as PROVINCE', 'RECIVER_CITY as CITY', 'RECIVER_REGION as REGION'])
->where('BRANCH_TYPE=1')
->where(['BRANCH_TYPE' => BRANCH_TYPE_REGION])
->andFilterWhere($where)
->andfilterWhere(['or', ['like', 'CODE', $search], ['like', 'NAME', $search]]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment