shish 1 день назад
Родитель
Сommit
1be996e7a5
1 измененных файлов с 11 добавлено и 0 удалено
  1. 11 0
      app-ghs/controllers/OrderController.php

+ 11 - 0
app-ghs/controllers/OrderController.php

@@ -3022,6 +3022,17 @@ class OrderController extends BaseController
         if (empty($date) || !preg_match('/^\d{4}-\d{2}-\d{2}$/', $date)) {
             util::fail('请选择日期');
         }
+
+        $mainId = $this->mainId;
+        //超管或者约定的人可以修改日期
+        if (getenv('YII_ENV') == 'production') {
+            if (in_array($mainId, [23390])) {
+                if (!in_array($this->adminId, [24586, 23960, 24043])) {
+                    util::fail('你不能修改哦');
+                }
+            }
+        }
+
         $connection = Yii::$app->db;
         $transaction = $connection->beginTransaction();
         try {