@php $isMarketingAccountBillsPage = ($section['slug'] ?? null) === 'billing-transactions' && ($page['slug'] ?? null) === 'marketing-account-bills'; $isPromotionMarketingBillsTab = $isMarketingAccountBillsPage && ($activeTab['slug'] ?? null) === 'promotion-marketing'; $isPromotionMarketingSummaryTab = $isMarketingAccountBillsPage && ($activeTab['slug'] ?? null) === 'taobao-alipay'; $isMarketingAccountBalancePage = ($section['slug'] ?? null) === 'billing-transactions' && ($page['slug'] ?? null) === 'marketing-account-balance'; $isStoreReceivingAccountsPage = ($section['slug'] ?? null) === 'fund-management' && ($page['slug'] ?? null) === 'store-receiving-accounts'; $isInvoiceBasicPage = ($section['slug'] ?? null) === 'invoice-management' && ($page['slug'] ?? null) === 'basic-information'; $isSupplierWorkspace = in_array($section['slug'] ?? null, ['supplier-payables', 'supplier-payables-final'], true); $supplierWorkspaceSection = $section; $isCourierFinalDirectory = ($section['slug'] ?? null) === 'courier-payables-final'; $isKukaPostingPage = ($section['slug'] ?? null) === 'posting-data' && ($page['slug'] ?? null) === 'kuka-basic-data'; $kukaPostingSubmenus = ['performance', 'shipments', 'quotation']; $activeKukaPostingSubmenu = $isKukaPostingPage && in_array(request()->query('submenu'), $kukaPostingSubmenus, true) ? (string) request()->query('submenu') : 'shipments'; $marketingAccountTabTitles = [ 'taobao-wechat' => '阿里巴巴账户', 'jd-wallet' => '京东', ]; $activeContentTitle = $activeTab['title'] ?? ($page['title'] ?? $section['title']); $directory = $page['directory'] ?? null; if ($isKukaPostingPage) { $activeContentTitle = '基础数据'; } // 上游新增字段自动补列:config/upstream_mirrors.auto_follow_columns 登记过的页面, // 会自动多出 business-mirror:follow-upstream-columns 补进来的列。 $followedDataset = config('upstream_mirrors.auto_follow_columns.' . (($section['slug'] ?? '') . '/' . ($page['slug'] ?? ''))); if (is_array($directory) && is_string($followedDataset) && $followedDataset !== '') { $directory['fields'] = app(\Modules\EcommerceFinance\Services\FollowedUpstreamColumns::class) ->appendFields($followedDataset, $directory['fields'] ?? []); } if ($isMarketingAccountBillsPage && isset($marketingAccountTabTitles[$activeTab['slug'] ?? null])) { $activeContentTitle = $marketingAccountTabTitles[$activeTab['slug']]; } $fundMonitorTabQuery = []; if (request('from') === 'fund-balance-monitor') { $fundMonitorMonth = trim((string) request('month', '')); if ($fundMonitorMonth === '') { $fundMonitorMonth = substr(trim((string) request('period_from', '')), 0, 7); } if (preg_match('/^\d{4}-(?:0[1-9]|1[0-2])$/', $fundMonitorMonth) === 1) { $fundMonitorTabQuery = [ 'from' => 'fund-balance-monitor', 'month' => $fundMonitorMonth, ]; } } @endphp @if ($isKukaPostingPage) @push('header_button_start') @include('business.pages.partials.kuka-posting-tabs', [ 'activeSubmenu' => $activeKukaPostingSubmenu, ]) @endpush @endif {{ $activeContentTitle }}
$isMarketingAccountBillsPage, 'business-page--marketing-account-balance' => $isMarketingAccountBalancePage, ]) @if ($isMarketingAccountBillsPage) data-marketing-account-bills-workspace @endif @if ($isSupplierWorkspace) data-supplier-workspace @endif > @include('business.pages.partials.fund-balance-monitor-return') @if ($isMarketingAccountBillsPage)

