feat: 新增供应商应付独立页面

This commit is contained in:
WuYongJie 2026-07-22 14:39:45 +08:00
parent 488812c083
commit 664e2999aa
6 changed files with 669 additions and 19 deletions

View File

@ -62,7 +62,12 @@ class Pages extends Controller
return $this->redirectToPage($sectionConfig, $pages->first());
}
$pageConfig = $pages->firstWhere('slug', $page);
$pageConfig = $pages
->flatMap(fn (array $configuredPage) => [
$configuredPage,
...($configuredPage['children'] ?? []),
])
->firstWhere('slug', $page);
abort_if(empty($pageConfig), 404);

View File

@ -0,0 +1,190 @@
<div class="supplier-board-page">
<style>
.supplier-board-toolbar {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: 0.75rem;
margin-bottom: 1rem;
padding: 1rem;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
background: #ffffff;
}
.supplier-board-field {
display: flex;
min-width: 9rem;
flex-direction: column;
gap: 0.35rem;
}
.supplier-board-field label {
color: #6b7280;
font-size: 0.75rem;
font-weight: 600;
}
.supplier-board-field input,
.supplier-board-field select {
height: 2.25rem;
min-width: 9rem;
padding: 0 0.65rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
background: #ffffff;
color: #374151;
font-size: 0.8125rem;
outline: none;
}
.supplier-board-field input:focus,
.supplier-board-field select:focus {
border-color: var(--vip-content-accent);
box-shadow: 0 0 0 2px rgba(197, 160, 74, 0.14);
}
.supplier-board-table-card {
overflow: hidden;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
background: #ffffff;
}
.supplier-board-table-scroll {
overflow-x: auto;
}
.supplier-board-table {
width: 100%;
min-width: 94rem;
border-collapse: collapse;
font-size: 0.8125rem;
}
.supplier-board-table th,
.supplier-board-table td {
height: 2.75rem;
padding: 0.55rem 0.7rem;
border-right: 1px solid #e5e7eb;
border-bottom: 1px solid #e5e7eb;
text-align: left;
white-space: nowrap;
}
.supplier-board-table th:last-child,
.supplier-board-table td:last-child {
border-right: 0;
}
.supplier-board-table thead th {
background: #f4f6fa;
color: #374151;
font-weight: 700;
}
.supplier-board-table .is-number {
text-align: right;
}
.supplier-board-table .is-empty td {
height: 8rem;
color: #9ca3af;
text-align: center;
}
.supplier-board-pagination {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1rem;
color: #6b7280;
font-size: 0.8125rem;
}
@media (max-width: 640px) {
.supplier-board-toolbar {
align-items: stretch;
}
.supplier-board-field,
.supplier-board-field input,
.supplier-board-field select {
width: 100%;
}
}
</style>
<div class="supplier-board-toolbar" aria-label="板材扣款筛选">
<div class="supplier-board-field">
<label for="board-deduction-stock-in-date">入库日期</label>
<input id="board-deduction-stock-in-date" type="date">
</div>
<div class="supplier-board-field">
<label for="board-deduction-stock-out-date">出库日期</label>
<input id="board-deduction-stock-out-date" type="date">
</div>
<div class="supplier-board-field">
<label for="board-deduction-furniture-factory">家具厂</label>
<input id="board-deduction-furniture-factory" type="text" placeholder="请输入家具厂">
</div>
<div class="supplier-board-field">
<label for="board-deduction-lamination-factory">压贴厂</label>
<input id="board-deduction-lamination-factory" type="text" placeholder="请输入压贴厂">
</div>
<div class="supplier-board-field">
<label for="board-deduction-type">类型</label>
<select id="board-deduction-type">
<option>全部类型</option>
<option>正常扣款</option>
<option>调整扣款</option>
</select>
</div>
<div class="supplier-board-field">
<label for="board-deduction-material">原料名称</label>
<input id="board-deduction-material" type="text" placeholder="请输入原料名称">
</div>
<div class="supplier-board-field">
<label for="board-deduction-claim-number">申领单号</label>
<input id="board-deduction-claim-number" type="text" placeholder="请输入申领单号">
</div>
</div>
<div class="supplier-board-table-card">
<div class="supplier-board-table-scroll">
<table class="supplier-board-table">
<thead>
<tr>
<th>入库日期</th>
<th>出库日期</th>
<th>家具厂</th>
<th>压贴厂</th>
<th>类型</th>
<th>规格</th>
<th>原料名称</th>
<th class="is-number">实收数量</th>
<th class="is-number">单价</th>
<th class="is-number">金额</th>
<th>单位</th>
<th>批次日期</th>
<th>出库单号</th>
<th>出库备注</th>
<th>申领单号</th>
<th>单号类型</th>
<th>送货单号</th>
</tr>
</thead>
<tbody>
<tr class="is-empty">
<td colspan="17">暂无数据</td>
</tr>
</tbody>
</table>
</div>
<div class="supplier-board-pagination">
<span>共 0 条记录</span>
<span>第 1 / 1 页</span>
</div>
</div>
</div>

