feat(shipping-notice): 新增临时库存管理功能,支持创建会话、获取分析结果及字段映射建议
This commit is contained in:
1 parent
46eb63f5bb
commit
e9bdd81f1a
320 files changed
+28361
-10487
No files matched your search
@@ -99,7 +99,6 @@ const createUploadContext = (
|
||||
shippingBatchTasks: ref([]),
|
||||
shippingInventorySelectionActive: ref(false),
|
||||
shippingInventorySelectionTaskId: ref(''),
|
||||
shippingInventorySchemaPreviewCache: ref({}),
|
||||
getActiveShippingTaskId: () => '',
|
||||
startChatTurn,
|
||||
refreshShippingActions: vi.fn(async () => undefined),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* 对话页:子组件 inject 用的 handlers 对象打包(请假表单、出货映射、消息气泡)。
|
||||
* 对话页:子组件 inject 用的 handlers 对象打包(请假表单、发货消息、消息气泡)。
|
||||
*/
|
||||
import type { LeaveMessageHandlers } from '../components/messages/LeaveMessageBlock.vue';
|
||||
import type { ShippingMappingHandlers } from '../components/messages/ShippingInventoryMappingMessage.vue';
|
||||
import type { ShippingMessageHandlers } from '../components/messages/shippingMessageHandlers';
|
||||
import type { TrainingHandlers } from '../components/messages/TrainingExamQuestionMessage.vue';
|
||||
import type { useChatLeave } from '../composables/useChatLeave';
|
||||
import type { useChatShipping } from '../composables/useChatShipping';
|
||||
@@ -29,14 +29,8 @@ type LeaveHandlerSource = Pick<
|
||||
|
||||
type ShippingHandlerSource = Pick<
|
||||
ReturnType<typeof useChatShipping>,
|
||||
| 'getShippingInventoryMappingPayload'
|
||||
| 'normalizeShippingHeaderForDisplay'
|
||||
| 'hasShippingInventorySampleRows'
|
||||
| 'getShippingInventorySampleRowText'
|
||||
| 'getShippingParseReviewPayload'
|
||||
| 'getShippingMatchResultPayload'
|
||||
| 'reuploadShippingInventoryFromMappingForm'
|
||||
| 'applyShippingInventoryMappingForm'
|
||||
| 'updateShippingParseReviewHeader'
|
||||
| 'updateShippingParseReviewLine'
|
||||
| 'addShippingParseReviewLine'
|
||||
@@ -65,19 +59,11 @@ export function createLeaveMessageHandlers(leave: LeaveHandlerSource): LeaveMess
|
||||
};
|
||||
}
|
||||
|
||||
/** 出货库存映射块 handlers(ShippingInventoryMappingMessage) */
|
||||
export function createShippingMappingHandlers(shipping: ShippingHandlerSource): ShippingMappingHandlers {
|
||||
/** 发货通知订单复核与匹配消息 handlers。 */
|
||||
export function createShippingMessageHandlers(shipping: ShippingHandlerSource): ShippingMessageHandlers {
|
||||
return {
|
||||
getPayload: shipping.getShippingInventoryMappingPayload,
|
||||
normalizeHeader: shipping.normalizeShippingHeaderForDisplay,
|
||||
hasSampleRows: shipping.hasShippingInventorySampleRows,
|
||||
getSampleRowText: shipping.getShippingInventorySampleRowText,
|
||||
getParseReviewPayload: shipping.getShippingParseReviewPayload,
|
||||
getMatchResultPayload: shipping.getShippingMatchResultPayload,
|
||||
reupload: shipping.reuploadShippingInventoryFromMappingForm,
|
||||
apply: shipping.applyShippingInventoryMappingForm,
|
||||
updateParseReviewHeader: shipping.updateShippingParseReviewHeader,
|
||||
updateParseReviewLine: shipping.updateShippingParseReviewLine,
|
||||
updateHeader: shipping.updateShippingParseReviewHeader,
|
||||
updateLine: shipping.updateShippingParseReviewLine,
|
||||
addLine: shipping.addShippingParseReviewLine,
|
||||
|
||||
@@ -39,7 +39,6 @@ function createContext(
|
||||
getSourceTitle: () => '',
|
||||
getSourceMeta: () => '',
|
||||
getSourceBrief: () => '',
|
||||
getShippingInventoryMappingPayload: () => null,
|
||||
getShippingMatchResultPayload: () => null,
|
||||
canOpenQueryPreview: () => false,
|
||||
getQueryPreviewSummary: () => '',
|
||||
|
||||
@@ -79,7 +79,6 @@ export interface ChatPageMarkdownContext {
|
||||
getSourceTitle: ChatMessageBubbleHandlers['getSourceTitle'];
|
||||
getSourceMeta: ChatMessageBubbleHandlers['getSourceMeta'];
|
||||
getSourceBrief: ChatMessageBubbleHandlers['getSourceBrief'];
|
||||
getShippingInventoryMappingPayload: ChatMessageBubbleHandlers['getShippingInventoryMappingPayload'];
|
||||
getShippingMatchResultPayload: (msg: ChatMessage) => ShippingMatchResultPayload | null;
|
||||
canOpenQueryPreview: ChatMessageBubbleHandlers['canOpenQueryPreview'];
|
||||
getQueryPreviewSummary: ChatMessageBubbleHandlers['getQueryPreviewSummary'];
|
||||
@@ -368,7 +367,6 @@ export function createChatPageMarkdownApi(ctx: ChatPageMarkdownContext) {
|
||||
if (msgItem?.type === 'leave-form'
|
||||
|| msgItem?.type === 'leave-confirmation'
|
||||
|| msgItem?.type === 'leave-result'
|
||||
|| msgItem?.type === 'shipping-inventory-mapping'
|
||||
|| msgItem?.type === 'shipping-parse-review'
|
||||
|| msgItem?.type === 'shipping-match-result') {
|
||||
return true;
|
||||
@@ -459,7 +457,6 @@ export function createChatPageMarkdownApi(ctx: ChatPageMarkdownContext) {
|
||||
openAssetImage: ctx.openAssetImage,
|
||||
getInlineDownloadFiles: safeExtractInlineDownloadFiles,
|
||||
downloadInlineFile,
|
||||
getShippingInventoryMappingPayload: ctx.getShippingInventoryMappingPayload,
|
||||
getShippingMatchResultPayload: ctx.getShippingMatchResultPayload,
|
||||
canOpenQueryPreview: ctx.canOpenQueryPreview,
|
||||
getQueryPreviewSummary: ctx.getQueryPreviewSummary,
|
||||
|
||||
@@ -54,7 +54,7 @@ export interface ChatPageSendContext {
|
||||
agentId: number,
|
||||
kb: string,
|
||||
files: ChatUploadFileSpec[],
|
||||
context?: { task_id?: string; batch_no?: string; shipping_intake_nos?: string[]; display_query?: string },
|
||||
context?: { task_id?: string; batch_no?: string; shipping_intake_nos?: string[]; shipping_temporary_inventory_asset_no?: string; shipping_temporary_inventory_session_no?: string; display_query?: string },
|
||||
hooks?: SendMessageLifecycleHooks,
|
||||
) => Promise<ChatMessageSendResult>;
|
||||
refreshHistoryAfterSend: () => Promise<void>;
|
||||
@@ -75,7 +75,7 @@ export interface ChatPageSendContext {
|
||||
msg: { warning: (text: string) => void; info: (text: string) => void };
|
||||
t: (key: string) => string;
|
||||
copiedIndex: Ref<number | null>;
|
||||
getChatContext?: () => { task_id?: string; batch_no?: string; shipping_intake_nos?: string[]; display_query?: string };
|
||||
getChatContext?: () => { task_id?: string; batch_no?: string; shipping_intake_nos?: string[]; shipping_temporary_inventory_asset_no?: string; shipping_temporary_inventory_session_no?: string; display_query?: string };
|
||||
onAssistantMessageFinished?: (message: ChatMessage, runMessages: ChatMessage[]) => void | Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user