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 <cursoragent@cursor.com>
This commit is contained in:
1 parent
012527ed35
commit
b592aaec2e
2 files changed
+11
-20
No files matched your search
@@ -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' },
|
||||
|
||||
@@ -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<string, string> = {
|
||||
open: '待缴清',
|
||||
cleared: '已缴清',
|
||||
void: '已作废'
|
||||
}
|
||||
return map[status] || status || '—'
|
||||
}
|
||||
|
||||
function paymentScheduleStatusTagType(
|
||||
status: string
|
||||
): 'success' | 'warning' | 'danger' | 'info' | 'primary' {
|
||||
const map: Record<string, 'success' | 'warning' | 'danger' | 'info' | 'primary'> = {
|
||||
open: 'warning',
|
||||
cleared: 'success',
|
||||
void: 'info'
|
||||
}
|
||||
return map[status] || 'info'
|
||||
}
|
||||
|
||||
function scheduleCanConfirm(sch: ScheduleRow) {
|
||||
const arrears = Number(sch.arrearsAmount)
|
||||
if (!(arrears > 0)) return false
|
||||
|
||||
Reference in new issue
Block a user