feat(shipping-notice): 新增发货批次和任务管理功能,支持批次创建与任务处理
This commit is contained in:
1 parent
457f0f4e5e
commit
634dee4b81
81 files changed
+9088
-3625
No files matched your search
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* features/chat/components/ShippingWorkflowStepper.vue
|
||||
* 货代发货七步流程 Stepper。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { ShippingWorkflowStepItem } from '../shipping';
|
||||
|
||||
defineProps<{
|
||||
steps: ShippingWorkflowStepItem[];
|
||||
compact?: boolean;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const stepClass = (status: ShippingWorkflowStepItem['status']) => {
|
||||
if (status === 'completed') return 'border-emerald-200 bg-emerald-50 text-emerald-700';
|
||||
if (status === 'current') return 'border-brand-300 bg-brand-50 text-brand-700';
|
||||
if (status === 'blocked') return 'border-rose-200 bg-rose-50 text-rose-700';
|
||||
return 'border-default bg-surface text-muted';
|
||||
};
|
||||
|
||||
const dotClass = (status: ShippingWorkflowStepItem['status']) => {
|
||||
if (status === 'completed') return 'bg-emerald-500';
|
||||
if (status === 'current') return 'bg-brand-500';
|
||||
if (status === 'blocked') return 'bg-rose-500';
|
||||
return 'bg-slate-300';
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="space-y-2">
|
||||
<div class="text-[11px] font-semibold uppercase tracking-[0.18em] text-muted">{{ t('chat.shippingNoticeUi.stepperTitle') }}</div>
|
||||
<div class="grid gap-2" :class="compact ? 'sm:grid-cols-4 xl:grid-cols-7' : 'md:grid-cols-4 xl:grid-cols-7'">
|
||||
<div
|
||||
v-for="(step, index) in steps"
|
||||
:key="step.id"
|
||||
class="rounded-2xl border px-3 py-2.5 transition"
|
||||
:class="stepClass(step.status)"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="inline-flex h-5 min-w-5 items-center justify-center rounded-full text-[11px] font-semibold text-white" :class="dotClass(step.status)">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
<span class="text-xs font-semibold">{{ t(step.label) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user