订单数据子功能表头页面 #25

Merged
renshen merged 1 commits from feature/renshen-order-data-pages into main 2026-08-10 18:03:05 +08:00
3 changed files with 195 additions and 14 deletions

View File

@ -0,0 +1,134 @@
@php
$headers = [
'内部订单号',
'线上订单号',
'子订单号',
'售后单号',
'支付时间',
'订单完成时间',
'发货时间',
'订单时间',
'店铺名称',
'店铺编码',
'商品编码',
'款式编码(参考)',
'店铺商品编码',
'店铺款式编码',
'链接',
'品牌',
'分类',
'虚拟分类',
'颜色及规格',
'商品名称',
'线下客户编号',
'线下客户名称',
'唯一码',
'商品数量',
'商品金额',
'商品成本',
'其中:红冲订单成本',
'商家优惠',
'运费收入',
'付款金额',
'其中:平台优惠',
'其中:红冲订单金额',
'实发金额',
'实发数量',
'实发成本',
'订单类型',
'登记时间',
'确认时间',
'进仓时间',
'线上商品名称',
'发货前申请数量',
'发货前申请金额',
'发货前申请成本',
'发货前退回数量',
'发货前退回金额',
'发货前退回成本',
'发货前退款金额',
'发货前退款成本',
'发货前退平台补贴',
'发货后申请数量',
'发货后申请金额',
'发货后申请成本',
'发货后退回数量',
'发货后退回金额',
'发货后退回成本',
'发货后退款金额',
'发货后退款成本',
'发货后退平台补贴',
'其中:次品商品数量',
'退款类型',
'问题类型',
'明细退货类型',
'分类单',
'赠品',
'组合装',
'订单标签',
'售后单标签',
'商品标签',
'发货仓编号',
'发货仓库',
'运营云仓',
'收货仓编号',
'收货仓',
'供销商编号',
'供销商',
'快递单号',
'快递公司',
'省',
'市',
'业务员',
'500112冲减收入',
'60031erp快递费',
'800101其他服务费',
'800103其他活动费用',
'800104违约赔付',
'800105佣金',
'800106保证金',
'800107推广充值',
'800108品牌新享',
'800109淘宝客/多多进宝',
'800110运费险',
'800114公益宝贝',
'8001201直通车/钻展/快车等',
'8001202推广红包冲减',
'800122售后补偿',
'800125红包',
'800127退货运费',
'800129退款',
'800130订单',
'800132其他费用',
'800304售后补偿',
'800501种菜佣金',
'800503发空包/赠品费用',
];
@endphp
<div class="upstream-data-page upstream-data-page--spaced">
@include('business.pages.partials.upstream-data-styles')
<div class="upstream-data-table-panel">
<div class="upstream-data-table-scroll">
<table class="upstream-data-table order-data-table" aria-label="订单售后费用明细">
<thead>
<tr>
@foreach ($headers as $header)
<th>{{ $header }}</th>
@endforeach
</tr>
</thead>
<tbody>
<tr class="is-empty">
<td colspan="{{ count($headers) }}">暂无数据</td>
</tr>
</tbody>
</table>
</div>
<div class="upstream-data-pagination">
<span>共 0 条记录</span>
<span>第 1 / 1 页</span>
</div>
</div>
</div>

View File

@ -0,0 +1,38 @@
@php
$headers = [
'店铺',
'商品编码',
'款式编码',
'店铺商品编码',
'店铺款式编码',
'线上颜色规格',
'8001201直通车/钻展/快车等',
];
@endphp
<div class="upstream-data-page upstream-data-page--spaced">
@include('business.pages.partials.upstream-data-styles')
<div class="upstream-data-table-panel">
<div class="upstream-data-table-scroll">
<table class="upstream-data-table order-data-table" aria-label="商品推广费用明细">
<thead>
<tr>
@foreach ($headers as $header)
<th>{{ $header }}</th>
@endforeach
</tr>
</thead>
<tbody>
<tr class="is-empty">
<td colspan="{{ count($headers) }}">暂无数据</td>
</tr>
</tbody>
</table>
</div>
<div class="upstream-data-pagination">
<span>共 0 条记录</span>
<span>第 1 / 1 页</span>
</div>
</div>
</div>

View File

@ -42,7 +42,7 @@ class PagesTest extends FeatureTestCase
->assertDontSee('class="business-blank-page"', false);
}
public function testOrderDataPagesOpenThroughTheSharedWorkspaceRoute()
public function testOrderDataPagesRenderSpreadsheetHeadersAsSeparateTables()
{
$this->user->attachPermission(
Permission::where('name', 'read-admin-panel')->firstOrFail()
@ -55,20 +55,29 @@ class PagesTest extends FeatureTestCase
'page' => 'after-sales-expenses',
]));
$pages = [
'after-sales-expenses' => '订单售后费用明细',
'promotion-expenses' => '商品推广费用明细',
];
$this->get(route('business.pages.show', [
'section' => 'order-data',
'page' => 'after-sales-expenses',
]))
->assertOk()
->assertSeeText('订单售后费用明细')
->assertSee('aria-label="订单售后费用明细"', false)
->assertSeeText('内部订单号')
->assertSeeText('800503发空包/赠品费用')
->assertSeeText('暂无数据')
->assertDontSee('class="business-blank-page"', false);
foreach ($pages as $page => $title) {
$this->get(route('business.pages.show', [
'section' => 'order-data',
'page' => $page,
]))
->assertOk()
->assertSeeText($title)
->assertSeeText('该页面暂未配置数据表,敬请期待。');
}
$this->get(route('business.pages.show', [
'section' => 'order-data',
'page' => 'promotion-expenses',
]))
->assertOk()
->assertSeeText('商品推广费用明细')
->assertSee('aria-label="商品推广费用明细"', false)
->assertSeeText('店铺')
->assertSeeText('8001201直通车/钻展/快车等')
->assertSeeText('暂无数据')
->assertDontSee('class="business-blank-page"', false);
}
public function testPaperMaterialPagesRenderAsSeparateTables()