feat: align douyin reconciliation headers

This commit is contained in:
qiuxiang 2026-09-01 13:26:49 +08:00
parent ea682327ab
commit a58c606939
2 changed files with 27 additions and 1 deletions

View File

@ -19,6 +19,12 @@
'taobao' => '淘宝',
'jingxi' => '京喜',
];
$douyinHeaders = [
'日期', '订单编号', '订单编号', '财务售价', '财务运费', '财务佣金',
'财务空包费', '财务打款金额', '笔数', '备注', '正确店铺', '负责人',
'账户', '类型', '创建人', '标签', '所属利润中心', '负责平台', 'ID',
'实收', '差异', '退款',
];
$platformIds = [
'all' => $pageIds->all(),
] + array_fill_keys(array_keys($platformTabs), []);
@ -118,7 +124,7 @@
<div class="zhongcai-table-wrapper">
<table id="zhongcai-reconciliation-table" class="zhongcai-table divide-y divide-gray-200">
<thead>
<tr>
<tr x-show="activePlatform !== 'douyin'">
<th class="w-12 text-center">
<input type="checkbox" aria-label="{{ trans('store_zhongcai_reconciliations.select_all') }}"
@if ($pageIds->isEmpty()) disabled @endif
@ -150,6 +156,19 @@
<th>{{ trans('store_zhongcai_reconciliations.difference_data') }}</th>
<th class="text-right">{{ trans('general.actions') }}</th>
</tr>
<tr data-platform-header="douyin" x-show="activePlatform === 'douyin'" x-cloak>
<th class="w-12 text-center">
<input type="checkbox" aria-label="{{ trans('store_zhongcai_reconciliations.select_all') }}"
@if ($pageIds->isEmpty()) disabled @endif
x-bind:disabled="platformIds[activePlatform].length === 0"
x-on:change="selected = $event.target.checked ? platformIds[activePlatform] : []"
x-bind:checked="selected.length === platformIds[activePlatform].length && selected.length > 0"
class="h-4 w-4 rounded border-gray-300 text-green" />
</th>
@foreach ($douyinHeaders as $header)
<th>{{ $header }}</th>
@endforeach
</tr>
</thead>
<tbody class="divide-y divide-gray-100 bg-white">
@if ($records->isEmpty())

View File

@ -56,6 +56,13 @@ class ZhongcaiReconciliationPlatformTest extends FeatureTestCase
->assertSee('data-platform="pdd"', false)
->assertSee('data-platform="taobao"', false)
->assertSee('data-platform="jingxi"', false)
->assertSee('data-platform-header="douyin"', false)
->assertSeeInOrder([
'日期', '订单编号', '订单编号', '财务售价', '财务运费', '财务佣金',
'财务空包费', '财务打款金额', '笔数', '备注', '正确店铺', '负责人',
'账户', '类型', '创建人', '标签', '所属利润中心', '负责平台', 'ID',
'实收', '差异', '退款',
], false)
->assertSee('JD-TEST-001')
->assertSee('DY-TEST-001')
->assertSee('TM-TEST-001')