From 2d59e638618311d467afe05764aa7b3681b1269c Mon Sep 17 00:00:00 2001
From: qiuxiang <394405259@qq.com>
Date: Tue, 29 Sep 2026 10:53:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=96=E9=9F=B3=E8=B4=A6=E6=88=B7=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89=E6=A0=87=E7=AD=BE=E6=94=B9=E4=B8=BA?=
=?UTF-8?q?=E7=BB=93=E7=AE=97=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
抖音账户的时间筛选标签由「发生时间」改为「结算时间」,与该页签的「结算时间」列名一致。标签集中成 DATE_FILTER_LABELS 映射(京东账单/京喜账单/京东网银钱包=费用结算时间,抖音=结算时间,其余沿用发生时间),不再散落 if-else。
---
resources/assets/js/components/business/AccountBills.vue | 5 ++++-
tests/Unit/View/AccountBillsTableTest.php | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/resources/assets/js/components/business/AccountBills.vue b/resources/assets/js/components/business/AccountBills.vue
index ddbf6e50..dcf89d0b 100644
--- a/resources/assets/js/components/business/AccountBills.vue
+++ b/resources/assets/js/components/business/AccountBills.vue
@@ -17,7 +17,7 @@
-
{{ isJdBillTab || billType === 'jd-wallet' ? '费用结算时间' : '发生时间' }}
+
{{ dateFilterLabel }}
changeDate('start', value)" />
@@ -76,6 +76,8 @@ import 'flatpickr/dist/flatpickr.css';
const SORTABLE = ['occurred_at','income','expense','balance','record_code'];
// 京东账单与京喜账单共用同一份列定义与同一套交互,只在数据口径上拆分。
const JD_BILL_TABS = ['jd-transactions','jingxi'];
+// 时间筛选标签与该页签的时间列名保持一致(其余页签沿用「发生时间」)。
+const DATE_FILTER_LABELS = {'jd-transactions':'费用结算时间','jingxi':'费用结算时间','jd-wallet':'费用结算时间','douyin':'结算时间'};
const dateConfig = {dateFormat:'Y-m-d',locale:Mandarin,disableMobile:true,allowInput:false,onReady:(_,value,picker)=>picker.calendarContainer.classList.add('account-bill-calendar')};
const emptyFilters = billType => ({store_name:'',bill_item:'',start:'',end:'',keyword:'',keyword_match:billType==='douyin'?'exact-record':'contains'});
export default {
@@ -85,6 +87,7 @@ export default {
isDouyin(){return this.billType==='douyin';},
// 费用结算时间标签、来源说明与收支净额统计口径按京东系列页签(京东账单/京喜账单)统一。
isJdBillTab(){return JD_BILL_TABS.indexOf(this.billType)!==-1;},
+ dateFilterLabel(){return DATE_FILTER_LABELS[this.billType]||'发生时间';},
// Every account-bill tab uses the same explicit picker path. Keeping one
// control avoids browser-native date inputs appearing on older tabs.
usesStableDateControl(){return true;},
diff --git a/tests/Unit/View/AccountBillsTableTest.php b/tests/Unit/View/AccountBillsTableTest.php
index 3cee2573..b696372f 100644
--- a/tests/Unit/View/AccountBillsTableTest.php
+++ b/tests/Unit/View/AccountBillsTableTest.php
@@ -45,7 +45,8 @@ class AccountBillsTableTest extends TestCase
$this->assertStringContainsString("const JD_BILL_TABS = ['jd-transactions','jingxi'];", $source);
$this->assertStringContainsString("isJdBillTab(){return JD_BILL_TABS.indexOf(this.billType)!==-1;}", $source);
- $this->assertStringContainsString("{{ isJdBillTab || billType === 'jd-wallet' ? '费用结算时间' : '发生时间' }}", $source);
+ $this->assertStringContainsString("const DATE_FILTER_LABELS = {'jd-transactions':'费用结算时间','jingxi':'费用结算时间','jd-wallet':'费用结算时间','douyin':'结算时间'};", $source);
+ $this->assertStringContainsString('{{ dateFilterLabel }}', $source);
$this->assertStringContainsString('v-if="isJdBillTab && sync"', $source);
$this->assertStringContainsString("netLabel=JD_BILL_TABS.concat(['vipshop-jx']).indexOf(this.billType)!==-1", $source);
}