@endif @if (is_string(session('success')))
{{ session('success') }}
@endif @if (is_string(session('error'))) @endif @if ($errors->has('import')) @endif @if (!empty($upstreamError)) @endif @if ($isSupplierWorkspace && $supplierWorkspaceSection) @include('business.pages.supplier-payables.navigation', ['section' => $supplierWorkspaceSection]) @elseif ($isCourierFinalDirectory) @include('business.pages.partials.section-page-tabs', ['section' => $section]) @elseif (($section['slug'] ?? '') === 'financial-risk-control' && \App\Utilities\FocusMode::activeFor($section['slug'] ?? null)) {{-- 钉钉单页入口(菜单隐藏时)才需要目录内页签;网页端有左侧菜单和已打开页面标签栏,不再重复。 --}} @include('business.pages.partials.section-page-tabs', ['section' => $section]) @elseif (($section['slug'] ?? '') === 'supplier-reconciliation') {{-- 供应商对账:财务端数据 / 厂家端数据两个页签。 --}} @include('business.pages.partials.section-page-tabs', ['section' => $section]) @elseif (($section['slug'] ?? '') === 'negative-alerts') {{-- 负数预警:供应商负数预警 / 快递负数预警两个页签。 --}} @include('business.pages.partials.section-page-tabs', ['section' => $section]) @endif @if ($tabs->isNotEmpty()) @endif @php $pageView = null; $sectionView = null; if ($page) { $viewName = 'business.pages.' . $section['slug'] . '.' . $page['slug']; if ($tabs->isNotEmpty()) { $viewName .= '.' . ($activeTab['slug'] ?? ''); } if (view()->exists($viewName)) { $pageView = $viewName; } } else { $viewName = 'business.pages.' . $section['slug'] . '.index'; if (view()->exists($viewName)) { $sectionView = $viewName; } } @endphp @if ($isKukaPostingPage) @include('business.pages.posting-data.kuka-posting-content', [ 'pageView' => $pageView, 'activeSubmenu' => $activeKukaPostingSubmenu, ]) @else @if (($payablesFinal['dataset'] ?? null) === 'previous-unpriced-current-priced') @include('business.pages.partials.previous-unpriced-current-priced', [ 'cycle' => $payablesFinal, 'section' => $section, 'page' => $page, ]) @elseif (!empty($payablesFinal)) @include('business.pages.partials.final-dataset-table', ['payablesFinal' => $payablesFinal]) @elseif ($section['slug'] === 'courier-payables' && (empty($page) || $page['slug'] === 'courier-quote')) @include('business.pages.courier-payables.final-workspace') @elseif ($sectionView) @include($sectionView) @elseif (!empty($content) && !empty($content['view'])) @if ($isMarketingAccountBillsPage) @include('business.pages.partials.date-range-picker') @endif
@include($content['view'], $content)
@elseif ($directory) @include('business.pages.partials.directory-table', [ 'directory' => $directory, 'section' => $section, 'page' => $page, 'rows' => $rows, 'upstreamError' => $upstreamError, 'inventoryWarehouseMappings' => $inventoryWarehouseMappings ?? collect(), 'inventoryUnmappedWarehouseSummary' => $inventoryUnmappedWarehouseSummary ?? [], 'inventoryUnmappedWarehouseError' => $inventoryUnmappedWarehouseError ?? null, 'inventoryWarehouseMappingView' => $inventoryWarehouseMappingView ?? 'mapped', 'receiptStats' => $receiptStats ?? null, ]) @elseif ($pageView) @include($pageView) @elseif ($descriptor) @if ($isInvoiceBasicPage) @endif
@if ($page['slug'] === 'installation-details') @include('business.pages.partials.date-range-picker') @include('business.pages.partials.installation-filters') @include('business.pages.partials.installation-fee-summary') @endif
{{ $activeTab['title'] ?? $page['title'] }} · 数据列表 @if ($descriptor->readOnly) 工作平台数据库 @endif
@unless ($descriptor->readOnly)
@if ($isStoreReceivingAccountsPage) @else
@csrf
@endif
@endunless
@if ($isInvoiceBasicPage) @endif @if ($isStoreReceivingAccountsPage)
@if (request()->hasAny(['erp_store_name', 'shop_name', 'store_status'])) 重置 @endif
@endif
@if ($page['slug'] !== 'installation-details')@endif @foreach ($descriptor->fields as $field) @endforeach @unless ($descriptor->readOnly) @endunless @forelse ($rows as $row) @php $invoiceDetailsForRow = $isInvoiceBasicPage ? ($invoiceBasicDetails ?? collect())->get(($row->store_entity ?? '') . '|' . ($row->period ?? ''), collect()) : collect(); $showInvoiceDetails = $isInvoiceBasicPage && \Illuminate\Support\Str::startsWith((string) ($row->store_name ?? ''), '多店铺(') && $invoiceDetailsForRow->isNotEmpty(); @endphp @if ($page['slug'] !== 'installation-details')@endif @foreach ($descriptor->fields as $field) @php $val = $row->{$field['name']}; @endphp @endforeach @unless ($descriptor->readOnly) @endunless @if ($showInvoiceDetails) @endif @empty @endforelse
序号{{ $field['label'] }}操作
{{ $isInvoiceBasicPage ? (($rows->firstItem() ?? 1) + $loop->index) : $row->id }} @if ($field['type'] === 'boolean') @if ($val) 是 @else 否 @endif @elseif ($field['type'] === 'date' && $val) {{ \Illuminate\Support\Carbon::parse($val)->format('Y-m-d') }} @elseif ($field['currency']) {{ number_format((float) $val, 2) }} @elseif ($showInvoiceDetails && $field['name'] === 'store_name') @else {{ $val }} @endif
@csrf @method('DELETE')
{{ $descriptor->readOnly ? '暂无工作平台数据' : '暂无数据,点击右上角"新增"开始录入' }}
@if ($isInvoiceBasicPage)
@foreach ([ '本页合计' => ($invoiceBasicPageTotals ?? []), '全部合计' => ($invoiceBasicAllTotals ?? []), ] as $totalLabel => $totals)
{{ $totalLabel }} 开票额度 {{ number_format((float) ($totals['invoice_limit'] ?? 0), 2) }} 销项金额 {{ number_format((float) ($totals['output_amount'] ?? 0), 2) }} 进项金额 {{ number_format((float) ($totals['input_amount'] ?? 0), 2) }}
@endforeach
@endif
共 {{ $rows->total() }} 条 · 第 {{ $rows->currentPage() }} / {{ $rows->lastPage() }} 页 @if ($rows->onFirstPage()) ‹ 上一页 @else ‹ 上一页 @endif @if ($rows->hasMorePages()) 下一页 › @else 下一页 › @endif
@if ($page['slug'] === 'installation-details')
明细子表
请点击上方主表记录查看商品明细
@endif @if ($page['slug'] === 'installation-details') @endif @if ($isInvoiceBasicPage) @endif
@unless ($descriptor->readOnly) @if ($isStoreReceivingAccountsPage)
导入{{ $activeTab['title'] }}店铺收款账户

