feat: 解决延迟发货展示问题

This commit is contained in:
2026-08-06 18:08:18 +08:00
parent 3d54e7ce31
commit 57080382be
2 changed files with 74 additions and 6 deletions
+23 -2
View File
@@ -2,14 +2,14 @@
<view class="flex-center ju-flex-end w100">
<view
class="ai-button3 w_144 m-r-10"
v-if="(props.status === 10 || props.status === 15) && !props.disableDelayShipment"
v-if="showDelay && !props.disableDelayShipment"
@tap.stop="emit('delay')"
>
延迟发货
</view>
<view
class="ai-button3 w_144 m-r-10"
v-if="(props.status === 50 || props.hasDelayedItems) && !props.disableDelayShipment"
v-if="showNow && !props.disableDelayShipment"
@tap.stop="emit('now')"
>
立即发货
@@ -66,6 +66,14 @@
type: Boolean,
default: false,
},
canDelayItems: {
type: Boolean,
default: false,
},
canShipItems: {
type: Boolean,
default: false,
},
logisticsId: {
type: [Number, String],
default: 0,
@@ -84,6 +92,19 @@
},
});
const showDelay = computed(() => {
if (![10, 15, 50].includes(Number(props.status))) return false;
if (Number(props.status) === 10 || Number(props.status) === 15) return true;
return Boolean(props.canDelayItems);
});
const showNow = computed(() => {
if (![10, 15, 50].includes(Number(props.status))) return false;
if (Number(props.status) === 50) return true;
if (Boolean(props.hasDelayedItems)) return true;
return Boolean(props.canShipItems);
});
const hasExpress = computed(() => {
if ([15, 20, 30].includes(props.status)) return true;
if (props.hasLogistics) return true;