feat: align taobao reconciliation headers

This commit is contained in:
qiuxiang 2026-09-01 14:59:36 +08:00
parent bfb1487adb
commit 5b776bcbb5
2 changed files with 27 additions and 1 deletions

View File

@ -43,6 +43,12 @@
'创建人', '标签', '所属利润中心', '负责平台', 'ID', '实收', '差异',
'退款', '小额打款',
];
$taobaoHeaders = [
'日期', '订单编号', '财务售价', '财务运费', '财务佣金', '财务空包费',
'财务打款金额', '笔数', '备注', '正确店铺', '负责人', '账户', '类型',
'创建人', '标签', '所属利润中心', '负责平台', 'ID', '实收', '差异',
'是否退款', '备注', '问题件',
];
$platformIds = [
'all' => $pageIds->all(),
] + array_fill_keys(array_keys($platformTabs), []);
@ -142,7 +148,7 @@
<div class="zhongcai-table-wrapper">
<table id="zhongcai-reconciliation-table" class="zhongcai-table divide-y divide-gray-200">
<thead>
<tr x-show="!['jd', 'douyin', 'tmall', 'pdd'].includes(activePlatform)">
<tr x-show="!['jd', 'douyin', 'tmall', 'pdd', 'taobao'].includes(activePlatform)">
<th class="w-12 text-center">
<input type="checkbox" aria-label="{{ trans('store_zhongcai_reconciliations.select_all') }}"
@if ($pageIds->isEmpty()) disabled @endif
@ -226,6 +232,19 @@
<th>{{ $header }}</th>
@endforeach
</tr>
<tr data-platform-header="taobao" x-show="activePlatform === 'taobao'" 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 ($taobaoHeaders as $header)
<th>{{ $header }}</th>
@endforeach
</tr>
</thead>
<tbody class="divide-y divide-gray-100 bg-white">
@if ($records->isEmpty())

View File

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