View File

@ -40,20 +40,45 @@
<span class="text-gray-400">加载中...</span>
</div>
<el-table v-else :data="tableData" stripe border style="width: 100%" size="small" height="600">
<el-table-column type="index" label="#" width="50" fixed="left"></el-table-column>
<el-table-column prop="date" label="日期" width="110" fixed="left"></el-table-column>
<el-table-column prop="purchase" label="采购人" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="warehouse" label="仓库" width="180" show-overflow-tooltip></el-table-column>
<el-table-column prop="transactionNo" label="来源单号" width="180" fixed="left" show-overflow-tooltip></el-table-column>
<el-table-column prop="distributionNo" label="单据编号(采购单号)" width="180" show-overflow-tooltip></el-table-column>
<el-table-column prop="date" label="创建时间" width="110"></el-table-column>
<el-table-column prop="supplier" label="供应商" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="transactionNo" label="交易号" width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="distributionNo" label="配货单号" width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="expressNo" label="快递单号" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="sku" label="SKU编码" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="barCode" label="条形码" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="skuName" label="商品名称" width="240" show-overflow-tooltip></el-table-column>
<el-table-column prop="distribution_date" label="配货时间" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="ship_date" label="发货时间" width="110"></el-table-column>
<el-table-column prop="sku" label="货号" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="barCode" label="条码" width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="skuName" label="规格名" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="库存变动量" width="100" align="right">
<template slot-scope="scope">@{{ scope.row.stock_change == null ? '-' : scope.row.stock_change }}</template>
</el-table-column>
<el-table-column label="单价" width="100" align="right">
<template slot-scope="scope">@{{ scope.row.unit_price == null ? '-' : formatMoney(scope.row.unit_price) }}</template>
</el-table-column>
<el-table-column label="金额" width="110" align="right">
<template slot-scope="scope">@{{ scope.row.amount == null ? '-' : formatMoney(scope.row.amount) }}</template>
</el-table-column>
<el-table-column label="预估单价" width="100" align="right">
<template slot-scope="scope">@{{ scope.row.estimated_unit_price == null ? '-' : formatMoney(scope.row.estimated_unit_price) }}</template>
</el-table-column>
<el-table-column label="预估金额" width="110" align="right">
<template slot-scope="scope">@{{ scope.row.estimated_amount == null ? '-' : formatMoney(scope.row.estimated_amount) }}</template>
</el-table-column>
<el-table-column prop="supplier_barcode" label="供应商条码" width="130" show-overflow-tooltip>
<template slot-scope="scope">@{{ scope.row.supplier_barcode || '-' }}</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip>
<template slot-scope="scope">@{{ scope.row.remark || '-' }}</template>
</el-table-column>
<el-table-column prop="warehouse" label="仓库" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="distribution_date" label="创建时间" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="expressName" label="快递名称" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="expressNo" label="快递单号" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="未发出" width="90" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.unsent" size="mini" type="warning">未发出</el-tag>
<span v-else class="text-gray-400">-</span>
</template>
</el-table-column>
<el-table-column prop="purchase" label="负责人" width="100" show-overflow-tooltip></el-table-column>
</el-table>
<div class="flex items-center justify-between px-4 py-3 border-t border-gray-100" v-if="!loading">

