From 67fe700e886bfc4cefece628b8a651dd973881c1 Mon Sep 17 00:00:00 2001 From: ah-max150 Date: Tue, 25 Aug 2026 22:47:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=A2=E5=8D=95=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=B5=81=E6=8A=BD=E5=B1=89=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ShopOrderPipelineDrawer.vue | 118 +++++++++++++++--- 1 file changed, 102 insertions(+), 16 deletions(-) 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 });