feat: 删除商品标题旁边延迟tag

This commit is contained in:
2026-08-07 15:38:42 +08:00
parent 5c71cba575
commit 50b8039ad6
3 changed files with 29 additions and 9 deletions
+9 -4
View File
@@ -93,16 +93,21 @@
});
const showDelay = computed(() => {
if (![10, 15, 50].includes(Number(props.status))) return false;
if (Number(props.status) === 10 || Number(props.status) === 15) return true;
// 待收货(status=50)不展示延迟发货按钮——货已经发出,不需要延迟/立即发货操作
const s = Number(props.status);
if (s === 50) return false;
if (![10, 15].includes(s)) return false;
if (s === 10 || s === 15) return true;
return Boolean(props.canDelayItems);
});
const showNow = computed(() => {
if (![10, 15, 50].includes(Number(props.status))) return false;
// 待收货(status=50)不展示立即发货按钮
const s = Number(props.status);
if (s === 50) return false;
if (![10, 15].includes(s)) return false;
// 只有存在延迟中(status===1)的商品时才展示立即发货按钮
if (!Boolean(props.hasDelayedItems)) return false;
if (Number(props.status) === 50) return true;
return Boolean(props.canShipItems);
});
+7 -3
View File
@@ -24,9 +24,6 @@
:class="{ 'p-r-10': props.type == 3, c0: props.theme == 2 }"
>
{{ v.spuName }}
<text v-if="!isCompletedOrder && getSpuDelayInfo(v).delayed" class="delay-tag delay-tag--spu">
已延迟 {{ getSpuDelayInfo(v).text }}
</text>
</view>
<view class="shrink price" v-if="props.type != 4 && !showMultiSku(v)">
<span class="size24">¥</span>
@@ -218,6 +215,13 @@
});
const isCompletedOrder = computed(() => orderStatusText.value === '已完成');
// 待收货状态(status=50):不再展示任何"已延迟 N 件"tab / 状态 + 数量的 SKU 延迟明细,
// 因为货已经发出,延迟发货的相关状态对用户无意义。
const isReceivingOrder = computed(() => {
const s = Number(props.data?.status);
return s === 50;
});
const hasDelayRecords = computed(() => {
if (isCompletedOrder.value) return false;
if (!isAiStoreOrder.value) return false;
+13 -2
View File
@@ -244,8 +244,19 @@
},
{ immediate: true },
);
const isDelayedShipmentOrder = () =>
currentStatus.value === 50 && !isPickUpOrder.value;
// 顶部提示条「延迟发货中...」仅在待付款/待发货/处理中这些发货流程前的状态展示,
// 待收货(status=50)已经发货完成,不应该再展示这条提醒。
const isDelayedShipmentOrder = () => {
const s = Number(currentStatus.value);
if (s === 50) return false; // 待收货:不再展示延迟发货提示
if (isPickUpOrder.value) return false;
// 其余状态(待付款/待发货/处理中)下,只要有延迟中(status===1)的商品就展示
return Boolean(
getCurrentDelayRecords().some(
(record) => Number(record?.status) === 1,
),
);
};
const hasDelayedItems = computed(() => {
if (!isAiStoreOrder.value) return false;