Pārlūkot izejas kodu

Merge branch 'master' of git.huaml.com:zhh/huahuibao

shizhongqi 10 mēneši atpakaļ
vecāks
revīzija
36453b9d61

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

@@ -1265,10 +1265,12 @@ class OrderController extends BaseController
         } else {
             if (!empty($diff)) {
                 $mainId = $this->mainId;
-                //花样年华 限制员工只能按原价开单,不能改价格
+                //花样年华,除了老板,只能按原价开单,不能改价格
                 if (getenv('YII_ENV') == 'production') {
                     if (in_array($mainId, [1553, 1563])) {
-                        util::fail('请按花材原价格开单');
+                        if ($this->adminId != 2876) {
+                            util::fail('请按花材原价格开单');
+                        }
                     }
                 } else {
                     if (in_array($mainId, [0, 1])) {

+ 35 - 0
app-ghs/controllers/ShopController.php

@@ -9,6 +9,7 @@ use biz\sj\services\MerchantExtendService;
 use bizGhs\admin\classes\AdminClass;
 use bizGhs\custom\classes\CustomClass;
 use bizGhs\ghs\classes\GhsClass;
+use bizGhs\merchant\classes\MerchantClass;
 use bizGhs\merchant\classes\ShopClass;
 use bizGhs\merchant\services\ShopService;
 use bizGhs\pictext\classes\PicTextClass;
@@ -30,6 +31,40 @@ class ShopController extends BaseController
 
     public $guestAccess = ['all'];
 
+    public function actionModifySjName()
+    {
+        $get = Yii::$app->request->get();
+        $adminId = $this->adminId;
+        if (getenv('YII_ENV') == 'production') {
+            if ($adminId != 4) {
+                util::fail('请联系管理员修改');
+            }
+        } else {
+            if ($adminId != 919) {
+                util::fail('请联系管理员修改');
+            }
+        }
+        $name = $get['name'] ?? '';
+        if (empty($name)) {
+            util::fail('请填写名称');
+        }
+        $shop = $this->shop;
+        $shop->merchantName = $name;
+        $shop->save();
+        $sjId = $shop->sjId;
+        $sj = MerchantClass::getById($sjId, true);
+        if (empty($sj)) {
+            util::fail('门店信息缺失呢');
+        }
+        $sj->name = $name;
+        $sj->save();
+        $fullName = $shop->shopName == '首店' ? $name : $name . ' ' . $shop->shopName;
+        $shopId = $shop->id;
+        $py = stringUtil::py($fullName);
+        GhsClass::updateByCondition(['shopId' => $shopId], ['name' => $fullName, 'py' => $py]);
+        util::complete('修改成功');
+    }
+
     //小程序端使用,下载收款码 ssh 20250821
     public function actionMiniGatheringCode()
     {

+ 2 - 1
app-ghs/controllers/TestController.php

@@ -398,7 +398,8 @@ class TestController extends BaseController
             //['name' => '济南伟伟鲜花批发', 'merchantNo' => '8224510599200EL', 'wx' => [789073494, 789074603], 'zfb' => '2088670850497224'],
             //['name' => '赣州紫荆鲜花批发', 'merchantNo' => '82242805992004J', 'wx' => [790052021, 790051859], 'zfb' => '2088670969143838'],
             //['name' => '莆田鲜花闪送', 'merchantNo' => '82239405992005W', 'wx' => [808858266, 808858114], 'zfb' => '2088970298325670'],
-            ['name' => '惠安花优美', 'merchantNo' => '8223970599200DP', 'wx' => [811651765, 811651866], 'zfb' => '2088970528927690'],
+            ['name' => '昆明小向鲜花', 'merchantNo' => '8227310599200UX', 'wx' => [811911098, 811911180], 'zfb' => '2088970555233957'],
+            //['name' => '惠安花优美', 'merchantNo' => '8223970599200DP', 'wx' => [811651765, 811651866], 'zfb' => '2088970528927690'],
             //['name' => '小榄淘花里', 'merchantNo' => '8226030599200A2', 'wx' => [809357489, 809358311], 'zfb' => '2088970343842282'],
             ['name' => '深圳鼎盛皇室花卉', 'merchantNo' => '8225840599201MF', 'wx' => [807078304, 807076486], 'zfb' => '2088970117746334'],
             //['name' => '东莞惠雅鲜花(莞城店)', 'merchantNo' => '8226020599200GJ', 'wx' => [796953190, 796976959], 'zfb' => '2088770940104912'],

+ 38 - 3
app-hd/controllers/ShopController.php

@@ -8,6 +8,8 @@ use bizGhs\admin\classes\AdminClass;
 use bizGhs\custom\classes\CustomClass;
 use bizHd\admin\classes\ShopAdminClass;
 use bizHd\custom\classes\CustomClass as HdCustomClass;
+use bizHd\custom\classes\HdClass;
+use bizHd\merchant\classes\SjClass;
 use bizHd\merchant\services\ShopService;
 use bizHd\purchase\classes\PurchaseClass;
 use bizHd\saas\services\RegionService;
@@ -26,6 +28,39 @@ class ShopController extends BaseController
 
     public $guestAccess = ['all', 'gathering-img-url', 'check-shop'];
 
+    public function actionModifySjName()
+    {
+        $get = Yii::$app->request->get();
+        $adminId = $this->adminId;
+        if (getenv('YII_ENV') == 'production') {
+            if ($adminId != 4) {
+                util::fail('请联系管理员修改');
+            }
+        } else {
+            if ($adminId != 919) {
+                util::fail('请联系管理员修改');
+            }
+        }
+        $name = $get['name'] ?? '';
+        if (empty($name)) {
+            util::fail('请填写名称');
+        }
+        $shop = $this->shop;
+        $shop->merchantName = $name;
+        $shop->save();
+        $sjId = $shop->sjId;
+        $sj = SjClass::getById($sjId, true);
+        if (empty($sj)) {
+            util::fail('门店信息缺失呢');
+        }
+        $sj->name = $name;
+        $sj->save();
+        $fullName = $shop->shopName == '首店' ? $name : $name . ' ' . $shop->shopName;
+        $shopId = $shop->id;
+        HdClass::updateByCondition(['shopId' => $shopId], ['name' => $fullName]);
+        util::complete('修改成功');
+    }
+
     //我的可以进入的门店 ssh 20230424
     public function actionMyShop()
     {
@@ -487,13 +522,13 @@ class ShopController extends BaseController
         $id = isset($data['id']) ? $data['id'] : 0;
         $shop = ShopClass::getById($id, true, 'id, sjId, avatar');
         ShopService::valid($shop, $this->sjId);
-        if(isset($data['avatar']) && $data['avatar']!='') {
+        if (isset($data['avatar']) && $data['avatar'] != '') {
             $shop->avatar = $data['avatar'];
             $re = $shop->save();
 
             if ($re) {
-                \bizGhs\custom\classes\CustomClass::updateByCondition(['shopId'=>$id], [
-                    'avatar'=>$data['avatar']
+                \bizGhs\custom\classes\CustomClass::updateByCondition(['shopId' => $id], [
+                    'avatar' => $data['avatar']
                 ]);
                 util::complete('头像修改完成');
             }

+ 2 - 2
biz-ghs/order/classes/OrderClass.php

@@ -1810,7 +1810,7 @@ class OrderClass extends BaseClass
         if (getenv('YII_ENV') == 'production') {
             $map = [65726, 58];
         } else {
-            $map = [828, 0];
+            $map = [828];
         }
         if (in_array($orderMainId, $map)) {
             self::printLogisticsLabel($orderInfo, $shop, $ext);
@@ -2855,7 +2855,7 @@ XL;
         if (getenv('YII_ENV') == 'production') {
             $map = [65726, 58];
         } else {
-            $map = [828, 0];
+            $map = [828];
         }
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
         $customId = $order->customId ?? 0;