请上传当前页签格式的 Excel 文件;空 ERP 店铺名称的示例行会自动跳过。

@csrf
@endif {{-- Generic create/edit modal --}}
新增记录
@csrf
@foreach ($descriptor->fields as $field)
@switch($field['type']) @case('boolean') @break @case('select') @break @case('date') @break @case('currency') @case('number') @break @case('textarea') @break @default @endswitch
@endforeach
@endunless @elseif (($section['slug'] ?? null) === 'fund-management' && ($page['slug'] ?? null) === 'store-receiving-accounts')
店铺收款账户目录已清空,暂无页签和表格。
@else
in_array( $page['slug'] ?? null, ['store-receiving-bills', 'period-balance-reconciliation'], true, ), ]) @if (in_array($page['slug'] ?? null, ['store-receiving-bills', 'period-balance-reconciliation'], true)) data-table-preferences-user="{{ user()->id }}" @endif aria-label="{{ $activeTab['title'] ?? ($page['title'] ?? $section['title']) }}" >
该页面暂未配置数据表,敬请期待。
@endif @endif
@include('business.pages.partials.finance-table-interactions') @if ($isMarketingAccountBillsPage) @push('scripts_start') @if ($isPromotionMarketingBillsTab || $isPromotionMarketingSummaryTab) @endif @endpush @elseif (in_array($page['slug'] ?? null, ['store-receiving-bills', 'period-balance-reconciliation'], true)) @push('scripts_start') @endpush @endif