mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 19:49:28 +08:00
refactor(order-import): 简化向导操作按钮布局,移除冗余显示
This commit is contained in:
+1
-47
@@ -142,16 +142,6 @@ function getValidOrderStatusIdSet(): Set<number> {
|
|||||||
return new Set(orderStatusList.value.map((s) => s.id));
|
return new Set(orderStatusList.value.map((s) => s.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 模板里记录的原始映射:仅展示仍存在的系统状态名,已删除的视为无映射 */
|
|
||||||
function getTemplateOriginalMappedLabel(csvStatus: string): string {
|
|
||||||
const tplId = currentStatusTemplateMappings.value.find(
|
|
||||||
(m) => m.csvStatus === csvStatus,
|
|
||||||
)?.mappedStatusId;
|
|
||||||
if (tplId === undefined || tplId === null) return '(未映射)';
|
|
||||||
const name = orderStatusList.value.find((s) => s.id === tplId)?.statusName;
|
|
||||||
return name ?? '-';
|
|
||||||
}
|
|
||||||
|
|
||||||
function mergeObsoleteSystemTargetRemind(csvList: string[]) {
|
function mergeObsoleteSystemTargetRemind(csvList: string[]) {
|
||||||
const allowed = new Set(uniqueStatusValues.value);
|
const allowed = new Set(uniqueStatusValues.value);
|
||||||
const set = new Set(csvStatusesObsoleteSystemTarget.value);
|
const set = new Set(csvStatusesObsoleteSystemTarget.value);
|
||||||
@@ -1196,11 +1186,6 @@ const handlePrev = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 取消:回到第一步(不清空已选店铺与映射,与原先关闭弹窗行为一致)
|
|
||||||
const handleCancel = () => {
|
|
||||||
currentStep.value = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 创建导入任务
|
// 创建导入任务
|
||||||
const handleCreateTask = async () => {
|
const handleCreateTask = async () => {
|
||||||
if (!selectedFile.value) {
|
if (!selectedFile.value) {
|
||||||
@@ -1536,22 +1521,6 @@ const shopOptions = computed(() => {
|
|||||||
已变更
|
已变更
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
v-if="
|
|
||||||
selectedTemplateId &&
|
|
||||||
currentTemplateMappings.some(
|
|
||||||
(m) => m.fieldName === fieldDef.fieldName,
|
|
||||||
)
|
|
||||||
"
|
|
||||||
class="mt-1.5 text-xs text-slate-500 dark:text-slate-400"
|
|
||||||
>
|
|
||||||
模板原文件列:
|
|
||||||
{{
|
|
||||||
currentTemplateMappings.find(
|
|
||||||
(m) => m.fieldName === fieldDef.fieldName,
|
|
||||||
)?.fileFieldName || '(未映射)'
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 文件侧:CSV 表头 -->
|
<!-- 文件侧:CSV 表头 -->
|
||||||
<div
|
<div
|
||||||
@@ -1724,18 +1693,6 @@ const shopOptions = computed(() => {
|
|||||||
原系统状态已删除
|
原系统状态已删除
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
v-if="
|
|
||||||
selectedStatusTemplateId &&
|
|
||||||
currentStatusTemplateMappings.some(
|
|
||||||
(m) => m.csvStatus === statusValue,
|
|
||||||
)
|
|
||||||
"
|
|
||||||
class="mb-2 text-xs text-slate-500 dark:text-slate-400"
|
|
||||||
>
|
|
||||||
模板原系统状态:
|
|
||||||
{{ getTemplateOriginalMappedLabel(statusValue) }}
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
class="flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:gap-2"
|
class="flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:gap-2"
|
||||||
>
|
>
|
||||||
@@ -1912,10 +1869,8 @@ const shopOptions = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex shrink-0 justify-between gap-2 border-t border-slate-100 bg-slate-50/80 px-3 py-3 dark:border-[hsl(240deg_3.7%_22%)] dark:bg-[hsl(240deg_3.7%_15.9%/40%)]"
|
class="flex shrink-0 flex-wrap justify-end gap-2 border-t border-slate-100 bg-slate-50/80 px-3 py-3 dark:border-[hsl(240deg_3.7%_22%)] dark:bg-[hsl(240deg_3.7%_15.9%/40%)]"
|
||||||
>
|
>
|
||||||
<Button @click="handleCancel">取消</Button>
|
|
||||||
<div class="flex flex-wrap justify-end gap-2">
|
|
||||||
<Button v-if="currentStep > 0" @click="handlePrev">上一步</Button>
|
<Button v-if="currentStep > 0" @click="handlePrev">上一步</Button>
|
||||||
<Button
|
<Button
|
||||||
v-if="currentStep < 2"
|
v-if="currentStep < 2"
|
||||||
@@ -1935,7 +1890,6 @@ const shopOptions = computed(() => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 保存模板模态框 -->
|
<!-- 保存模板模态框 -->
|
||||||
<SaveTemplateModal :confirm-loading="savingTemplate">
|
<SaveTemplateModal :confirm-loading="savingTemplate">
|
||||||
|
|||||||
Reference in New Issue
Block a user