修复订单发布与核销并发状态覆盖

This commit is contained in:
yml2213
2026-09-01 14:13:10 +08:00
parent d47360f484
commit c6dd6a8b7c
8 changed files with 667 additions and 57 deletions
@@ -566,11 +566,13 @@ export default function WorkOrdersPanel() {
return runAction(
() => publishAdminWorkOrder(row.workOrderId),
(response) =>
response.data.hallVisible
? response.data.voucherConsume.voucherCount > 0
? '电子凭证已自动核销,订单已展示在大厅'
: '订单已展示在大厅'
: '订单已进入大厅等待队列',
!response.data.voucherConsume.ok
? '订单已发布,但电子凭证核销未完成'
: response.data.hallVisible
? response.data.voucherConsume.voucherCount > 0
? '订单已发布,电子凭证已顺带核销'
: '订单已展示在大厅'
: '订单已进入大厅等待队列',
)
}
@@ -582,11 +584,11 @@ export default function WorkOrdersPanel() {
let skipFutureConfirm = false
modal.confirm({
title: '确认发布并核销该订单?',
title: '确认发布该订单?',
content: (
<div>
<Typography.Paragraph>
如订单关联电子凭证,系统会先自动核销,成功后再发布到大厅。核销后即使下架也不会自动恢复凭证。
如订单关联电子凭证,系统会在发布后顺带尝试核销;核销失败不影响订单发布。
</Typography.Paragraph>
<Checkbox
onChange={(event) => {
@@ -597,7 +599,7 @@ export default function WorkOrdersPanel() {
</Checkbox>
</div>
),
okText: '发布并核销',
okText: '发布订单',
cancelText: '取消',
onOk: () => {
if (skipFutureConfirm) setSkipPublishConfirm()