Browse Source

合并订单

shish 2 months ago
parent
commit
29f7936b16
2 changed files with 29 additions and 0 deletions
  1. 28 0
      app-hd/controllers/PurchaseController.php
  2. 1 0
      biz-ghs/order/classes/OrderClass.php

+ 28 - 0
app-hd/controllers/PurchaseController.php

@@ -1041,6 +1041,34 @@ class PurchaseController extends BaseController
         util::success($respond);
     }
 
+    //获取合并采购单列表 ssh 20260519
+    public function actionMergeOrderList()
+    {
+        Yii::$app->params['pageSize'] = 9999;
+
+        $get = Yii::$app->request->get();
+        $mergeId = $get['mergeId'] ?? 0;
+        $ghsId = $get['ghsId'] ?? 0;
+        if (empty($mergeId)) {
+            util::fail('请选择采购单');
+        }
+        if (empty($ghsId)) {
+            util::fail('请选择供货商');
+        }
+        $ghsInfo = GhsClass::getGhsInfo($ghsId);
+        GhsClass::valid($ghsInfo, $this->shopId);
+        $where = [
+            'ghsId' => $ghsId,
+            'mergeId' => $mergeId,
+        ];
+        $respond = PurchaseService::getPurchaseList($where);
+        if (empty($respond['list'])) {
+            util::fail('请选择采购单');
+        }
+        $respond['shop'] = $this->shop->attributes;
+        util::success($respond);
+    }
+
     //采购详情 ssh 2021.01.25
     public function actionDetail()
     {

+ 1 - 0
biz-ghs/order/classes/OrderClass.php

@@ -1394,6 +1394,7 @@ class OrderClass extends BaseClass
                         $ids = array_column($mergeList, 'orderId');
                         $sameTimeIds = implode(',', $ids);
                         $data['list'][$key]['sameTimeIds'] = $sameTimeIds;
+                        $data['list'][$key]['mergeStatus'] = '已经使用新版本';
                     }
                 } else {
                     $sameTimeIds = $val['sameTimeIds'] ?? '';