View File

@ -20,7 +20,7 @@
{{-- 筛选栏 --}}
<div class="bg-white rounded-xl border border-gray-100 p-4 mb-4 shadow-sm">
<div class="flex flex-wrap items-center gap-3">
<el-input v-model="filters.supplier" placeholder="供应商" size="small" style="width: 160px" clearable @clear="onFilterChange" @keyup.enter="onFilterChange"></el-input>
<el-input v-model="filters.supplier" placeholder="明细供应商" size="small" style="width: 160px" clearable @clear="onFilterChange" @keyup.enter="onFilterChange"></el-input>
<el-select v-model="filters.warehouse" placeholder="仓库" size="small" style="width: 140px" filterable clearable @change="onFilterChange">
<el-option v-for="w in options.warehouses" :key="w" :label="w" :value="w"></el-option>
</el-select>
@ -41,12 +41,11 @@
<span class="text-gray-400">加载中...</span>
</div>
<el-table v-else :data="tableData" stripe border style="width: 100%" size="small" height="600">
<el-table-column type="index" label="#" width="50" fixed="left"></el-table-column>
<el-table-column prop="send_time" label="发货时间" width="110" fixed="left"></el-table-column>
<el-table-column prop="supplier" label="供应商" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="supplier" label="明细供应商" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="barcode" label="条形码" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="sku_name" label="商品名称" width="220" show-overflow-tooltip></el-table-column>
<el-table-column prop="qty" label="退货量" width="80" align="right"></el-table-column>
<el-table-column prop="qty" label="发货量" width="80" align="right"></el-table-column>
<el-table-column label="单价" width="100" align="right">
<template slot-scope="scope">@{{ formatMoney(scope.row.unit_price) }}</template>
</el-table-column>
@ -63,12 +62,20 @@
<span class="text-orange-500">@{{ formatMoney(scope.row.guess_amount) }}</span>
</template>
</el-table-column>
<el-table-column prop="supplier_barcode" label="供应商条码" width="130" show-overflow-tooltip>
<template slot-scope="scope">@{{ scope.row.supplier_barcode || '-' }}</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="160" show-overflow-tooltip></el-table-column>
<el-table-column prop="title" label="标题" width="120" show-overflow-tooltip>
<template slot-scope="scope">@{{ scope.row.title || '-' }}</template>
</el-table-column>
<el-table-column prop="wms_pick_no" label="wms配货单号" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="warehouse" label="仓库名称" width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="express_no" label="快递单号" width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="express_name" label="快递名称" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="io_date" label="出库时间" width="110"></el-table-column>
<el-table-column prop="io_date" label="发货时间" width="110"></el-table-column>
<el-table-column prop="original_barcode" label="原条码" width="130" show-overflow-tooltip>
<template slot-scope="scope">@{{ scope.row.original_barcode || '-' }}</template>
</el-table-column>
<el-table-column prop="labels" label="标记多标签" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.labels" size="mini" type="warning">@{{ scope.row.labels }}</el-tag>
@ -76,6 +83,9 @@
</template>
</el-table-column>
<el-table-column prop="creator" label="创建人" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="reconciler" label="对账人" width="100" show-overflow-tooltip>
<template slot-scope="scope">@{{ scope.row.reconciler || '-' }}</template>
</el-table-column>
</el-table>
<div class="flex items-center justify-between px-4 py-3 border-t border-gray-100" v-if="!loading">

