diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/list/components/ShopOrderPipelineDrawer.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/list/components/ShopOrderPipelineDrawer.vue index fc6f0cb4..1fa707bd 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/list/components/ShopOrderPipelineDrawer.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/list/components/ShopOrderPipelineDrawer.vue @@ -24,6 +24,7 @@ import { Switch, Table, Tag, + Tooltip, message, } from 'ant-design-vue'; import dayjs from 'dayjs'; @@ -73,6 +74,10 @@ type FullTaskRow = { createTime?: string; finishTime?: string; lastError?: string; + /** 全量转换:上游同步任务 id */ + syncTaskId?: number; + /** 全量计算:上游转换任务 id */ + upstreamConvertTaskId?: number; }; const openFlag = ref(false); @@ -178,6 +183,18 @@ function statusTag(status: string) { return map[status] || { color: 'default', text: status }; } +/** 有上游任务 id → 上游创建;否则手动创建 */ +function taskOriginTag(upstreamTaskId?: null | number) { + if (upstreamTaskId != null) { + return { + color: 'blue' as const, + text: '上游创建', + tip: `上游任务 #${upstreamTaskId}`, + }; + } + return { color: 'default' as const, text: '手动创建', tip: '手动创建的任务' }; +} + function taskPercent(task: any) { if (!task?.totalDays) return 0; return Math.min(100, Math.round((task.doneDays / task.totalDays) * 100)); @@ -196,6 +213,14 @@ function asSyncTask(record: Record): PddOrderSyncVO.FullTask { return record as PddOrderSyncVO.FullTask; } +function asConvertTask(record: Record): PddOrderConvertVO.FullTask { + return record as PddOrderConvertVO.FullTask; +} + +function asCalcTask(record: Record): BiOrderStatCalcVO.FullTask { + return record as BiOrderStatCalcVO.FullTask; +} + function fullSyncEarliest() { return dayjs() .startOf('day') @@ -220,6 +245,15 @@ const taskColumns = [ { title: '操作', key: 'action', width: 100 }, ]; +/** 转换/计算表:增加创建来源(上游 vs 手动) */ +const pipelineTaskColumns = [ + { title: '状态', key: 'status', width: 72 }, + { title: '来源', key: 'origin', width: 88 }, + { title: '区间', key: 'range', ellipsis: true }, + { title: '进度', key: 'progress', width: 100 }, + { title: '时间', key: 'time', width: 110 }, +]; + async function loadStage(s: PipelineStageKey) { if (!shop.value) return; if (s === 'sync') { @@ -935,7 +969,7 @@ defineExpose({ open, close: handleClose }); @@ -1089,7 +1144,7 @@ defineExpose({ open, close: handleClose });