From 09a30cd980465f826e9ca2ea0897b2b7f1f00ed6 Mon Sep 17 00:00:00 2001 From: shanshi <3316401569@qq.com> Date: Thu, 19 Nov 2026 11:21:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=A1=A8=E5=A4=B4=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E5=9B=9E=E8=BD=A6=E7=9B=B4=E6=8E=A5=E7=AD=9B=E9=80=89=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E9=A1=B9=20(#1261)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../non-store-accounts.blade.php | 14 ++++++++++++++ .../Business/NonStoreAccountMonitorTest.php | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/resources/views/business/pages/financial-operations/non-store-accounts.blade.php b/resources/views/business/pages/financial-operations/non-store-accounts.blade.php index 9db03e8c..6cebd3cb 100644 --- a/resources/views/business/pages/financial-operations/non-store-accounts.blade.php +++ b/resources/views/business/pages/financial-operations/non-store-accounts.blade.php @@ -3086,7 +3086,21 @@ filterSearch.addEventListener('input', showFilterOptions); filterSearch.addEventListener('keydown', (event) => { if (event.key !== 'Enter' || !activeFilter) return; + if (event.isComposing || event.keyCode === 229) return; event.preventDefault(); + const normalizedQuery = filterSearch.value.trim().toLocaleLowerCase('zh-CN'); + if (normalizedQuery !== '') { + const matchingValues = activeFilter.values.filter( + (value) => value.toLocaleLowerCase('zh-CN').includes(normalizedQuery), + ); + if (matchingValues.length === 0) return; + activeFilter.selection = new Set(matchingValues); + activeFilter.state.filter = matchingValues.length === activeFilter.values.length + ? null + : new Set(matchingValues); + activeFilter.applyTable(); + filterCount.textContent = `全部账户 · 已选 ${activeFilter.selection.size} / ${activeFilter.values.length}`; + } activeFilter.applyServer(); }); sortButtons.forEach((button) => { diff --git a/tests/Feature/Business/NonStoreAccountMonitorTest.php b/tests/Feature/Business/NonStoreAccountMonitorTest.php index 07d48666..d85c46af 100644 --- a/tests/Feature/Business/NonStoreAccountMonitorTest.php +++ b/tests/Feature/Business/NonStoreAccountMonitorTest.php @@ -444,6 +444,18 @@ class NonStoreAccountMonitorTest extends FeatureTestCase $this->assertStringNotContainsString('分页占位公司001', $tableMatch[0]); $this->assertStringContainsString('全部账户 · 已选', $html); $this->assertStringContainsString('data-nsm-filter-key="account_display_short"', $html); + $this->assertStringContainsString( + 'const matchingValues = activeFilter.values.filter(', + $html, + ); + $this->assertStringContainsString( + 'activeFilter.selection = new Set(matchingValues);', + $html, + ); + $this->assertStringContainsString( + 'if (event.isComposing || event.keyCode === 229) return;', + $html, + ); $this->assertSame(1, preg_match( '/const serverColumnFilterValues = (.*?);\s*const serverColumnFilters/s', $html, From 92c7450f8f1026da54b762426f837dc45978aca0 Mon Sep 17 00:00:00 2001 From: yueyang <2495544247@qq.com> Date: Thu, 19 Nov 2026 11:30:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E5=BE=85=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E6=B1=87=E6=80=BB=E6=94=AF=E6=8C=81=E5=90=8C=E9=A1=B5=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E4=BA=BA=E6=98=8E=E7=BB=86=20(#1262)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Http/Controllers/ProcessDetails.php | 24 ++ .../View/ProcessDetailsPageData.php | 13 +- .../process-details-content.blade.php | 365 +++++++++++++++++- ...s-details-pending-payment-detail.blade.php | 228 +++++++++++ .../Business/ProcessDetailsPageTest.php | 157 +++++++- .../ProcessDetailsPageDataTest.php | 66 ++++ 6 files changed, 841 insertions(+), 12 deletions(-) create mode 100644 resources/views/business/pages/financial-operations/process-details-pending-payment-detail.blade.php diff --git a/modules/EcommerceFinance/Http/Controllers/ProcessDetails.php b/modules/EcommerceFinance/Http/Controllers/ProcessDetails.php index 5914160b..81e48b8d 100644 --- a/modules/EcommerceFinance/Http/Controllers/ProcessDetails.php +++ b/modules/EcommerceFinance/Http/Controllers/ProcessDetails.php @@ -65,6 +65,29 @@ class ProcessDetails extends Controller ); $backUrl = url('/' . company_id() . '/workspace/process-data/oa-process') . ($backFilters === [] ? '' : '?' . http_build_query($backFilters)); + $pendingPaymentSummaryFilters = array_filter( + array_merge($pageData['filters'], ['current_approver_name' => '']), + static fn (mixed $value): bool => $value !== '' && $value !== null, + ); + $pendingPaymentSummaryUrl = url( + '/' . company_id() . '/workspace/process-data/oa-process/pending-payment-summary', + ) . ($pendingPaymentSummaryFilters === [] + ? '' + : '?' . http_build_query($pendingPaymentSummaryFilters)); + + if (($pageData['pendingPaymentDetailMode'] ?? false) && $request->ajax()) { + return response() + ->view('business.pages.financial-operations.process-details-pending-payment-detail', [ + ...$pageData, + 'pageUrl' => url( + '/' . company_id() + . '/workspace/process-data/oa-process/pending-payment-summary', + ), + 'backUrl' => $backUrl, + 'pendingPaymentSummaryUrl' => $pendingPaymentSummaryUrl, + ]) + ->header('Cache-Control', 'no-store'); + } return view('business.pages.financial-operations.process-details', [ ...$pageData, @@ -72,6 +95,7 @@ class ProcessDetails extends Controller 'page' => ['slug' => 'oa-process', 'title' => 'OA流程'], 'pageUrl' => url('/' . company_id() . '/workspace/process-data/oa-process/pending-payment-summary'), 'backUrl' => $backUrl, + 'pendingPaymentSummaryUrl' => $pendingPaymentSummaryUrl, ]); } diff --git a/modules/EcommerceFinance/View/ProcessDetailsPageData.php b/modules/EcommerceFinance/View/ProcessDetailsPageData.php index 6beb4099..db36a90d 100644 --- a/modules/EcommerceFinance/View/ProcessDetailsPageData.php +++ b/modules/EcommerceFinance/View/ProcessDetailsPageData.php @@ -209,16 +209,23 @@ class ProcessDetailsPageData { $filters = self::normalizeFilters($request); $filters['payment_state'] = '待付款'; + $pendingPaymentDetailMode = $request->query('pending_view') === 'detail'; $page = max((int) $request->query('page', 1), 1); $perPage = self::normalizePerPage($request->query('per_page')); $paginationQuery = array_filter( - [...$filters, 'per_page' => $perPage], + [ + ...$filters, + 'pending_view' => $pendingPaymentDetailMode ? 'detail' : '', + 'per_page' => $perPage, + ], static fn (mixed $value): bool => $value !== '' && $value !== null, ); try { $options = $this->repository->filterOptions($filters); - $result = $this->repository->paginatePendingPaymentApprovers($filters, $page, $perPage); + $result = $pendingPaymentDetailMode + ? $this->repository->paginate($filters, $page, $perPage) + : $this->repository->paginatePendingPaymentApprovers($filters, $page, $perPage); return [ 'processRows' => new LengthAwarePaginator( @@ -243,6 +250,7 @@ class ProcessDetailsPageData 'error' => null, 'approvalSummaryMode' => false, 'pendingPaymentSummaryMode' => true, + 'pendingPaymentDetailMode' => $pendingPaymentDetailMode, ]; } catch (Throwable $exception) { report($exception); @@ -273,6 +281,7 @@ class ProcessDetailsPageData 'error' => 'OA流程镜像尚未完成导入,请稍后重试。', 'approvalSummaryMode' => false, 'pendingPaymentSummaryMode' => true, + 'pendingPaymentDetailMode' => $pendingPaymentDetailMode, ]; } } 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 2295eda2..61046103 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 @@ -11,8 +11,11 @@ $mirrorStaleAfterMinutes = $mirrorStaleAfterMinutes ?? ($pageData['mirrorStaleAfterMinutes'] ?? 15); $approvalSummaryMode = $approvalSummaryMode ?? ($pageData['approvalSummaryMode'] ?? false); $pendingPaymentSummaryMode = $pendingPaymentSummaryMode ?? ($pageData['pendingPaymentSummaryMode'] ?? false); + $pendingPaymentDetailMode = $pendingPaymentDetailMode ?? ($pageData['pendingPaymentDetailMode'] ?? false); $summaryMode = $approvalSummaryMode || $pendingPaymentSummaryMode; - $summaryRowUnit = $pendingPaymentSummaryMode ? '个审批人' : ($approvalSummaryMode ? '个审批' : '行'); + $summaryRowUnit = $pendingPaymentDetailMode + ? '行' + : ($pendingPaymentSummaryMode ? '个审批人' : ($approvalSummaryMode ? '个审批' : '行')); $backUrl = $backUrl ?? null; $perPageOptions = \Modules\EcommerceFinance\View\ProcessDetailsPageData::PER_PAGE_OPTIONS; $scopeLabel ??= (($scope ?? null) === 'personal_permission' @@ -81,6 +84,18 @@ $pendingPaymentSummaryFilters = array_merge($exportFilters, ['payment_state' => '待付款']); $pendingPaymentSummaryUrl = url('/' . company_id() . '/workspace/process-data/oa-process/pending-payment-summary') . '?' . http_build_query($pendingPaymentSummaryFilters); + $pendingPaymentSummaryBaseFilters = $filters; + unset($pendingPaymentSummaryBaseFilters['current_approver_name']); + $pendingPaymentSummaryBaseFilters['payment_state'] = '待付款'; + $pendingPaymentSummaryBaseFilters = array_filter( + $pendingPaymentSummaryBaseFilters, + static fn (mixed $value): bool => $value !== '' && $value !== null, + ); + $pendingPaymentSummaryViewUrl ??= url( + '/' . company_id() . '/workspace/process-data/oa-process/pending-payment-summary', + ) . ($pendingPaymentSummaryBaseFilters === [] + ? '' + : '?' . http_build_query($pendingPaymentSummaryBaseFilters)); @endphp @if ($summaryMode) @@ -615,6 +630,129 @@ font-variant-numeric: tabular-nums; } + .process-details-summary-tabs { + display: inline-flex; + align-items: center; + gap: .25rem; + min-height: 2rem; + padding: .15rem; + border: 1px solid var(--vip-border, #D8D2C7); + border-radius: .5rem; + background: #faf9f6; + } + + .process-details-summary-tabs__tab { + display: inline-flex; + min-height: 1.65rem; + align-items: center; + gap: .3rem; + padding: 0 .65rem; + border: 0; + border-radius: .35rem; + background: transparent; + color: var(--vip-content-muted, #595959); + font: inherit; + font-size: .72rem; + font-weight: 600; + text-decoration: none; + cursor: pointer; + } + + .process-details-summary-tabs__tab:hover, + .process-details-summary-tabs__tab:focus-visible { + color: var(--vip-content-accent-dark, #856632); + outline: none; + } + + .process-details-summary-tabs__tab[aria-selected="true"] { + background: #fff; + color: var(--vip-content-accent-dark, #856632); + box-shadow: inset 0 -2px 0 var(--vip-content-accent, #B9954F); + } + + .process-details-summary-tabs__tab[aria-disabled="true"] { + color: #9a958c; + cursor: default; + } + + .process-details-pending-detail-host { + display: flex; + flex-direction: column; + gap: 1rem; + } + + .process-details-pending-detail-host[hidden], + .process-details-pending-summary-panel[hidden] { + display: none; + } + + .process-details-pending-detail-host.is-loading { + min-height: 12rem; + opacity: .58; + pointer-events: none; + } + + .process-details-pending-detail { + display: flex; + flex-direction: column; + gap: .75rem; + } + + .process-details-pending-detail__heading { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: .55rem .9rem; + padding: .7rem .9rem; + border: 1px solid rgba(185, 149, 79, .36); + border-radius: .65rem; + background: rgba(255, 253, 248, .9); + } + + .process-details-pending-detail__heading > div { + display: flex; + flex-wrap: wrap; + align-items: baseline; + gap: .35rem .7rem; + } + + .process-details-pending-detail__eyebrow { + color: var(--vip-content-accent-dark, #856632); + font-size: .72rem; + font-weight: 700; + } + + .process-details-pending-detail__heading strong { + color: var(--vip-content-ink, #171717); + font-size: .9rem; + } + + .process-details-pending-detail__summary-link { + display: inline-flex; + min-height: 1.9rem; + align-items: center; + gap: .25rem; + padding: 0 .65rem; + border: 1px solid var(--vip-border, #D8D2C7); + border-radius: .45rem; + color: var(--vip-content-accent-dark, #856632); + font-size: .72rem; + font-weight: 600; + text-decoration: none; + } + + .process-details-pending-detail__summary-link:hover, + .process-details-pending-detail__summary-link:focus-visible { + border-color: var(--vip-content-accent-dark, #856632); + background: var(--vip-content-accent-soft, #F7F0DE); + outline: none; + } + + .process-details-pending-detail__table { + min-width: 106rem; + } + .process-details-note-disclosure { margin: -.35rem 0 0; border: 1px solid rgba(185, 149, 79, .34); @@ -1141,6 +1279,40 @@ {{ $pendingPaymentSummaryMode ? '待付款汇总' : '审批汇总' }} + @if ($pendingPaymentSummaryMode) + + @endif 返回 OA 流程 @@ -1328,11 +1500,11 @@ @endif
-
明细行数{{ number_format((int) ($summary['rows'] ?? 0)) }}
+
明细行数{{ number_format((int) ($summary['rows'] ?? 0)) }}
@if ($approvalSummaryMode) -
审批单数{{ number_format((int) ($summary['approvals'] ?? 0)) }}
+
审批单数{{ number_format((int) ($summary['approvals'] ?? 0)) }}
@elseif ($pendingPaymentSummaryMode) -
待付款单数{{ number_format((int) ($summary['approvals'] ?? 0)) }}
+
待付款单数{{ number_format((int) ($summary['approvals'] ?? 0)) }}
@else
应付金额合计 - {{ $money($summary['amount_total'] ?? null) }} + {{ $money($summary['amount_total'] ?? null) }}
实际付款合计 - {{ $money($summary['bank_amount_total'] ?? null) }} + {{ $money($summary['bank_amount_total'] ?? null) }}
@@ -1384,7 +1556,9 @@ 审批中的流程在出现结构化付款事实前显示“待付款”,已有付款事实时显示“已付款”。 当前审批人、进入时间和已等待时长来自钉钉在途任务同步;页面每小时最多定向刷新当前页审批中的流程一次, 已完成流程不重复回查,其他时间直接显示最近镜像,已等待按实际小时显示。 - @if ($pendingPaymentSummaryMode) + @if ($pendingPaymentDetailMode) + 表二展示当前审批人名下待付款审批的费用明细;同一审批有多条费用时按明细行分别展示。 + @elseif ($pendingPaymentSummaryMode) 待付款汇总按审批编号去重;同一审批有多个并行当前审批人时,分别计入每名审批人,金额和明细行数也分别展示在对应审批人名下。 @endif 当前展示的是当前账号权限范围内可读取的钉钉OA审批流程; @@ -1393,6 +1567,12 @@ + @if ($pendingPaymentDetailMode) +
+ @include('business.pages.financial-operations.process-details-pending-payment-detail') +
+ @else +
@@ -1453,10 +1633,14 @@ array_merge($filters, [ 'payment_state' => '待付款', 'current_approver_name' => $approverName === '未识别当前审批人' ? '' : $approverName, + 'pending_view' => 'detail', ]), static fn (mixed $value): bool => $value !== '' && $value !== null, ); - $approverDetailUrl = url('/' . company_id() . '/workspace/process-data/oa-process') + $approverDetailUrl = url( + '/' . company_id() + . '/workspace/process-data/oa-process/pending-payment-summary', + ) . ($approverFilters === [] ? '' : '?' . http_build_query($approverFilters)); @endphp @@ -1465,7 +1649,12 @@ @if ($approverName === '未识别当前审批人') {{ number_format((int) ($row->pending_approvals ?? 0)) }} @else - + {{ number_format((int) ($row->pending_approvals ?? 0)) }} @endif @@ -1613,6 +1802,15 @@ + + @if ($pendingPaymentSummaryMode) + + @endif + @endif