View File

@ -0,0 +1,314 @@
<div class="supplier-payables-report-page">
<style>
.supplier-payables-report-toolbar {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: 0.75rem;
margin-bottom: 1rem;
padding: 1rem;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
background: #ffffff;
}
.supplier-payables-report-field {
display: flex;
min-width: 9rem;
flex-direction: column;
gap: 0.35rem;
}
.supplier-payables-report-field label {
color: #6b7280;
font-size: 0.75rem;
font-weight: 600;
}
.supplier-payables-report-field input,
.supplier-payables-report-field select {
height: 2.25rem;
min-width: 9rem;
padding: 0 0.65rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
background: #ffffff;
color: #374151;
font-size: 0.8125rem;
outline: none;
}
.supplier-payables-report-field input:focus,
.supplier-payables-report-field select:focus {
border-color: var(--vip-content-accent);
box-shadow: 0 0 0 2px rgba(197, 160, 74, 0.14);
}
.supplier-payables-report-actions {
display: flex;
gap: 0.5rem;
}
.supplier-payables-report-button {
display: inline-flex;
height: 2.25rem;
align-items: center;
justify-content: center;
gap: 0.35rem;
padding: 0 0.85rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
background: #ffffff;
color: #374151;
font-size: 0.8125rem;
font-weight: 600;
white-space: nowrap;
}
.supplier-payables-report-button.is-primary {
border-color: var(--vip-content-accent);
background: var(--vip-content-accent);
color: #ffffff;
}
.supplier-payables-report-button .material-icons-outlined {
font-size: 1rem;
}
.supplier-payables-report-table-card {
overflow: hidden;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
background: #ffffff;
}
.supplier-payables-report-table-scroll {
overflow-x: auto;
}
.supplier-payables-report-table {
width: 100%;
min-width: 242rem;
border-collapse: separate;
border-spacing: 0;
color: #374151;
font-size: 0.75rem;
}
.supplier-payables-report-table th,
.supplier-payables-report-table td {
height: 2.75rem;
padding: 0.55rem 0.65rem;
border-right: 1px solid #e5e7eb;
border-bottom: 1px solid #e5e7eb;
text-align: left;
white-space: nowrap;
}
.supplier-payables-report-table th:last-child,
.supplier-payables-report-table td:last-child {
border-right: 0;
}
.supplier-payables-report-table thead th {
background: #f4f6fa;
font-weight: 700;
text-align: center;
vertical-align: middle;
}
.supplier-payables-report-table thead tr:first-child th {
position: sticky;
top: 0;
z-index: 2;
}
.supplier-payables-report-table thead tr:nth-child(2) th {
position: sticky;
top: 2.75rem;
z-index: 2;
}
.supplier-payables-report-table .group-closed {
background: #f3f0fa;
}
.supplier-payables-report-table .group-purchase {
background: #edf6ff;
}
.supplier-payables-report-table .group-deduction {
background: #fff1f2;
}
.supplier-payables-report-table .group-addition {
background: #ecf8f0;
}
.supplier-payables-report-table .group-payment {
background: #fff7df;
}
.supplier-payables-report-table .is-empty td {
height: 10rem;
color: #9ca3af;
text-align: center;
}
.supplier-payables-report-pagination {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1rem;
color: #6b7280;
font-size: 0.8125rem;
}
@media (max-width: 640px) {
.supplier-payables-report-toolbar {
align-items: stretch;
}
.supplier-payables-report-field,
.supplier-payables-report-field input,
.supplier-payables-report-field select {
width: 100%;
}
}
</style>
<form method="GET" class="supplier-payables-report-toolbar" aria-label="供应商应付表筛选">
<div class="supplier-payables-report-field">
<label for="supplier-payables-report-month">账单月份</label>
<input id="supplier-payables-report-month" name="month" type="month" value="{{ request('month') }}">
</div>
<div class="supplier-payables-report-field">
<label for="supplier-payables-report-supplier">供应商</label>
<input id="supplier-payables-report-supplier" name="supplier" type="text" value="{{ request('supplier') }}" placeholder="供应商名称或简称">
</div>
<div class="supplier-payables-report-field">
<label for="supplier-payables-report-reconciler">对账人</label>
<input id="supplier-payables-report-reconciler" name="reconciler" type="text" value="{{ request('reconciler') }}" placeholder="请输入对账人">
</div>
<div class="supplier-payables-report-field">
<label for="supplier-payables-report-status">合作状态</label>
<select id="supplier-payables-report-status" name="cooperation_status">
<option value="">全部状态</option>
<option value="cooperating" @selected(request('cooperation_status') === 'cooperating')>合作中</option>
<option value="stopped" @selected(request('cooperation_status') === 'stopped')>已停止合作</option>
<option value="resumed" @selected(request('cooperation_status') === 'resumed')>重新启用</option>
</select>
</div>
<div class="supplier-payables-report-actions">
<button type="submit" class="supplier-payables-report-button is-primary">
<span class="material-icons-outlined" aria-hidden="true">search</span>
<span>查询</span>
</button>
<a
href="{{ route('business.pages.show', ['section' => $section['slug'], 'page' => $page['slug']]) }}"
class="supplier-payables-report-button"
>
<span class="material-icons-outlined" aria-hidden="true">refresh</span>
<span>重置</span>
</a>
</div>
</form>
<div class="supplier-payables-report-table-card">
<div class="supplier-payables-report-table-scroll">
<table class="supplier-payables-report-table">
<colgroup>
<col style="width: 7rem">
<col style="width: 7rem">
<col style="width: 4.5rem">
<col style="width: 13rem">
<col style="width: 9rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 12rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 9rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 8rem">
<col style="width: 9rem">
<col style="width: 9rem">
<col style="width: 9rem">
<col style="width: 11rem">
<col style="width: 11rem">
<col style="width: 12rem">
<col style="width: 9rem">
<col style="width: 8rem">
<col style="width: 9rem">
<col style="width: 14rem">
<col style="width: 9rem">
<col style="width: 9rem">
<col style="width: 12rem">
</colgroup>
<thead>
<tr>
<th colspan="2" class="group-closed">已销账供应商</th>
<th rowspan="2">序号</th>
<th rowspan="2">供应商公司主体名称</th>
<th rowspan="2">供应商简称</th>
<th rowspan="2">快递运费</th>
<th rowspan="2">月初未付</th>
<th rowspan="2">之前未定价-本月定价</th>
<th rowspan="2">预支借款</th>
<th colspan="3" class="group-purchase">本月采购金额</th>
<th colspan="5" class="group-deduction">减</th>
<th class="group-addition">加</th>
<th colspan="6" class="group-payment">单位:元</th>
<th rowspan="2">备注</th>
<th rowspan="2">是否直接对私打款</th>
<th rowspan="2">对私原因</th>
<th rowspan="2">含税定价金额</th>
<th rowspan="2">押款金额</th>
<th rowspan="2">结款截图</th>
<th rowspan="2">最晚出账单时间(新执行标准)</th>
<th rowspan="2">不合作时间</th>
<th rowspan="2">重新启用日期</th>
<th rowspan="2">负数原因</th>
</tr>
<tr>
<th class="group-closed">对账人</th>
<th class="group-closed">合作状态</th>
<th class="group-purchase">货款金额</th>
<th class="group-purchase">减:退货金额</th>
<th class="group-purchase">小计</th>
<th class="group-deduction">发票扣款</th>
<th class="group-deduction">板材扣款</th>
<th class="group-deduction">样品扣款</th>
<th class="group-deduction">总赔偿金额</th>
<th class="group-deduction">其他费用</th>
<th class="group-addition">补给厂家</th>
<th class="group-payment">供应商余额</th>
<th class="group-payment">应付余额</th>
<th class="group-payment">预估金额</th>
<th class="group-payment">对公打款金额</th>
<th class="group-payment">对私打款金额</th>
<th class="group-payment">已销账金额</th>
</tr>
</thead>
<tbody>
<tr class="is-empty">
<td colspan="34">暂无供应商应付数据</td>
</tr>
</tbody>
</table>
</div>
<div class="supplier-payables-report-pagination">
<span>共 0 条记录</span>
<span>第 1 / 1 页</span>
</div>
</div>
</div>

