diff --git a/app/Business/WithdrawalReserveStandard.php b/app/Business/WithdrawalReserveStandard.php new file mode 100644 index 00000000..1e3e38cd --- /dev/null +++ b/app/Business/WithdrawalReserveStandard.php @@ -0,0 +1,35 @@ + 20000, + '淘宝' => 10000, + '淘宝分销' => 10000, + '阿里巴巴' => 10000, + '京东' => 5000, + '京喜' => 5000, + '抖音' => 5000, + '拼多多' => 5000, + ]; + + public static function amountFor(?string $platform, ?string $erpStoreName): ?int + { + $platform = trim((string) $platform); + $erpStoreName = trim((string) $erpStoreName); + + if ($platform === '天猫' && in_array($erpStoreName, self::TMALL_HIGH_RESERVE_STORES, true)) { + return 50000; + } + + return self::PLATFORM_DEFAULTS[$platform] ?? null; + } +} diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php index c3a51bd6..a3687288 100644 --- a/app/Http/Controllers/Business/Pages.php +++ b/app/Http/Controllers/Business/Pages.php @@ -10,6 +10,7 @@ use App\Business\TableRegistry; use App\Business\UpstreamBusinessInformation; use App\Business\StoreReceivingAccountTemplate; use App\Business\StoreReceivingAccountWorkbookImporter; +use App\Business\WithdrawalReserveStandard; use App\Models\Banking\MarketingAccountBill; use App\Models\Business\CourierAgreementSignature; use App\Models\Business\CourierQuoteSignature; @@ -940,6 +941,14 @@ class Pages extends Controller $page, ['path' => request()->url(), 'query' => request()->except('page')], ); + $withdrawalReserveStandards = $withdrawalRows->getCollection()->mapWithKeys( + static fn (StoreReceivingAccount $row): array => [ + (int) $row->id => WithdrawalReserveStandard::amountFor( + $row->store_platform, + $row->erp_store_name, + ), + ], + )->all(); return [ 'view' => 'business.pages.fund-management.withdrawal-management', @@ -948,6 +957,7 @@ class Pages extends Controller 'withdrawalPlatforms' => $platforms, 'withdrawalPaths' => $withdrawalPaths, 'withdrawalBalances' => $withdrawalBalances, + 'withdrawalReserveStandards' => $withdrawalReserveStandards, 'withdrawalBalanceSummary' => [ 'source' => $this->jushuitanShopBalances->countForDate($balanceDate->toDateString()), 'matched' => (int) $balanceCounts->get('matched', 0), diff --git a/resources/views/business/pages/fund-management/withdrawal-management.blade.php b/resources/views/business/pages/fund-management/withdrawal-management.blade.php index f4da90c1..773c9b7f 100644 --- a/resources/views/business/pages/fund-management/withdrawal-management.blade.php +++ b/resources/views/business/pages/fund-management/withdrawal-management.blade.php @@ -85,6 +85,7 @@ $balanceTitle = $balanceMatch['status'] === 'matched' ? '聚水潭店铺:' . $balanceMatch['source_store_name'] . ';余额日期:' . $withdrawalBalanceDate : '余额日期:' . $withdrawalBalanceDate; + $reserveStandard = $withdrawalReserveStandards[(int) $row->id] ?? null; @endphp