shish 3 vuotta sitten
vanhempi
commit
7f3916f6ff

+ 11 - 0
app-hd/controllers/CgRefundController.php

@@ -4,6 +4,7 @@ namespace hd\controllers;
 
 use bizHd\cg\classes\CgRefundClass;
 use bizHd\cg\classes\CgRefundItemClass;
+use bizHd\cg\services\CgRefundService;
 use bizHd\purchase\classes\PurchaseClass;
 use common\components\imgUtil;
 use Yii;
@@ -14,6 +15,16 @@ class CgRefundController extends BaseController
 
     public $guestAccess = ['list', 'get-refund-data'];
 
+    //申请退款 ssh 20230807
+    public function actionCreateRefund()
+    {
+        $post = Yii::$app->request->post();
+
+        CgRefundService::createRefund();
+
+        util::success($post);
+    }
+
     //列表
     public function actionList()
     {

+ 4 - 3
app-hd/controllers/PurchaseController.php

@@ -39,10 +39,10 @@ class PurchaseController extends BaseController
         if (empty($info)) {
             util::fail('没有找到采购单');
         }
-        if (isset($info->mainId) == false || $info->mainId != $this->mainId) {
+        if (isset($info['mainId']) == false || $info['mainId'] != $this->mainId) {
             util::fail('没有权限访问');
         }
-        $orderSn = $info->orderSn ?? '';
+        $orderSn = $info['orderSn'] ?? '';
         $list = PurchaseItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*');
         if (!empty($list)) {
             foreach ($list as $key => $item) {
@@ -54,7 +54,8 @@ class PurchaseController extends BaseController
                 $list[$key]['shortCover'] = $shortCover;
             }
         }
-        util::success(['list' => $list, 'info' => $info]);
+        $info['product'] = $list;
+        util::success($info);
     }
 
     //虚拟供货商的采购 ssh 20230308

+ 5 - 0
biz-hd/cg/services/CgRefundService.php

@@ -28,6 +28,11 @@ class CgRefundService extends BaseService
 
     public static $baseFile = '\bizHd\cg\classes\CgRefundClass';
 
+    public static function createRefund()
+    {
+
+    }
+
     //新增退款
     public static function addRefund($post, $cg)
     {