shish 2 lat temu
rodzic
commit
23f2d941e3

+ 3 - 2
app-ghs/controllers/OrderController.php

@@ -1085,8 +1085,9 @@ class OrderController extends BaseController
                 }
                 //订单生成时唤起在线打印
                 if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {
-                    //预订单开单不打小票
-                    if ($order->book == 0) {
+                    //预订单开单不打小票,小向花卉不需要打小票
+                    $mainId = $order->mainId ?? 0;
+                    if ($order->book == 0 && !in_array($mainId, [23390])) {
                         if ($order->status != 1 && $order->status != 5) {
                             OrderClass::onlinePrint($order);
                             $ext = $this->shopExt;

+ 31 - 1
app-ghs/controllers/RefundController.php

@@ -94,6 +94,21 @@ class RefundController extends BaseController
             util::fail('无法操作');
         }
 
+        if (getenv('YII_ENV') == 'production') {
+            //小向花卉开单售后控制
+            if ($this->mainId == 23390) {
+                if (!in_array($this->adminId, [24043, 24585, 24586, 24654, 24115, 23960])) {
+                    util::fail('你不能售后哦。。');
+                }
+            }
+        } else {
+            if ($this->mainId == 644) {
+//                if (!in_array($this->adminId, [919])) {
+//                    util::fail('你不能售后哈');
+//                }
+            }
+        }
+
         $get = Yii::$app->request->get();
         $id = $get['id'] ?? 0;
         $version = $get['version'] ?? 0;
@@ -161,6 +176,21 @@ class RefundController extends BaseController
             util::fail('无法操作');
         }
 
+        if (getenv('YII_ENV') == 'production') {
+            //小向花卉开单售后控制
+            if ($this->mainId == 23390) {
+                if (!in_array($this->adminId, [24043, 24585, 24586, 24654, 24115, 23960])) {
+                    util::fail('你不能售后哦。。');
+                }
+            }
+        } else {
+            if ($this->mainId == 644) {
+//                if (!in_array($this->adminId, [919])) {
+//                    util::fail('你不能售后哈');
+//                }
+            }
+        }
+
         $post = Yii::$app->request->post();
         $id = $post['id'] ?? 0;
         $rejectReason = $post['rejectReason'] ?? '';
@@ -398,7 +428,7 @@ class RefundController extends BaseController
         if (getenv('YII_ENV') == 'production') {
             //小向花卉开单售后控制
             if ($this->mainId == 23390) {
-                if (!in_array($this->adminId, [24043, 24585, 24586, 24654, 24115])) {
+                if (!in_array($this->adminId, [24043, 24585, 24586, 24654, 24115, 23960])) {
                     util::fail('你不能售后哦。。');
                 }
             }