|
|
@@ -4,14 +4,48 @@ namespace ghs\controllers;
|
|
|
|
|
|
|
|
|
use bizGhs\cg\classes\CgRefundClass;
|
|
|
+use bizGhs\cg\classes\CgRefundItemClass;
|
|
|
use bizGhs\cg\services\CgRefundService;
|
|
|
use bizGhs\order\classes\PurchaseOrderClass;
|
|
|
+use common\components\imgUtil;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
|
|
|
class CgRefundController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //详情 ssh 20220910
|
|
|
+ public function actionGetRefundFullInfo()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $refund = CgRefundClass::getById($id, true);
|
|
|
+ CgRefundClass::valid($refund, $this->mainId);
|
|
|
+ $refundSn = $refund->refundSn ?? '';
|
|
|
+ $itemList = CgRefundItemClass::getAllByCondition(['refundSn' => $refundSn], null, '*');
|
|
|
+ if (!empty($itemList)) {
|
|
|
+ foreach ($itemList as $key => $item) {
|
|
|
+ $shortCover = $item['cover'] ?? '';
|
|
|
+ $itemList[$key]['cover'] = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_130,w_130";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ util::success(['info' => $refund, 'itemList' => $itemList]);
|
|
|
+ }
|
|
|
+
|
|
|
+ //记录 ssh 20220910
|
|
|
+ public function actionGetRefundList()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $where = [];
|
|
|
+ $where['mainId'] = $this->mainId;
|
|
|
+ $refundSn = $get['refundSn'] ?? '';
|
|
|
+ if (!empty($orderSn)) {
|
|
|
+ $where['refundSn'] = $refundSn;
|
|
|
+ }
|
|
|
+ $list = CgRefundClass::getRefundList($where);
|
|
|
+ util::success($list);
|
|
|
+ }
|
|
|
+
|
|
|
//退款 ssh 20220909
|
|
|
public function actionCreateOrder()
|
|
|
{
|
|
|
@@ -84,4 +118,6 @@ class CgRefundController extends BaseController
|
|
|
}
|
|
|
util::complete();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|