View File

@ -0,0 +1,106 @@
<?php
namespace Tests\Feature\Business;
use App\Models\Auth\Permission;
use Tests\Feature\FeatureTestCase;
class SupplierPayablePagesTest extends FeatureTestCase
{
protected function grantAdminPermission(): void
{
$this->user->attachPermission(
Permission::where('name', 'read-admin-panel')->firstOrFail()
);
}
public function testDeliveryUnpricedPageUsesItsOwnTwentyColumnTable()
{
$this->grantAdminPermission();
$response = $this->loginAs()->get(route('business.pages.show', [
'section' => 'supplier-payables',
'page' => 'delivery-unpriced',
]));
$response
->assertOk()
->assertSee('id="delivery-unpriced-app"', false)
->assertSee('来源单号')
->assertSee('单据编号(采购单号)')
->assertSee('负责人')
->assertSee('public/js/ecommerce-finance/delivery-unpriced.min.js', false)
->assertDontSee('class="business-blank-page"', false);
$this->assertSame(20, substr_count($response->getContent(), '<el-table-column'));
}
public function testReturnUnpricedPageUsesItsOwnTwentyColumnTable()
{
$this->grantAdminPermission();
$response = $this->loginAs()->get(route('business.pages.show', [
'section' => 'supplier-payables',
'page' => 'return-unpriced',
]));
$response
->assertOk()
->assertSee('id="return-unpriced-app"', false)
->assertSee('明细供应商')
->assertSee('供应商条码')
->assertSee('对账人')
->assertSee('public/js/ecommerce-finance/return-unpriced.min.js', false)
->assertDontSee('class="business-blank-page"', false);
$this->assertSame(20, substr_count($response->getContent(), '<el-table-column'));
}
public function testBoardDeductionsPageUsesItsOwnSeventeenColumnTable()
{
$this->grantAdminPermission();
$response = $this->loginAs()->get(route('business.pages.show', [
'section' => 'supplier-payables',
'page' => 'board-deductions',
]));
$response
->assertOk()
->assertSee('class="supplier-board-table"', false)
->assertSee('入库日期')
->assertSee('出库备注')
->assertSee('送货单号')
->assertDontSee('class="business-blank-page"', false);
preg_match_all('/<th(?:\s|>)/', $response->getContent(), $headers);
$this->assertCount(17, $headers[0]);
}
public function testSupplierPayablesReportPageUsesItsOwnThirtyFourColumnGroupedTable()
{
$this->grantAdminPermission();
$response = $this->loginAs()->get(route('business.pages.show', [
'section' => 'supplier-payables',
'page' => 'supplier-payables-report',
]));
$response
->assertOk()
->assertSee('class="supplier-payables-report-table"', false)
->assertSee('已销账供应商')
->assertSee('本月采购金额')
->assertSee('<th class="group-addition">加</th>', false)
->assertSee('<th colspan="6" class="group-payment">单位:元</th>', false)
->assertSee('<th class="group-payment">供应商余额</th>', false)
->assertSee('最晚出账单时间(新执行标准)')
->assertDontSee('class="business-blank-page"', false);
preg_match_all('/<col(?:\s|>)/', $response->getContent(), $columns);
$this->assertCount(34, $columns[0]);
}
}