浏览代码

打印机

shish 5 年之前
父节点
当前提交
5d768123a9

+ 1 - 1
app-pt/controllers/BaseController.php

@@ -24,7 +24,7 @@ class BaseController extends PublicController
             $this->validate = false;
         }
 
-        //纯彩花艺临时开放花材管理权限
+        //临时开放花材管理权限给商家
         $limitId = 4;
         if (getenv('YII_ENV') == 'production') {
             $limitId = 2;

+ 20 - 5
biz-ghs/order/classes/OrderClass.php

@@ -6,6 +6,7 @@ use biz\shop\classes\ShopAdminClass;
 use biz\shop\classes\ShopClass;
 use biz\shop\classes\ShopExtClass;
 use biz\shop\models\Shop;
+use biz\sj\classes\SjClass;
 use bizGhs\custom\models\Custom;
 use bizGhs\express\services\DadaExpressServices;
 use bizGhs\order\models\Order;
@@ -465,20 +466,34 @@ class OrderClass extends BaseClass
         if ($debtAmount > 0) {
             $content .= '累计欠款:' . $debtAmount . '<BR>';
         }
-        $i = self::getById($orderInfo['id']);
+
+        $shopId = $orderInfo['shopId'] ?? 0;
+        $shop = ShopClass::getById($shopId, true);
+        $sjId = $shop->sjId ?? 0;
+        $sj = SjClass::getById($sjId, true);
+        $sjName = $sj->name ?? '';
+        $currentName = $sjName;
+        if (isset($shop->default) == false || $shop->default != 1) {
+            $shopName = $shop->shopName ?? '';
+            if (!empty($shopName)) {
+                $currentName = $currentName . ' ' . $shopName;
+            }
+        }
+
+        $getInfo = self::getById($orderInfo['id']);
         $content .= '--------------------------------<BR>';
-        $content .= '订单日期:' . $i['addTime'] . '<BR>';
+        $content .= '订单日期:' . $getInfo['addTime'] . '<BR>';
         $content .= '订单编号:' . $respond['orderSn'] . '<BR>';
-        $content .= '门店名称:纯彩花艺<BR>';
+        $content .= '门店名称:' . $currentName . '<BR>';
         $content .= '门店地址:' . $respond['address'] . '<BR>';
         $content .= "<BR>";
         //$content .= "<C>扫码采购</C><BR>";
         //$url = Yii::$app->params['ghsDomain'] . '/#/pagesPurchase/ghsProduct';
         //$content .= '<QR>' . $url . '</QR>';//把二维码字符串用标签套上即可自动生成二维码
-        $shopId = $orderInfo['shopId'] ?? 0;
+
         $ext = ShopExtClass::getByCondition(['shopId' => $shopId]);
         $printSn = $ext['printSn'] ?? '';
-        if(!empty($printSn)){
+        if (!empty($printSn)) {
             $p = new printUtil($printSn);
             $p->printMsg($content);
         }

+ 1 - 1
console/controllers/SjInitController.php

@@ -15,7 +15,7 @@ use yii\console\Controller;
 class SjInitController extends Controller
 {
 
-    //纯彩花艺的商家初始化  ./yii sj-init/init ssh 2021.2.27
+    //商家初始化  ./yii sj-init/init ssh 2021.2.27
     public function actionInit()
     {
         $sjId = 12360;