完善报销通知与付款进度(08-01-reimbursement-notification-progress-clarity)
这个提交包含在:
@@ -333,8 +333,8 @@ const PROCESSING_STAGE_DEFINITIONS = Object.freeze([
|
||||
{ key: "submitted", label: "申请提交" },
|
||||
{ key: "manager_approval", label: "主管审批" },
|
||||
{ key: "finance_review", label: "财务复核" },
|
||||
{ key: "payment_batch_review", label: "付款批次复核" },
|
||||
{ key: "payment_and_receipt", label: "付款与回单" },
|
||||
{ key: "payment_batch_review", label: "付款复核" },
|
||||
{ key: "payment_and_receipt", label: "付款完成" },
|
||||
]);
|
||||
|
||||
function isoDateTimeOrNull(value) {
|
||||
@@ -511,31 +511,34 @@ function buildProcessingProgress({ reimbursement, workflowInstance, paymentBatch
|
||||
|
||||
if (!batch) {
|
||||
Object.assign(batchReviewStage, reimbursement.status === "approved"
|
||||
? { state: "current", result: "待建批次", detail: "待财务创建付款批次" }
|
||||
: { detail: "待财务创建付款批次" });
|
||||
paymentStage.detail = "待付款批次复核后处理";
|
||||
? { state: "current", result: "待安排", detail: "待财务安排付款" }
|
||||
: { detail: "待财务安排付款" });
|
||||
paymentStage.detail = "待付款复核后由财务登记,非审批环节";
|
||||
} else if (batch.status === "draft") {
|
||||
Object.assign(batchReviewStage, {
|
||||
state: "current",
|
||||
result: "待复核",
|
||||
detail: "所在付款批次待非制单人复核",
|
||||
detail: "待非制单人复核付款",
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
Object.assign(paymentStage, {
|
||||
detail: "待付款复核通过后由财务登记,非审批环节",
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
Object.assign(paymentStage, { detail: "待所在付款批次复核通过", targetHref: batchTargetHref });
|
||||
} else if (["reviewed", "executed", "failed"].includes(batch.status)) {
|
||||
Object.assign(batchReviewStage, {
|
||||
state: "completed",
|
||||
actorName: paymentActorNames.get(batch.reviewed_by) ?? null,
|
||||
occurredAt: isoDateTimeOrNull(batch.reviewed_at),
|
||||
result: "通过",
|
||||
detail: batch.status === "reviewed" ? "所在付款批次已复核,待执行付款" : null,
|
||||
detail: batch.status === "reviewed" ? "付款复核已通过" : null,
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
if (batch.status === "reviewed") {
|
||||
Object.assign(paymentStage, {
|
||||
state: "current",
|
||||
result: "待付款",
|
||||
detail: "所在付款批次已复核,待执行付款",
|
||||
detail: "待财务完成付款并登记回单,非审批环节",
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
} else if (batch.status === "failed") {
|
||||
@@ -544,7 +547,7 @@ function buildProcessingProgress({ reimbursement, workflowInstance, paymentBatch
|
||||
actorName: paymentActorNames.get(batch.executed_by) ?? null,
|
||||
occurredAt: isoDateTimeOrNull(batch.executed_at),
|
||||
result: "付款失败",
|
||||
detail: "所在付款批次执行失败,待财务重新处理",
|
||||
detail: "付款失败,待财务重新处理,非审批环节",
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
}
|
||||
@@ -555,11 +558,11 @@ function buildProcessingProgress({ reimbursement, workflowInstance, paymentBatch
|
||||
occurredAt: isoDateTimeOrNull(batch.cancelled_at),
|
||||
result: "批次已取消",
|
||||
comment: batch.cancelled_reason ?? null,
|
||||
detail: "所在付款批次已取消,待财务重新创建",
|
||||
detail: "付款安排已取消,待财务重新处理",
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
Object.assign(paymentStage, {
|
||||
detail: "待财务重新创建付款批次",
|
||||
detail: "待财务重新安排付款,非审批环节",
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
}
|
||||
@@ -571,7 +574,7 @@ function buildProcessingProgress({ reimbursement, workflowInstance, paymentBatch
|
||||
actorName: reimbursement.paid_by_employee?.name ?? paymentActorNames.get(batch?.executed_by) ?? null,
|
||||
occurredAt: isoDateTimeOrNull(reimbursement.paid_at ?? batch?.executed_at),
|
||||
result: "已付款",
|
||||
detail: receiptCount > 0 ? "付款与回单已留存" : "付款已完成,回单待留存",
|
||||
detail: receiptCount > 0 ? "付款和回单已留存" : "付款已完成,回单待留存",
|
||||
targetHref: batchTargetHref,
|
||||
});
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户