shish %!s(int64=2) %!d(string=hai) anos
pai
achega
3e3c9f2e43
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      app-hd/controllers/PurchaseController.php

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

@@ -651,6 +651,14 @@ class PurchaseController extends BaseController
         $info['balance'] = $this->shop->balance ?? 0;
         $info['balance'] = $this->shop->balance ?? 0;
         $getPayType = dict::getDict('getPayType');
         $getPayType = dict::getDict('getPayType');
         $info['getPayType'] = $getPayType;
         $info['getPayType'] = $getPayType;
+
+        //获取售后条件
+        $ghsId = $info['ghsId'] ?? 0;
+        $ghsInfo = GhsClass::getById($ghsId, true);
+        if (empty($ghsInfo)) {
+            util::fail('没有找到供货商');
+        }
+        $info['afterSale'] = $ghsInfo->afterSale ?? 1;
         util::success($info);
         util::success($info);
     }
     }