From b592aaec2e86ebc589cadfac69bd6537268e9f8c Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Thu, 15 Oct 2026 09:47:18 +0800 Subject: [PATCH] feat(web-admin): add paymentScheduleStatus to status-tag registry Lift schedule open/cleared/void labels from PaymentBySampleTab so Web and mobile share one source. Co-authored-by: Cursor --- web-admin/src/utils/status-tag-registry.ts | 9 ++++++++ .../payment-info/PaymentBySampleTab.vue | 22 ++----------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/web-admin/src/utils/status-tag-registry.ts b/web-admin/src/utils/status-tag-registry.ts index 46d46b3a..6a8ea48a 100644 --- a/web-admin/src/utils/status-tag-registry.ts +++ b/web-admin/src/utils/status-tag-registry.ts @@ -188,6 +188,15 @@ export const samplePaymentProgress: StatusRegistry = { export const samplePaymentProgressLabel = createLabelGetter(samplePaymentProgress) export const samplePaymentProgressTagType = createTagTypeGetter(samplePaymentProgress) +/** 应缴批次 scheduleStatus(勿与样本进度 samplePaymentProgress 混用:open=待缴清,dfj=待缴费) */ +export const paymentScheduleStatus: StatusRegistry = { + open: { label: '待缴清', tagType: 'warning' }, + cleared: { label: '已缴清', tagType: 'success' }, + void: { label: '已作废', tagType: 'info' } +} +export const paymentScheduleStatusLabel = createLabelGetter(paymentScheduleStatus) +export const paymentScheduleStatusTagType = createTagTypeGetter(paymentScheduleStatus) + export const transferType: StatusRegistry = { wxzz: { label: '微信转账', tagType: 'success' }, zzbzz: { label: '支付宝转账', tagType: 'primary' }, diff --git a/web-admin/src/views/cell-storage/payment-info/PaymentBySampleTab.vue b/web-admin/src/views/cell-storage/payment-info/PaymentBySampleTab.vue index 64d00d62..63ec425e 100644 --- a/web-admin/src/views/cell-storage/payment-info/PaymentBySampleTab.vue +++ b/web-admin/src/views/cell-storage/payment-info/PaymentBySampleTab.vue @@ -414,6 +414,8 @@ payModeTagType, samplePaymentProgressLabel, samplePaymentProgressTagType, + paymentScheduleStatusLabel, + paymentScheduleStatusTagType, protocolStatusDisplayLabel, protocolStatusTagType, payStatusLabel, @@ -495,26 +497,6 @@ return formatDisplayOrDash(d) } - function paymentScheduleStatusLabel(status: string) { - const map: Record = { - open: '待缴清', - cleared: '已缴清', - void: '已作废' - } - return map[status] || status || '—' - } - - function paymentScheduleStatusTagType( - status: string - ): 'success' | 'warning' | 'danger' | 'info' | 'primary' { - const map: Record = { - open: 'warning', - cleared: 'success', - void: 'info' - } - return map[status] || 'info' - } - function scheduleCanConfirm(sch: ScheduleRow) { const arrears = Number(sch.arrearsAmount) if (!(arrears > 0)) return false