feat(shipping-notice): 完成货代发货通知全流程开发与代码重构
- 新增PO号提取、预约ID解析(支持`PR@xxx`格式)工具,完善库存匹配逻辑 - 新增库存映射缓存、匹配/解析结果格式化摘要,优化用户提示 - 修复数据库迁移脚本未检查表存在的问题,避免全新部署失败 - 新增路径工具类统一管理相对路径,优化配置文件处理逻辑 - 归档旧文档,将部署、Dify配置合并到`shipping_notice.md` - 新增完整单元测试与集成测试覆盖核心流程 - 更新前端国际化与会话管理逻辑,优化界面交互
This commit is contained in:
1 parent
b62082758b
commit
8deae3146b
65 files changed
+6477
-1937
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { getAuthHeaders } from '../utils/auth';
|
||||
|
||||
export interface ShippingCaseSummary {
|
||||
export interface ShippingTaskSummary {
|
||||
id: number;
|
||||
case_no: string;
|
||||
task_no: string;
|
||||
source_type: string;
|
||||
customer_name?: string | null;
|
||||
process_status: string;
|
||||
@@ -16,22 +16,23 @@ export interface ShippingCaseSummary {
|
||||
updated_at?: string | null;
|
||||
}
|
||||
|
||||
export interface ShippingCaseEvent {
|
||||
export interface ShippingTaskEvent {
|
||||
event_type: string;
|
||||
detail_json?: Record<string, unknown> | null;
|
||||
created_at?: string | null;
|
||||
}
|
||||
|
||||
export interface ShippingCaseDetail extends ShippingCaseSummary {
|
||||
export interface ShippingTaskDetail extends ShippingTaskSummary {
|
||||
customer_code?: string | null;
|
||||
ship_to?: string | null;
|
||||
po_number?: string | null;
|
||||
required_date?: string | null;
|
||||
lines: Array<Record<string, unknown>>;
|
||||
shortage?: Record<string, unknown> | null;
|
||||
line_results?: Array<Record<string, unknown>>;
|
||||
parse_confidence?: number | null;
|
||||
error_message?: string | null;
|
||||
events: ShippingCaseEvent[];
|
||||
events: ShippingTaskEvent[];
|
||||
}
|
||||
|
||||
async function getJson<T>(url: string): Promise<T> {
|
||||
@@ -43,19 +44,19 @@ async function getJson<T>(url: string): Promise<T> {
|
||||
return res.json() as Promise<T>;
|
||||
}
|
||||
|
||||
export const listWorkspaceShippingCases = (params?: { process_status?: string; limit?: number }) => {
|
||||
export const listWorkspaceShippingTasks = (params?: { process_status?: string; limit?: number }) => {
|
||||
const sp = new URLSearchParams();
|
||||
if (params?.process_status) sp.set('process_status', params.process_status);
|
||||
if (params?.limit) sp.set('limit', String(params.limit));
|
||||
const qs = sp.toString();
|
||||
return getJson<ShippingCaseSummary[]>(`/api/workspace/shipping-cases${qs ? '?' + qs : ''}`);
|
||||
return getJson<ShippingTaskSummary[]>(`/api/workspace/shipping-tasks${qs ? '?' + qs : ''}`);
|
||||
};
|
||||
|
||||
export const getWorkspaceShippingCase = (caseNo: string) =>
|
||||
getJson<ShippingCaseDetail>(`/api/workspace/shipping-cases/${encodeURIComponent(caseNo)}`);
|
||||
export const getWorkspaceShippingTask = (taskNo: string) =>
|
||||
getJson<ShippingTaskDetail>(`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}`);
|
||||
|
||||
export const workspaceShippingExportUrl = (caseNo: string) =>
|
||||
`/api/workspace/shipping-cases/${encodeURIComponent(caseNo)}/export`;
|
||||
export const workspaceShippingExportUrl = (taskNo: string) =>
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/export`;
|
||||
|
||||
export interface ShippingChatAction {
|
||||
id: string;
|
||||
@@ -65,7 +66,7 @@ export interface ShippingChatAction {
|
||||
}
|
||||
|
||||
export interface ShippingChatActionsResponse {
|
||||
case_no: string;
|
||||
task_no: string;
|
||||
checkpoint?: string | null;
|
||||
process_status: string;
|
||||
review_status?: string | null;
|
||||
@@ -73,18 +74,18 @@ export interface ShippingChatActionsResponse {
|
||||
action_buttons: ShippingChatAction[];
|
||||
}
|
||||
|
||||
export const getShippingChatActions = (caseNo: string) =>
|
||||
export const getShippingChatActions = (taskNo: string) =>
|
||||
getJson<ShippingChatActionsResponse>(
|
||||
`/api/workspace/shipping-cases/${encodeURIComponent(caseNo)}/chat-actions`,
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/chat-actions`,
|
||||
);
|
||||
|
||||
export async function uploadWorkspaceShippingInventory(caseNo: string, file: File) {
|
||||
export async function uploadWorkspaceShippingInventory(taskNo: string, file: File) {
|
||||
const form = new FormData();
|
||||
form.append('file', file);
|
||||
const headers = getAuthHeaders();
|
||||
delete (headers as Record<string, string>)['Content-Type'];
|
||||
const res = await fetch(
|
||||
`/api/workspace/shipping-cases/${encodeURIComponent(caseNo)}/upload-inventory`,
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/upload-inventory`,
|
||||
{ method: 'POST', headers, body: form },
|
||||
);
|
||||
const body = (await res.json().catch(() => ({}))) as ShippingInventoryUploadResponse & { error?: string };
|
||||
@@ -94,25 +95,92 @@ export async function uploadWorkspaceShippingInventory(caseNo: string, file: Fil
|
||||
return body;
|
||||
}
|
||||
|
||||
export async function applyWorkspaceShippingInventoryMapping(taskNo: string, columnMappingJson: Record<string, unknown>) {
|
||||
const res = await fetch(
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/apply-inventory-mapping`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ column_mapping_json: columnMappingJson }),
|
||||
},
|
||||
);
|
||||
const body = (await res.json().catch(() => ({}))) as ShippingInventoryUploadResponse & { error?: string };
|
||||
if (!res.ok) {
|
||||
throw new Error(body.error || body.message || res.statusText);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
export interface ShippingInventoryUploadResponse {
|
||||
status: string;
|
||||
message?: string;
|
||||
case_id?: string;
|
||||
task_id?: string;
|
||||
checkpoint?: string;
|
||||
data?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface ShippingTaskCreateResponse {
|
||||
status: string;
|
||||
message?: string;
|
||||
task_id?: string;
|
||||
checkpoint?: string;
|
||||
data?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export async function createWorkspaceShippingTask(params?: {
|
||||
source_type?: string;
|
||||
conversation_id?: string;
|
||||
raw_content?: string;
|
||||
}) {
|
||||
const res = await fetch('/api/workspace/shipping-tasks', {
|
||||
method: 'POST',
|
||||
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(params || {}),
|
||||
});
|
||||
const body = (await res.json().catch(() => ({}))) as ShippingTaskCreateResponse & { error?: string };
|
||||
if (!res.ok || body.status === 'failed') {
|
||||
throw new Error(body.error || body.message || res.statusText);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
export interface ShippingNoticeUploadResponse {
|
||||
status: string;
|
||||
message?: string;
|
||||
task_id?: string;
|
||||
checkpoint?: string;
|
||||
data?: Record<string, unknown>;
|
||||
human_options?: string[];
|
||||
}
|
||||
|
||||
export async function createWorkspaceShippingTaskFromNotice(file: File) {
|
||||
const form = new FormData();
|
||||
form.append('file', file);
|
||||
const headers = getAuthHeaders();
|
||||
delete (headers as Record<string, string>)['Content-Type'];
|
||||
const res = await fetch('/api/workspace/shipping-tasks/create-from-notice', {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: form,
|
||||
});
|
||||
const body = (await res.json().catch(() => ({}))) as ShippingNoticeUploadResponse & { error?: string };
|
||||
if (!res.ok || body.status === 'failed') {
|
||||
throw new Error(body.error || body.message || res.statusText);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
export interface ShippingDecisionResponse {
|
||||
status: string;
|
||||
message?: string;
|
||||
case_id?: string;
|
||||
task_id?: string;
|
||||
checkpoint?: string;
|
||||
data?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export async function submitWorkspaceShippingDecision(caseNo: string, decision: string, comment?: string) {
|
||||
export async function submitWorkspaceShippingDecision(taskNo: string, decision: string, comment?: string) {
|
||||
const res = await fetch(
|
||||
`/api/workspace/shipping-cases/${encodeURIComponent(caseNo)}/submit-decision`,
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/submit-decision`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
|
||||
@@ -126,4 +194,36 @@ export async function submitWorkspaceShippingDecision(caseNo: string, decision:
|
||||
return body;
|
||||
}
|
||||
|
||||
export async function matchWorkspaceShippingInventory(taskNo: string) {
|
||||
const res = await fetch(
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/match-inventory`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({}),
|
||||
},
|
||||
);
|
||||
const body = (await res.json().catch(() => ({}))) as ShippingDecisionResponse & { error?: string };
|
||||
if (!res.ok || body.status === 'failed') {
|
||||
throw new Error(body.error || body.message || res.statusText);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
export async function generateWorkspaceShippingExcel(taskNo: string) {
|
||||
const res = await fetch(
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/generate-excel`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({}),
|
||||
},
|
||||
);
|
||||
const body = (await res.json().catch(() => ({}))) as ShippingDecisionResponse & { error?: string };
|
||||
if (!res.ok || body.status === 'failed') {
|
||||
throw new Error(body.error || body.message || res.statusText);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
export const SHIPPING_NOTICE_AGENT_NAME = '货代发货通知 Agent';
|
||||
@@ -22,7 +22,7 @@ interface ChatMessage {
|
||||
// 对话消息结构:用户/助手文本 + 可选的来源与归因信息
|
||||
role: 'user' | 'assistant';
|
||||
content: string;
|
||||
type?: 'text' | 'leave-form' | 'leave-confirmation' | 'leave-result';
|
||||
type?: 'text' | 'leave-form' | 'leave-confirmation' | 'leave-result' | 'shipping-inventory-mapping';
|
||||
retriever_resources?: RetrieverResource[];
|
||||
attribution_parts?: string[];
|
||||
chat_log_id?: number;
|
||||
@@ -174,6 +174,14 @@ export function useChat() {
|
||||
activeRunId.value = null;
|
||||
};
|
||||
|
||||
const loadConversationState = (id: string, nextMessages: ChatMessage[]) => {
|
||||
viewId.value += 1;
|
||||
activeRunId.value = null;
|
||||
isThinking.value = false;
|
||||
messages.value = nextMessages;
|
||||
conversationId.value = id;
|
||||
};
|
||||
|
||||
/**
|
||||
* sendMessage
|
||||
* 用途:发送消息并处理 SSE 流式响应
|
||||
@@ -402,5 +410,5 @@ export function useChat() {
|
||||
return text.replace(/\\n/g, '\n');
|
||||
};
|
||||
|
||||
return { messages, isThinking, conversationId, runs, activeRunId, activateRun, createNewChatView, sendMessage };
|
||||
return { messages, isThinking, conversationId, runs, activeRunId, activateRun, createNewChatView, loadConversationState, sendMessage };
|
||||
}
|
||||
@@ -204,16 +204,17 @@ export function useAgentsAdmin() {
|
||||
isTesting.value = true;
|
||||
try {
|
||||
const data = await testAdminAgent(target.id);
|
||||
const passed = !!(data as any)?.passed;
|
||||
testResult.value = {
|
||||
success: !!data.success,
|
||||
success: passed,
|
||||
request_url: data.request_url || '',
|
||||
output_info: data.output_info || '',
|
||||
analysis: data.analysis || (data.success ? t('admin.agent.testDone') : t('admin.agent.testFailed')),
|
||||
analysis: data.analysis || (passed ? t('admin.agent.testDone') : t('admin.agent.testFailed')),
|
||||
http_status: data.http_status,
|
||||
tested_at: data.tested_at,
|
||||
};
|
||||
|
||||
if (data.success) {
|
||||
if (passed) {
|
||||
const idx = agents.value.findIndex((a) => a.id === target.id);
|
||||
const row = idx >= 0 ? agents.value[idx] : undefined;
|
||||
if (row) {
|
||||
|
||||
+16
-10
@@ -432,14 +432,14 @@ const messages = {
|
||||
}
|
||||
},
|
||||
shippingNotice: {
|
||||
title: 'Shipping Notice Cases',
|
||||
title: 'Shipping Notice Tasks',
|
||||
subtitle: 'Read-only view. Continue processing in Chat.',
|
||||
refresh: 'Refresh',
|
||||
search: 'Search',
|
||||
loading: 'Loading...',
|
||||
empty: 'No shipping cases yet',
|
||||
selectCase: 'Select a case to view details',
|
||||
loadFailed: 'Failed to load case',
|
||||
empty: 'No shipping tasks yet',
|
||||
selectCase: 'Select a task to view details',
|
||||
loadFailed: 'Failed to load task',
|
||||
openChat: 'Continue in Chat',
|
||||
download: 'Download Excel',
|
||||
lines: 'Shipment lines',
|
||||
@@ -1267,6 +1267,8 @@ const messages = {
|
||||
placeholder: 'Ask anything...',
|
||||
history: 'Chat History',
|
||||
noHistory: 'No history',
|
||||
historyEmpty: 'This conversation has no saved messages.',
|
||||
historyLoadFailed: 'Failed to load conversation history.',
|
||||
newChat: 'New Chat',
|
||||
rate: 'Rate this response',
|
||||
send: 'Send',
|
||||
@@ -1275,9 +1277,9 @@ const messages = {
|
||||
thinking: 'Generating response...',
|
||||
disclaimer: 'AI can make mistakes. Please verify important information.',
|
||||
createNewChat: 'New Chat',
|
||||
shippingNoticeContinue: 'Please continue shipping case {caseId}. Call get_case_status first and tell me the next step.',
|
||||
shippingNoticeContinue: 'Please continue shipping task {taskId}. Call get_task_status first and tell me the next step.',
|
||||
shippingNoticeActionsHint: 'Choose an action (no need to type):',
|
||||
shippingNoticeMissingCaseId: 'Case ID not found. Complete shipping notice parsing first.',
|
||||
shippingNoticeMissingTaskId: 'Task ID not found. Complete shipping notice parsing first.',
|
||||
shippingNoticeUploadDone: 'Inventory file uploaded: {fileName}.',
|
||||
shippingNoticeUploadOk: 'Upload succeeded.',
|
||||
shippingNoticeUploadFailed: 'Inventory upload failed.',
|
||||
@@ -2780,6 +2782,8 @@ const messages = {
|
||||
placeholder: '请输入问题...',
|
||||
history: '历史记录',
|
||||
noHistory: '暂无历史记录',
|
||||
historyEmpty: '该会话暂无消息记录',
|
||||
historyLoadFailed: '加载历史会话失败',
|
||||
newChat: '新对话',
|
||||
rate: '评价回答',
|
||||
send: '发送',
|
||||
@@ -2788,9 +2792,9 @@ const messages = {
|
||||
thinking: '正在生成回答...',
|
||||
disclaimer: 'AI 可能会犯错,请核实重要信息。',
|
||||
createNewChat: '创建新对话',
|
||||
shippingNoticeContinue: '请继续处理发货任务 {caseId},请先调用 get_case_status 查询当前状态并告知我下一步。',
|
||||
shippingNoticeContinue: '请继续处理发货任务 {taskId},请先调用 get_task_status 查询当前状态并告知我下一步。',
|
||||
shippingNoticeActionsHint: '请选择操作(无需输入文字):',
|
||||
shippingNoticeMissingCaseId: '未找到 case_id,请先完成发货通知解析。',
|
||||
shippingNoticeMissingTaskId: '未找到任务编号,请先完成发货通知解析。',
|
||||
shippingNoticeUploadDone: '库存文件已上传:{fileName}。',
|
||||
shippingNoticeUploadOk: '上传成功。',
|
||||
shippingNoticeUploadFailed: '库存文件上传失败。',
|
||||
@@ -4117,6 +4121,8 @@ const messages = {
|
||||
placeholder: '請輸入問題...',
|
||||
history: '歷史記錄',
|
||||
noHistory: '暫無歷史記錄',
|
||||
historyEmpty: '該會話暫無消息記錄',
|
||||
historyLoadFailed: '加載歷史會話失敗',
|
||||
newChat: '新對話',
|
||||
rate: '評價回答',
|
||||
send: '發送',
|
||||
@@ -5363,6 +5369,8 @@ const messages = {
|
||||
placeholder: 'ถามอะไรก็ได้...',
|
||||
history: 'ประวัติการแชท',
|
||||
noHistory: 'ไม่มีประวัติ',
|
||||
historyEmpty: 'ไม่มีข้อความที่บันทึกไว้ในการสนทนานี้',
|
||||
historyLoadFailed: 'โหลดประวัติการสนทนาไม่สำเร็จ',
|
||||
newChat: 'แชทใหม่',
|
||||
rate: 'ให้คะแนนคำตอบนี้',
|
||||
send: 'ส่ง',
|
||||
@@ -5633,5 +5641,3 @@ const i18n = createI18n({
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
|
||||
|
||||
+1044
-82
File diff suppressed because it is too large.
Load diff
@@ -4,12 +4,12 @@ import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ArrowLeft, Download, ExternalLink, RefreshCw } from 'lucide-vue-next';
|
||||
import {
|
||||
getWorkspaceShippingCase,
|
||||
listWorkspaceShippingCases,
|
||||
getWorkspaceShippingTask,
|
||||
listWorkspaceShippingTasks,
|
||||
SHIPPING_NOTICE_AGENT_NAME,
|
||||
workspaceShippingExportUrl,
|
||||
type ShippingCaseDetail,
|
||||
type ShippingCaseSummary,
|
||||
type ShippingTaskDetail,
|
||||
type ShippingTaskSummary,
|
||||
} from '../api/shippingNotice';
|
||||
import { getAuthHeaders } from '../utils/auth';
|
||||
|
||||
@@ -22,9 +22,9 @@ const { t } = useI18n();
|
||||
|
||||
const loading = ref(false);
|
||||
const detailLoading = ref(false);
|
||||
const cases = ref<ShippingCaseSummary[]>([]);
|
||||
const selectedCaseNo = ref<string | null>(null);
|
||||
const detail = ref<ShippingCaseDetail | null>(null);
|
||||
const tasks = ref<ShippingTaskSummary[]>([]);
|
||||
const selectedTaskNo = ref<string | null>(null);
|
||||
const detail = ref<ShippingTaskDetail | null>(null);
|
||||
const statusFilter = ref('all');
|
||||
const chatAgentId = ref<number | null>(null);
|
||||
|
||||
@@ -55,21 +55,21 @@ const statusBadge = (status: string) => {
|
||||
const loadCases = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
cases.value = await listWorkspaceShippingCases({
|
||||
tasks.value = await listWorkspaceShippingTasks({
|
||||
process_status: statusFilter.value === 'all' ? undefined : statusFilter.value,
|
||||
limit: 100,
|
||||
});
|
||||
} catch {
|
||||
cases.value = [];
|
||||
tasks.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const loadDetail = async (caseNo: string) => {
|
||||
const loadDetail = async (taskNo: string) => {
|
||||
detailLoading.value = true;
|
||||
try {
|
||||
detail.value = await getWorkspaceShippingCase(caseNo);
|
||||
detail.value = await getWorkspaceShippingTask(taskNo);
|
||||
} catch {
|
||||
detail.value = null;
|
||||
} finally {
|
||||
@@ -89,24 +89,24 @@ const resolveChatAgent = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const openInChat = (caseNo: string) => {
|
||||
const openInChat = (taskNo: string) => {
|
||||
if (!chatAgentId.value) return;
|
||||
router.push({ path: `/chat/${chatAgentId.value}`, query: { case_id: caseNo } });
|
||||
router.push({ path: `/chat/${chatAgentId.value}`, query: { task_id: taskNo } });
|
||||
};
|
||||
|
||||
const downloadExport = async (caseNo: string) => {
|
||||
const url = workspaceShippingExportUrl(caseNo);
|
||||
const downloadExport = async (taskNo: string) => {
|
||||
const url = workspaceShippingExportUrl(taskNo);
|
||||
const res = await fetch(url, { headers: getAuthHeaders() });
|
||||
if (!res.ok) return;
|
||||
const blob = await res.blob();
|
||||
const a = document.createElement('a');
|
||||
a.href = URL.createObjectURL(blob);
|
||||
a.download = detail.value?.export_file_name || `${caseNo}.xlsx`;
|
||||
a.download = detail.value?.export_file_name || `${taskNo}.xlsx`;
|
||||
a.click();
|
||||
URL.revokeObjectURL(a.href);
|
||||
};
|
||||
|
||||
watch(selectedCaseNo, (val) => {
|
||||
watch(selectedTaskNo, (val) => {
|
||||
if (val) loadDetail(val);
|
||||
else detail.value = null;
|
||||
});
|
||||
@@ -164,19 +164,19 @@ onMounted(async () => {
|
||||
<div v-if="loading" class="rounded-2xl border border-dashed border-default py-10 text-center text-sm text-muted">
|
||||
{{ $t('workspace.shippingNotice.loading') }}
|
||||
</div>
|
||||
<div v-else-if="cases.length === 0" class="rounded-2xl border border-dashed border-default py-10 text-center text-sm text-muted">
|
||||
<div v-else-if="tasks.length === 0" class="rounded-2xl border border-dashed border-default py-10 text-center text-sm text-muted">
|
||||
{{ $t('workspace.shippingNotice.empty') }}
|
||||
</div>
|
||||
<button
|
||||
v-for="item in cases"
|
||||
:key="item.case_no"
|
||||
v-for="item in tasks"
|
||||
:key="item.task_no"
|
||||
type="button"
|
||||
class="w-full rounded-2xl border px-4 py-3 text-left transition-colors"
|
||||
:class="selectedCaseNo === item.case_no ? 'border-brand-400 bg-brand-50/60' : 'border-default hover:bg-surface-soft/70'"
|
||||
@click="selectedCaseNo = item.case_no"
|
||||
:class="selectedTaskNo === item.task_no ? 'border-brand-400 bg-brand-50/60' : 'border-default hover:bg-surface-soft/70'"
|
||||
@click="selectedTaskNo = item.task_no"
|
||||
>
|
||||
<div class="flex items-center justify-between gap-2">
|
||||
<span class="font-mono text-sm font-semibold text-primary">{{ item.case_no }}</span>
|
||||
<span class="font-mono text-sm font-semibold text-primary">{{ item.task_no }}</span>
|
||||
<span class="rounded-full px-2 py-0.5 text-xs font-medium" :class="statusBadge(item.process_status).cls">
|
||||
{{ statusBadge(item.process_status).label }}
|
||||
</span>
|
||||
@@ -187,7 +187,7 @@ onMounted(async () => {
|
||||
</div>
|
||||
|
||||
<div class="lg:col-span-3 rounded-2xl border border-default bg-surface/50 p-5">
|
||||
<div v-if="!selectedCaseNo" class="py-16 text-center text-sm text-muted">
|
||||
<div v-if="!selectedTaskNo" class="py-16 text-center text-sm text-muted">
|
||||
{{ $t('workspace.shippingNotice.selectCase') }}
|
||||
</div>
|
||||
<div v-else-if="detailLoading" class="py-16 text-center text-sm text-muted">
|
||||
@@ -199,7 +199,7 @@ onMounted(async () => {
|
||||
<div v-else class="space-y-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<div>
|
||||
<div class="font-mono text-lg font-bold text-primary">{{ detail.case_no }}</div>
|
||||
<div class="font-mono text-lg font-bold text-primary">{{ detail.task_no }}</div>
|
||||
<div class="text-sm text-muted">{{ detail.customer_name }} · {{ detail.customer_code || '—' }}</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@@ -207,7 +207,7 @@ onMounted(async () => {
|
||||
v-if="chatAgentId"
|
||||
type="button"
|
||||
class="inline-flex items-center gap-1 rounded-xl border border-brand-300 bg-brand-50 px-3 py-1.5 text-sm font-medium text-brand-700 hover:bg-brand-100"
|
||||
@click="openInChat(detail.case_no)"
|
||||
@click="openInChat(detail.task_no)"
|
||||
>
|
||||
<ExternalLink class="h-3.5 w-3.5" />
|
||||
{{ $t('workspace.shippingNotice.openChat') }}
|
||||
@@ -216,7 +216,7 @@ onMounted(async () => {
|
||||
v-if="detail.export_file_name"
|
||||
type="button"
|
||||
class="inline-flex items-center gap-1 rounded-xl border border-default px-3 py-1.5 text-sm font-medium text-secondary hover:bg-surface-soft"
|
||||
@click="downloadExport(detail.case_no)"
|
||||
@click="downloadExport(detail.task_no)"
|
||||
>
|
||||
<Download class="h-3.5 w-3.5" />
|
||||
{{ $t('workspace.shippingNotice.download') }}
|
||||
|
||||
Reference in new issue
Block a user