shish 4 年 前
コミット
f3fb295a1e

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

@@ -637,7 +637,6 @@ class OrderController extends BaseController
         $post['customName'] = $customName;
         $post['customNamePy'] = $custom['py'] ?? '';
         $post['customAvatar'] = $custom['shortSmallAvatar'] ?? '';
-        $post['shopAdminId'] = $this->shopAdminId;
         $post['province'] = $custom['province'] ?? '';
         $post['city'] = $custom['city'] ?? '';
         $post['dist'] = $custom['dist'] ?? '';
@@ -648,7 +647,8 @@ class OrderController extends BaseController
         $post['long'] = $custom['long'] ?? '';
         $post['lat'] = $custom['lat'] ?? '';
         $shopAdmin = $this->shopAdmin->attributes;
-        $post['shopAdminName'] = $shopAdmin['name'] ?? '';
+        $post['shopAdminId'] = isset($post['shopAdminId']) && !empty($post['shopAdminId']) ? $post['shopAdminId'] : $this->shopAdminId;
+        $post['shopAdminName'] = isset($post['shopAdminName']) && !empty($post['shopAdminName']) ? $post['shopAdminName'] : $shopAdmin['name'];
         $post['sjId'] = $this->sjId;
         $post['shopId'] = $shopId;
         $post['mainId'] = $this->mainId;
@@ -904,7 +904,7 @@ class OrderController extends BaseController
         $info['hasCloudPrint'] = $hasCloudPrint;
 
         //店长信息
-        $mainId = $info['mainId']??0;
+        $mainId = $info['mainId'] ?? 0;
         $superInfo = ShopAdminClass::getManager($mainId);
         $info['customSuper'] = $superInfo;
 

+ 7 - 0
app-ghs/controllers/ShopAdminController.php

@@ -21,6 +21,13 @@ class ShopAdminController extends BaseController
 
     public $guestAccess = ['generate-admin'];
 
+    //获取所有在职员工 ssh 20220507
+    public function actionGetAllStaff()
+    {
+        $list = ShopAdminClass::getAllByCondition(['mainId' => $this->mainId, 'delStatus' => 0, 'status' => 1, 'isPt' => 0,], null, 'id,name', null, true);
+        util::success(['list' => $list]);
+    }
+
     //获取添加员工的验证码 ssh 20210117
     public function actionGetStaffAuthCode()
     {