Ver Fonte

制作单

shish há 4 anos atrás
pai
commit
328d5892d0
2 ficheiros alterados com 13 adições e 16 exclusões
  1. 7 12
      app-hd/controllers/OrderController.php
  2. 6 4
      biz/shop/classes/ShopExtClass.php

+ 7 - 12
app-hd/controllers/OrderController.php

@@ -421,24 +421,19 @@ class OrderController extends BaseController
             $id = $return->id ?? 0;
             $order = OrderClass::getById($id, true);
 
-            //商家自己开的微信、门店和美团单,默认不打小票,其它情况打小票
-            if ($order->fromType == 1 || $order->fromType == 3 || $order->fromType == 4) {
-                //美团一般都会生成制作单,要通过声音提示制作台
-                if ($order->fromType == 4) {
-                    $shopExt = ShopExtClass::getByCondition(['shopId' => $this->shopId], true);
-                    ShopExtClass::newMtWork($shopExt, $order);
-                }
-            } else {
-                OrderClass::onlinePrint($order);
-            }
-
+            //前台打小票
+            OrderClass::onlinePrint($order);
+            //前台云喇叭提示收款金额
             ShopExtClass::hdGatheringReport($order);
-
+            //前台提醒出示付款码
             if (isset($order->status) && $order->status == 1) {
                 if (isset($post['isCashier']) && $post['isCashier'] == 1) {
                     ShopExtClass::pleasePayReport($order);
                 }
             }
+            //制作台和美团制作台提示
+            $shopExt = ShopExtClass::getByCondition(['shopId' => $this->shopId], true);
+            ShopExtClass::newWorkRemind($shopExt, $order);
 
             util::success($return);
         } catch (\Exception $e) {

+ 6 - 4
biz/shop/classes/ShopExtClass.php

@@ -15,8 +15,8 @@ class ShopExtClass extends BaseClass
 
     public static $baseFile = '\biz\shop\models\ShopExt';
 
-    //美团有新的制作单
-    public static function newMtWork($shopExt, $order)
+    //新的制作单提示
+    public static function newWorkRemind($shopExt, $order)
     {
         $alone = $shopExt->mtAlone ?? 0;
         $id = $order->id ?? 0;
@@ -28,10 +28,12 @@ class ShopExtClass extends BaseClass
         if ($alone == 1) {
             $lbSn = $shopExt->mtLbSn ?? '';
         }
-        $sound = "您有新的美团单";
+        $sound = "您有新的制作单";
+        if ($order->fromType == 4) {
+            $sound = "您有新的美团单";
+        }
         $reachDate = $order->reachDate ?? '';
         if (!empty($reachDate) && $reachDate != '0000-00-00') {
-
             $readPeriod = $order->reachPeriod ?? 0;
             $reachPeriodName = dict::getDict('reachPeriodName');
             $period = $reachPeriodName[$readPeriod] ?? '上午';