Files
kangyuan-mobile/components/orderItem/AiOrderActionBar.vue
T
2026-08-05 10:51:29 +08:00

61 lines
1.5 KiB
Vue

<template>
<view class="flex-center ju-flex-end w100">
<view
class="ai-button3 w_144 m-r-10"
v-if="props.status === 10 && !props.disableDelayShipment"
@tap.stop="emit('delay')"
>
延迟发货
</view>
<view
class="ai-button3 w_144 m-r-10"
v-if="props.status === 50 && !props.disableDelayShipment"
@tap.stop="emit('now')"
>
立即发货
</view>
<view
class="ai-button3 w_144"
v-if="props.showView && props.status !== 70"
@tap.stop="emit('view')"
>
{{ props.viewText }}
</view>
<view class="ai-button1 w_144 m-l-16" v-if="props.status === 20" @tap.stop="emit('confirm')">
确认收货
</view>
<view class="ai-button1 w_144 m-l-16" v-if="props.status === 0" @tap.stop="emit('pay')">
去支付
</view>
<view class="ai-button1 w_144 m-l-16" v-if="props.status === 70" @tap.stop="emit('cancel')">
取消订单
</view>
<view class="ai-button1 w_144 m-l-16" v-if="props.status === 70" @tap.stop="emit('pay')">
切换支付
</view>
</view>
</template>
<script setup>
const props = defineProps({
status: {
type: Number,
default: -1,
},
disableDelayShipment: {
type: Boolean,
default: false,
},
showView: {
type: Boolean,
default: false,
},
viewText: {
type: String,
default: '查看订单',
},
});
const emit = defineEmits(['delay', 'now', 'view', 'confirm', 'pay', 'cancel']);
</script>