feat: 增加小额打款店铺汇总 #1706
@ -8806,6 +8806,7 @@ class Pages extends Controller
|
||||
$syncStatus = ['code' => 'unavailable', 'last_succeeded_at' => null];
|
||||
$pagePaymentAmount = '0.00';
|
||||
$filteredPaymentAmount = '0.00';
|
||||
$storePaymentSummary = [];
|
||||
$shopNames = [];
|
||||
$paymentReasons = [];
|
||||
$error = null;
|
||||
@ -8850,6 +8851,9 @@ class Pages extends Controller
|
||||
);
|
||||
$pagePaymentAmount = (string) ($result['page_payment_amount'] ?? '0.00');
|
||||
$filteredPaymentAmount = (string) ($result['filtered_payment_amount'] ?? '0.00');
|
||||
$storePaymentSummary = is_array($result['store_summary'] ?? null)
|
||||
? $result['store_summary']
|
||||
: [];
|
||||
}
|
||||
}
|
||||
} catch (Throwable $exception) {
|
||||
@ -8864,6 +8868,7 @@ class Pages extends Controller
|
||||
'smallPaymentSyncStatus' => $syncStatus,
|
||||
'smallPaymentPageAmount' => $pagePaymentAmount,
|
||||
'smallPaymentFilteredAmount' => $filteredPaymentAmount,
|
||||
'smallPaymentStoreSummary' => $storePaymentSummary,
|
||||
'smallPaymentShops' => $shopNames,
|
||||
'smallPaymentReasons' => $paymentReasons,
|
||||
'smallPaymentStatuses' => [
|
||||
|
||||
@ -163,7 +163,13 @@ class SmallPaymentWorkOrderMirrorRepository
|
||||
|
||||
/**
|
||||
* @param array{from:string,to:string,work_order_no:string,shop_name:string,transaction_no:string,online_order_no:string,status:string,payment_reason:string} $filters
|
||||
* @return array{data:list<array<string,mixed>>,total:int,page_payment_amount:string,filtered_payment_amount:string}
|
||||
* @return array{
|
||||
* data:list<array<string,mixed>>,
|
||||
* total:int,
|
||||
* page_payment_amount:string,
|
||||
* filtered_payment_amount:string,
|
||||
* store_summary:list<array{shop_name:string,work_order_count:int,payment_amount:string}>
|
||||
* }
|
||||
*/
|
||||
public function paginate(array $filters, int $page, int $perPage): array
|
||||
{
|
||||
@ -188,6 +194,7 @@ class SmallPaymentWorkOrderMirrorRepository
|
||||
'total' => $summary['count'],
|
||||
'page_payment_amount' => $this->sumMoney(array_column($rows, 'payment_amount')),
|
||||
'filtered_payment_amount' => $summary['payment_amount'],
|
||||
'store_summary' => $summary['store_summary'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -206,7 +213,11 @@ class SmallPaymentWorkOrderMirrorRepository
|
||||
|
||||
/**
|
||||
* @param array{from:string,to:string,work_order_no:string,shop_name:string,transaction_no:string,online_order_no:string,status:string,payment_reason:string} $filters
|
||||
* @return array{count:int,payment_amount:string}
|
||||
* @return array{
|
||||
* count:int,
|
||||
* payment_amount:string,
|
||||
* store_summary:list<array{shop_name:string,work_order_count:int,payment_amount:string}>
|
||||
* }
|
||||
*/
|
||||
private function filteredSummary(array $filters, int $chunkSize = 1000): array
|
||||
{
|
||||
@ -224,7 +235,11 @@ class SmallPaymentWorkOrderMirrorRepository
|
||||
|
||||
/**
|
||||
* @param array{from:string,to:string,work_order_no:string,shop_name:string,transaction_no:string,online_order_no:string,status:string,payment_reason:string} $filters
|
||||
* @return array{count:int,payment_amount:string}
|
||||
* @return array{
|
||||
* count:int,
|
||||
* payment_amount:string,
|
||||
* store_summary:list<array{shop_name:string,work_order_count:int,payment_amount:string}>
|
||||
* }
|
||||
*/
|
||||
private function calculateFilteredSummary(array $filters, int $chunkSize): array
|
||||
{
|
||||
@ -237,23 +252,49 @@ class SmallPaymentWorkOrderMirrorRepository
|
||||
$cents = 0;
|
||||
$count = 0;
|
||||
$lastId = null;
|
||||
$shops = [];
|
||||
|
||||
do {
|
||||
$chunk = $this->boundedGet((clone $query)
|
||||
->select(['w.Id AS source_id', 'w.businessFieldList'])
|
||||
->select(['w.Id AS source_id', 'w.businessFieldList', 'p.shop_name'])
|
||||
->when($lastId !== null, static fn (Builder $q): Builder => $q->where('w.Id', '>', $lastId))
|
||||
->orderBy('w.Id')
|
||||
->limit($chunkSize));
|
||||
|
||||
foreach ($chunk as $row) {
|
||||
$cents += $this->centsFromMoney($this->paymentAmountOf($row->businessFieldList ?? null));
|
||||
$rowCents = $this->centsFromMoney($this->paymentAmountOf($row->businessFieldList ?? null));
|
||||
$shopName = trim((string) ($row->shop_name ?? '')) ?: '未填写店铺';
|
||||
$shops[$shopName] ??= ['work_order_count' => 0, 'cents' => 0];
|
||||
$shops[$shopName]['work_order_count']++;
|
||||
$shops[$shopName]['cents'] += $rowCents;
|
||||
$cents += $rowCents;
|
||||
}
|
||||
|
||||
$count += $chunk->count();
|
||||
$lastId = $chunk->isEmpty() ? null : $chunk->last()->source_id;
|
||||
} while ($chunk->count() === $chunkSize);
|
||||
|
||||
return ['count' => $count, 'payment_amount' => $this->formatCents($cents)];
|
||||
$storeSummary = [];
|
||||
foreach ($shops as $shopName => $shop) {
|
||||
$storeSummary[] = [
|
||||
'shop_name' => $shopName,
|
||||
'work_order_count' => $shop['work_order_count'],
|
||||
'payment_amount' => $this->formatCents($shop['cents']),
|
||||
];
|
||||
}
|
||||
usort($storeSummary, static function (array $left, array $right): int {
|
||||
$amountOrder = abs((float) $right['payment_amount']) <=> abs((float) $left['payment_amount']);
|
||||
|
||||
return $amountOrder !== 0
|
||||
? $amountOrder
|
||||
: strcmp($left['shop_name'], $right['shop_name']);
|
||||
});
|
||||
|
||||
return [
|
||||
'count' => $count,
|
||||
'payment_amount' => $this->formatCents($cents),
|
||||
'store_summary' => $storeSummary,
|
||||
];
|
||||
}
|
||||
|
||||
private function paymentAmountOf(mixed $businessFieldList): ?string
|
||||
@ -717,7 +758,7 @@ class SmallPaymentWorkOrderMirrorRepository
|
||||
$normalized = array_map(static fn (mixed $value): string => trim((string) $value), $filters);
|
||||
ksort($normalized);
|
||||
|
||||
return 'small-payment-work-orders:summary:v1:' . hash(
|
||||
return 'small-payment-work-orders:summary:v2:' . hash(
|
||||
'sha256',
|
||||
(string) json_encode($normalized, JSON_UNESCAPED_UNICODE),
|
||||
);
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
['label' => '完成时间', 'field' => 'completed_at'],
|
||||
];
|
||||
$syncCode = $smallPaymentSyncStatus['code'] ?? 'unavailable';
|
||||
$storeSummary = $smallPaymentStoreSummary ?? [];
|
||||
$syncLabel = match ($syncCode) {
|
||||
'healthy' => '业务镜像已同步',
|
||||
'syncing' => '业务镜像同步中,当前显示最近成功数据',
|
||||
@ -73,6 +74,26 @@
|
||||
border-radius: 0.5rem;
|
||||
background: var(--vip-surface, #ffffff);
|
||||
}
|
||||
.small-payment-summary__drilldown {
|
||||
display: block;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
}
|
||||
.small-payment-summary__drilldown:hover {
|
||||
border-color: var(--vip-content-accent-dark, #856632);
|
||||
background: var(--vip-content-accent-soft, #f7f0de);
|
||||
}
|
||||
.small-payment-summary__drilldown:focus-visible {
|
||||
border-color: var(--vip-content-accent-dark, #856632);
|
||||
box-shadow: 0 0 0 3px rgba(133, 102, 50, 0.2);
|
||||
outline: none;
|
||||
}
|
||||
.small-payment-summary__drilldown:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.55;
|
||||
}
|
||||
.small-payment-summary__label {
|
||||
display: block;
|
||||
color: var(--vip-content-muted, #595959);
|
||||
@ -86,6 +107,160 @@
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 600;
|
||||
}
|
||||
.small-payment-summary__hint {
|
||||
display: block;
|
||||
margin-top: 0.3rem;
|
||||
color: var(--vip-content-accent-dark, #856632);
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.small-payment-store-dialog {
|
||||
width: min(44rem, calc(100vw - 2rem));
|
||||
max-width: none;
|
||||
max-height: calc(100vh - 2rem);
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
border: 1px solid var(--vip-border, #d8d2c7);
|
||||
border-radius: 0.75rem;
|
||||
background: var(--vip-surface, #ffffff);
|
||||
color: var(--vip-content-ink, #171717);
|
||||
box-shadow: 0 10px 30px rgba(23, 23, 23, 0.18);
|
||||
}
|
||||
.small-payment-store-dialog::backdrop { background: rgba(23, 23, 23, 0.38); }
|
||||
.small-payment-store-dialog[open] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.small-payment-store-dialog__head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: 1rem 1.1rem 0.8rem;
|
||||
border-bottom: 1px solid var(--vip-border, #d8d2c7);
|
||||
}
|
||||
.small-payment-store-dialog__head h2 {
|
||||
margin: 0;
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
.small-payment-store-dialog__head p {
|
||||
margin: 0.25rem 0 0;
|
||||
color: var(--vip-content-muted, #595959);
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
.small-payment-store-dialog__side {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
.small-payment-store-dialog__total {
|
||||
text-align: right;
|
||||
}
|
||||
.small-payment-store-dialog__total span {
|
||||
display: block;
|
||||
color: var(--vip-content-muted, #595959);
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
.small-payment-store-dialog__total strong {
|
||||
display: block;
|
||||
margin-top: 0.2rem;
|
||||
font-size: 1rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.small-payment-store-dialog__close {
|
||||
display: inline-flex;
|
||||
width: 1.8rem;
|
||||
height: 1.8rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid var(--vip-border, #d8d2c7);
|
||||
border-radius: 50%;
|
||||
background: var(--vip-surface, #ffffff);
|
||||
color: var(--vip-content-muted, #595959);
|
||||
cursor: pointer;
|
||||
}
|
||||
.small-payment-store-dialog__filter {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(14rem, 22rem);
|
||||
gap: 0.75rem;
|
||||
padding: 0.8rem 1.1rem;
|
||||
border-bottom: 1px solid var(--vip-border, #d8d2c7);
|
||||
}
|
||||
.small-payment-store-dialog__filter span {
|
||||
display: block;
|
||||
margin-bottom: 0.25rem;
|
||||
color: var(--vip-content-muted, #595959);
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
.small-payment-store-dialog__filter select {
|
||||
width: 100%;
|
||||
height: 2.1rem;
|
||||
padding: 0 0.5rem;
|
||||
border: 1px solid var(--vip-border, #d8d2c7);
|
||||
border-radius: 0.375rem;
|
||||
background: var(--vip-surface, #ffffff);
|
||||
color: var(--vip-content-ink, #171717);
|
||||
font: inherit;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
.small-payment-store-dialog__scroll {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 0 1.1rem 0.65rem;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-color: var(--vip-content-accent, #b9954f) #f1ece3;
|
||||
scrollbar-gutter: stable;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.small-payment-store-dialog__table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
font-size: 0.75rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.small-payment-store-dialog__table col:first-child { width: 68%; }
|
||||
.small-payment-store-dialog__table col:last-child { width: 32%; }
|
||||
.small-payment-store-dialog__table th,
|
||||
.small-payment-store-dialog__table td {
|
||||
padding: 0.7rem 0.65rem;
|
||||
border-bottom: 1px solid #eee8dd;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.small-payment-store-dialog__table thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background: var(--vip-content-accent-soft, #f7f0de);
|
||||
color: var(--vip-content-muted, #595959);
|
||||
font-weight: 600;
|
||||
}
|
||||
.small-payment-store-dialog__table .is-number {
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.small-payment-store-dialog__empty {
|
||||
padding: 2rem 0.5rem;
|
||||
color: var(--vip-content-muted, #595959);
|
||||
font-size: 0.75rem;
|
||||
text-align: center;
|
||||
}
|
||||
.small-payment-store-dialog__foot {
|
||||
padding: 0.65rem 1.1rem;
|
||||
border-top: 1px solid var(--vip-border, #d8d2c7);
|
||||
color: var(--vip-content-muted, #595959);
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
.small-payment-store-dialog__table tr[hidden] { display: none; }
|
||||
@media (max-width: 720px) {
|
||||
.small-payment-store-dialog__head { flex-direction: column; }
|
||||
.small-payment-store-dialog__side { width: 100%; justify-content: space-between; }
|
||||
.small-payment-store-dialog__filter { grid-template-columns: minmax(0, 1fr); }
|
||||
}
|
||||
.small-payment-table--wide { min-width: 204rem; }
|
||||
.small-payment-table td.is-number,
|
||||
.small-payment-table th.is-number {
|
||||
@ -558,12 +733,88 @@
|
||||
<span class="small-payment-summary__label">筛选结果</span>
|
||||
<span class="small-payment-summary__value">{{ number_format($rows->total()) }} 条</span>
|
||||
</div>
|
||||
<div class="small-payment-summary__item">
|
||||
<button
|
||||
type="button"
|
||||
class="small-payment-summary__item small-payment-summary__drilldown"
|
||||
data-small-payment-store-open
|
||||
aria-label="查看按店铺汇总的小额打款金额"
|
||||
@disabled($smallPaymentError || $smallPaymentPending || $smallPaymentIndexPending)
|
||||
>
|
||||
<span class="small-payment-summary__label">筛选出的打款金额合计</span>
|
||||
<span class="small-payment-summary__value">¥ {{ $smallPaymentFilteredAmount }}</span>
|
||||
</div>
|
||||
<span class="small-payment-summary__hint">店铺金额 →</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<dialog
|
||||
class="small-payment-store-dialog"
|
||||
id="small-payment-store-dialog"
|
||||
aria-labelledby="small-payment-store-dialog-title"
|
||||
>
|
||||
<div class="small-payment-store-dialog__head">
|
||||
<div>
|
||||
<h2 id="small-payment-store-dialog-title">小额打款 · 店铺汇总</h2>
|
||||
<p>按当前筛选条件汇总各店铺的打款金额</p>
|
||||
</div>
|
||||
<div class="small-payment-store-dialog__side">
|
||||
<div class="small-payment-store-dialog__total">
|
||||
<span>当前筛选合计</span>
|
||||
<strong data-small-payment-store-total>¥ {{ $smallPaymentFilteredAmount }}</strong>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="small-payment-store-dialog__close"
|
||||
data-small-payment-store-close
|
||||
aria-label="关闭小额打款店铺汇总"
|
||||
>×</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="small-payment-store-dialog__filter">
|
||||
<label>
|
||||
<span>店铺名称</span>
|
||||
<select data-small-payment-store-filter aria-label="筛选小额打款店铺">
|
||||
<option value="">全部店铺</option>
|
||||
@foreach ($storeSummary as $store)
|
||||
<option value="{{ $store['shop_name'] }}">{{ $store['shop_name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="small-payment-store-dialog__scroll">
|
||||
<table class="small-payment-store-dialog__table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">店铺名称</th>
|
||||
<th scope="col" class="is-number">打款金额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($storeSummary as $store)
|
||||
<tr
|
||||
data-small-payment-store-row
|
||||
data-shop-name="{{ $store['shop_name'] }}"
|
||||
data-payment-amount="{{ $store['payment_amount'] }}"
|
||||
>
|
||||
<td>{{ $store['shop_name'] }}</td>
|
||||
<td class="is-number">¥ {{ number_format((float) $store['payment_amount'], 2) }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="2" class="small-payment-store-dialog__empty">当前筛选范围没有店铺打款金额。</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="small-payment-store-dialog__foot">
|
||||
<span data-small-payment-store-count>共 {{ number_format(count($storeSummary)) }} 家店铺</span>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<div class="upstream-data-table-panel">
|
||||
<div class="upstream-data-table-scroll">
|
||||
<table
|
||||
@ -1023,8 +1274,88 @@
|
||||
syncClear();
|
||||
}
|
||||
|
||||
function setupStoreSummary() {
|
||||
var trigger = root.querySelector('[data-small-payment-store-open]');
|
||||
var dialog = document.getElementById('small-payment-store-dialog');
|
||||
if (!trigger || !dialog) {
|
||||
return;
|
||||
}
|
||||
|
||||
var filter = dialog.querySelector('[data-small-payment-store-filter]');
|
||||
var total = dialog.querySelector('[data-small-payment-store-total]');
|
||||
var count = dialog.querySelector('[data-small-payment-store-count]');
|
||||
var rows = Array.prototype.slice.call(
|
||||
dialog.querySelectorAll('[data-small-payment-store-row]')
|
||||
);
|
||||
|
||||
function centsFromMoney(value) {
|
||||
var match = /^(-?)(\d+)\.(\d{2})$/.exec(String(value || ''));
|
||||
if (!match) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
var cents = (Number(match[2]) * 100) + Number(match[3]);
|
||||
return match[1] === '-' ? -cents : cents;
|
||||
}
|
||||
|
||||
function formatCents(cents) {
|
||||
var sign = cents < 0 ? '-' : '';
|
||||
var absolute = Math.abs(cents);
|
||||
var whole = Math.floor(absolute / 100).toLocaleString('zh-CN');
|
||||
return sign + '¥ ' + whole + '.' + String(absolute % 100).padStart(2, '0');
|
||||
}
|
||||
|
||||
function render() {
|
||||
var selected = filter ? filter.value : '';
|
||||
var visible = rows.filter(function (row) {
|
||||
return selected === '' || row.dataset.shopName === selected;
|
||||
});
|
||||
rows.forEach(function (row) {
|
||||
row.hidden = visible.indexOf(row) === -1;
|
||||
});
|
||||
|
||||
var amount = visible.reduce(function (sum, row) {
|
||||
return sum + centsFromMoney(row.dataset.paymentAmount);
|
||||
}, 0);
|
||||
|
||||
total.textContent = formatCents(amount);
|
||||
count.textContent = '共 ' + visible.length.toLocaleString('zh-CN') + ' 家店铺';
|
||||
}
|
||||
|
||||
function close() {
|
||||
if (typeof dialog.close === 'function') {
|
||||
dialog.close();
|
||||
} else {
|
||||
dialog.removeAttribute('open');
|
||||
}
|
||||
}
|
||||
|
||||
trigger.addEventListener('click', function () {
|
||||
if (filter) {
|
||||
filter.value = '';
|
||||
}
|
||||
render();
|
||||
if (typeof dialog.showModal === 'function') {
|
||||
dialog.showModal();
|
||||
} else {
|
||||
dialog.setAttribute('open', '');
|
||||
}
|
||||
});
|
||||
|
||||
if (filter) {
|
||||
filter.addEventListener('change', render);
|
||||
}
|
||||
dialog.querySelector('[data-small-payment-store-close]').addEventListener('click', close);
|
||||
dialog.addEventListener('click', function (event) {
|
||||
if (event.target === dialog) {
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
root.querySelectorAll('[data-filter-combobox]').forEach(setupCombobox);
|
||||
root.querySelectorAll('[data-date-picker]').forEach(setupDatePicker);
|
||||
setupStoreSummary();
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@ -61,6 +61,11 @@ class SmallPaymentWorkOrderPageTest extends FeatureTestCase
|
||||
'total' => 26,
|
||||
'page_payment_amount' => '50.00',
|
||||
'filtered_payment_amount' => '50.00',
|
||||
'store_summary' => [[
|
||||
'shop_name' => '京东旗舰店',
|
||||
'work_order_count' => 26,
|
||||
'payment_amount' => '50.00',
|
||||
]],
|
||||
]);
|
||||
$repository->shouldReceive('filterOptions')->once()->andReturn([
|
||||
'shops' => ['京东旗舰店'],
|
||||
@ -93,6 +98,13 @@ class SmallPaymentWorkOrderPageTest extends FeatureTestCase
|
||||
->assertSeeText('GD-001')
|
||||
->assertSeeText('支付宝已打款')
|
||||
->assertSeeText('¥ 50.00')
|
||||
->assertSee('data-small-payment-store-open', false)
|
||||
->assertSee('id="small-payment-store-dialog"', false)
|
||||
->assertSeeText('小额打款 · 店铺汇总')
|
||||
->assertSee('data-small-payment-store-row', false)
|
||||
->assertSee('data-shop-name="京东旗舰店"', false)
|
||||
->assertSeeText('共 1 家店铺')
|
||||
->assertSee('function setupStoreSummary()', false)
|
||||
->assertSeeText('共 26 条记录,本页 1 条')
|
||||
->assertSeeText('第 2 / 2 页')
|
||||
->assertSeeText('主体')
|
||||
|
||||
@ -182,6 +182,11 @@ class SmallPaymentWorkOrderMirrorRepositoryTest extends TestCase
|
||||
$this->assertSame(1, $result['total']);
|
||||
$this->assertSame('50.01', $result['page_payment_amount']);
|
||||
$this->assertSame('50.01', $result['filtered_payment_amount']);
|
||||
$this->assertSame([[
|
||||
'shop_name' => '京东旗舰店',
|
||||
'work_order_count' => 1,
|
||||
'payment_amount' => '50.01',
|
||||
]], $result['store_summary']);
|
||||
$this->assertSame('GD-001', $result['data'][0]['work_order_no']);
|
||||
$this->assertSame('BATCH-001', $result['data'][0]['alipay_batch_no']);
|
||||
$this->assertSame('已完成', $result['data'][0]['work_order_status']);
|
||||
@ -201,6 +206,18 @@ class SmallPaymentWorkOrderMirrorRepositoryTest extends TestCase
|
||||
$this->assertSame('GD-001', $result['data'][0]['work_order_no']);
|
||||
$this->assertSame('50.01', $result['page_payment_amount']);
|
||||
$this->assertSame('70.01', $result['filtered_payment_amount']);
|
||||
$this->assertSame([
|
||||
[
|
||||
'shop_name' => '京东旗舰店',
|
||||
'work_order_count' => 1,
|
||||
'payment_amount' => '50.01',
|
||||
],
|
||||
[
|
||||
'shop_name' => '天猫旗舰店',
|
||||
'work_order_count' => 1,
|
||||
'payment_amount' => '20.00',
|
||||
],
|
||||
], $result['store_summary']);
|
||||
}
|
||||
|
||||
public function test_export_uses_same_filters_and_parsed_shape(): void
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user