|
|
@@ -87,18 +87,21 @@ class PurchaseClearController extends BaseController
|
|
|
}
|
|
|
$name = '采购单结算';
|
|
|
$totalFee = $order->actPrice;
|
|
|
- //强制使用小程序的miniOpenId
|
|
|
- $openId = isset($this->admin) && !empty($this->admin) ? $this->admin->miniOpenId : '';
|
|
|
+ $openId = '';
|
|
|
+ if (isset($post['currentMiniOpenId']) && !empty($post['currentMiniOpenId'])) {
|
|
|
+ $openId = $post['currentMiniOpenId'];
|
|
|
+ }
|
|
|
if (empty($openId)) {
|
|
|
- if (isset($post['currentMiniOpenId']) && !empty($post['currentMiniOpenId'])) {
|
|
|
- $openId = $post['currentMiniOpenId'];
|
|
|
+ if (isset($this->admin) && !empty($this->admin)) {
|
|
|
+ if (isset($this->admin->miniOpenId) && !empty($this->admin->miniOpenId)) {
|
|
|
+ $openId = $this->admin->miniOpenId;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (empty($openId)) {
|
|
|
- util::fail('没有openId');
|
|
|
+ util::fail('没有找到openId');
|
|
|
}
|
|
|
$capitalType = dict::getDict('capitalType', 'hdPurchaseClear', 'id');
|
|
|
-
|
|
|
$ghsShopId = $order->ghsShopId ?? 0;
|
|
|
$ghsShop = ShopClass::getById($ghsShopId, true);
|
|
|
if (empty($ghsShop)) {
|