|
|
@@ -53,13 +53,13 @@ class ExpendController extends BaseController
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
if (in_array($mainId, [23390])) {
|
|
|
if (!in_array($this->adminId, [24655])) {
|
|
|
- util::fail('你不能操作');
|
|
|
+ util::fail('请财务人员操作');
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
if (in_array($mainId, [644])) {
|
|
|
- if (!in_array($this->adminId, [9191])) {
|
|
|
- util::fail('你不能操作');
|
|
|
+ if (!in_array($this->adminId, [919])) {
|
|
|
+ //util::fail('请财务人员操作哈');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -148,6 +148,26 @@ class ExpendController extends BaseController
|
|
|
//新增支出 ssh 20220710
|
|
|
public function actionAddExpend()
|
|
|
{
|
|
|
+ $staff = $this->shopAdmin;
|
|
|
+ if (isset($staff->finance) == false || $staff->finance == 0) {
|
|
|
+ util::fail('请财务操作。');
|
|
|
+ }
|
|
|
+
|
|
|
+ $mainId = $this->mainId;
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ if (in_array($mainId, [23390])) {
|
|
|
+ if (!in_array($this->adminId, [24655])) {
|
|
|
+ util::fail('请财务人员操作吧');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (in_array($mainId, [644])) {
|
|
|
+ if (!in_array($this->adminId, [919])) {
|
|
|
+ //util::fail('请财务人员操作哦');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$post = Yii::$app->request->post();
|
|
|
$type = $post['type'] ?? -1;
|
|
|
$amount = $post['amount'] ?? 0;
|