feat: 查看物流展示

This commit is contained in:
2026-08-06 15:39:41 +08:00
parent 497babbc3d
commit b8bcd46f1d
5 changed files with 124 additions and 8 deletions
+37 -4
View File
@@ -2,18 +2,25 @@
<view class="flex-center ju-flex-end w100">
<view
class="ai-button3 w_144 m-r-10"
v-if="props.status === 10 && !props.disableDelayShipment"
v-if="(props.status === 10 || props.status === 15) && !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="(props.status === 50 || props.status === 15 || props.hasDelayedItems) && !props.disableDelayShipment"
@tap.stop="emit('now')"
>
立即发货
</view>
<view
class="ai-button3 w_144 m-r-10"
v-if="hasExpress"
@tap.stop="emit('express')"
>
查看物流
</view>
<view
class="ai-button3 w_144"
v-if="props.showView && props.status !== 70"
@@ -21,7 +28,7 @@
>
{{ props.viewText }}
</view>
<view class="ai-button1 w_144 m-l-16" v-if="props.status === 20" @tap.stop="emit('confirm')">
<view class="ai-button1 w_144 m-l-16" v-if="props.status === 20 || props.status === 15" @tap.stop="emit('confirm')">
确认收货
</view>
<view class="ai-button1 w_144 m-l-16" v-if="props.status === 0" @tap.stop="emit('pay')">
@@ -37,6 +44,7 @@
</template>
<script setup>
import { computed } from 'vue';
const props = defineProps({
status: {
type: Number,
@@ -58,7 +66,32 @@
type: Boolean,
default: false,
},
logisticsId: {
type: [Number, String],
default: 0,
},
logisticsNo: {
type: String,
default: '',
},
deliveryTime: {
type: [Number, String],
default: '',
},
hasLogistics: {
type: Boolean,
default: false,
},
});
const emit = defineEmits(['delay', 'now', 'view', 'confirm', 'pay', 'cancel']);
const hasExpress = computed(() => {
if ([15, 20, 30].includes(props.status)) return true;
if (props.hasLogistics) return true;
if (Number(props.logisticsId) > 0) return true;
if (props.logisticsNo && String(props.logisticsNo).trim()) return true;
if (props.deliveryTime) return true;
return false;
});
const emit = defineEmits(['delay', 'now', 'view', 'confirm', 'pay', 'cancel', 'express']);
</script>