diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php index f6abd339..4b1e236f 100644 --- a/app/Http/Controllers/Business/Pages.php +++ b/app/Http/Controllers/Business/Pages.php @@ -4693,6 +4693,7 @@ class Pages extends Controller 'online-daifa-price' => $this->contentForOnlineDaifaPrice(), 'product-costs' => $this->contentForProductCosts(), 'financial-analysis' => $this->contentForFinancialAnalysis(), + 'oa-process' => $this->contentForProcessDetails(), 'labor-expenses' => $this->contentForLaborExpenses(), 'courier-surcharge' => $this->contentForCourierSurcharge($tab), 'courier-surcharge-settlement' => $this->contentForCourierSurchargeSettlementPage(), @@ -4722,6 +4723,17 @@ class Pages extends Controller }; } + protected function contentForProcessDetails(): array + { + $data = app(\Modules\EcommerceFinance\View\ProcessDetailsPageData::class)->page(request()); + $data['view'] = 'business.pages.financial-operations.process-details-content'; + $data['scopeLabel'] = ($data['scope'] ?? null) === 'personal_permission' + ? '当前账号权限范围' + : ($data['scope'] ?? ''); + + return $data; + } + protected function contentForLaborExpenses(): array { return [ diff --git a/resources/views/business/pages/financial-operations/process-details-content.blade.php b/resources/views/business/pages/financial-operations/process-details-content.blade.php index 73c4f718..e2850e3c 100644 --- a/resources/views/business/pages/financial-operations/process-details-content.blade.php +++ b/resources/views/business/pages/financial-operations/process-details-content.blade.php @@ -1,7 +1,27 @@ @php + $filters ??= []; + $summary ??= []; + $documentTypes ??= []; + $statuses ??= []; + $error ??= null; $paymentStates = $paymentStates ?? ($pageData['paymentStates'] ?? []); $mirrorStale = $mirrorStale ?? ($pageData['mirrorStale'] ?? false); $mirrorStaleAfterMinutes = $mirrorStaleAfterMinutes ?? ($pageData['mirrorStaleAfterMinutes'] ?? 15); + $scopeLabel ??= (($scope ?? null) === 'personal_permission' + ? '当前账号权限范围' + : ($scope ?? '')); + $money ??= static fn (mixed $value): string => $value === null || $value === '' + ? '-' + : number_format((float) $value, 2); + $text ??= static fn (mixed $value): string => $value === null || trim((string) $value) === '' + ? '-' + : (string) $value; + $statusClass ??= static fn (string $status): string => match ($status) { + '已完成' => 'is-success', + '审批中' => 'is-warning', + '已终止', '已撤销' => 'is-danger', + default => 'is-neutral', + }; $paymentStateClass = static fn (string $state): string => match ($state) { '出纳已打款' => 'is-success', '出纳待打款', '出纳退回' => 'is-warning', @@ -9,6 +29,16 @@ '出纳未开始', '流程终止', '不涉及付款' => 'is-neutral', default => 'is-neutral', }; + $pageUrl ??= route('business.pages.show', [ + 'section' => 'process-data', + 'page' => 'oa-process', + ]); + $exportFilters = array_filter( + $filters, + static fn (mixed $value): bool => $value !== '' && $value !== null, + ); + $exportUrl ??= url('/' . company_id() . '/workspace/process-data/oa-process/export') + . ($exportFilters === [] ? '' : '?' . http_build_query($exportFilters)); @endphp