feat(shipping-notice): 收敛订单处理状态与履约门禁
This commit is contained in:
1 parent
bffcd55b40
commit
70dd0051b8
153 files changed
+10916
-4296
No files matched your search
@@ -40,13 +40,13 @@ describe('useChat user attachment snapshots', () => {
|
||||
const buildTaskUiStateEvent = (
|
||||
taskNo: string,
|
||||
actionId: string,
|
||||
checkpoint = 'ready_export',
|
||||
position = 'ready_export',
|
||||
) => ({
|
||||
event: 'shipping_ui_state',
|
||||
task_no: taskNo,
|
||||
ui_state: {
|
||||
task_no: taskNo,
|
||||
checkpoint,
|
||||
position,
|
||||
match_status: 'matched',
|
||||
review_status: null,
|
||||
pending_human_reason: null,
|
||||
|
||||
@@ -35,6 +35,7 @@ import {
|
||||
getShippingParseReviewPayload,
|
||||
sanitizeShippingConversationText,
|
||||
} from '../shipping';
|
||||
import { isShippingUiParseReview } from '../shipping/shippingUiPosition';
|
||||
import { isShippingSpreadsheetFile } from '../shipping/shippingUploadPrompt';
|
||||
import { extractExt } from '../constants/shipping';
|
||||
import {
|
||||
@@ -310,13 +311,8 @@ export function useChatShipping(options: UseChatShippingOptions) {
|
||||
const normalizedTaskId = String(taskId || getActiveShippingTaskId() || '').trim().toUpperCase();
|
||||
if (!conversationKey || !normalizedTaskId || !isShippingNoticeAgent.value || isShippingActionBusy.value) return;
|
||||
const detail = activeShippingTaskDetail.value;
|
||||
// 复核同步只消费后端统一 ui_state.checkpoint,不读取 review_status 等领域事实推导。
|
||||
const checkpoint = String(
|
||||
detail?.ui_state?.checkpoint?.code
|
||||
|| detail?.ui_state?.checkpoint_code
|
||||
|| '',
|
||||
).trim();
|
||||
if (checkpoint !== 'parse_review') return;
|
||||
// 复核同步:优先 review_status / Gate / position(isShippingUiParseReview)。
|
||||
if (!isShippingUiParseReview(detail?.ui_state || null)) return;
|
||||
const exists = messages.value.some((msg) => {
|
||||
if (msg.type !== 'shipping-parse-review' || !msg.payload || typeof msg.payload !== 'object') return false;
|
||||
return String((msg.payload as { taskId?: string }).taskId || '').trim().toUpperCase() === normalizedTaskId;
|
||||
|
||||
Reference in new issue
Block a user