feat: ai店铺订单详情按钮展示
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<view class="flex-center ju-flex-end w100">
|
||||
<view class="ai-button3 w_144 m-r-10" v-if="props.status === 10" @tap.stop="emit('delay')">
|
||||
延迟发货
|
||||
</view>
|
||||
<view class="ai-button3 w_144 m-r-10" v-if="props.status === 50" @tap.stop="emit('now')">
|
||||
立即发货
|
||||
</view>
|
||||
<view class="ai-button3 w_144" v-if="props.showView" @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>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
status: {
|
||||
type: Number,
|
||||
default: -1,
|
||||
},
|
||||
showView: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
viewText: {
|
||||
type: String,
|
||||
default: '查看订单',
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['delay', 'now', 'view', 'confirm', 'pay']);
|
||||
</script>
|
||||
@@ -60,35 +60,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-center ju-flex-end m-t-12" v-if="props.index != 5 && isAiActionOrder">
|
||||
<view
|
||||
class="ai-button3 w_144 m-r-10"
|
||||
@tap.stop="delayShipment(props.data)"
|
||||
v-if="Number(props.data.status) === 10"
|
||||
>
|
||||
延迟发货
|
||||
</view>
|
||||
<view
|
||||
class="ai-button3 w_144 m-r-10"
|
||||
@tap.stop="nowShipment(props.data)"
|
||||
v-if="Number(props.data.status) === 50"
|
||||
>
|
||||
立即发货
|
||||
</view>
|
||||
<view class="ai-button3 w_144" @tap.stop="goAiOrderInfo">查看订单</view>
|
||||
<view
|
||||
class="ai-button1 w_144 m-l-16"
|
||||
v-if="Number(props.data.status) === 20"
|
||||
@tap.stop="confirmReceiveOrder"
|
||||
>
|
||||
确认收货
|
||||
</view>
|
||||
<view
|
||||
class="ai-button1 w_144 m-l-16"
|
||||
v-if="Number(props.data.status) === 0"
|
||||
@tap.stop="goPay"
|
||||
>
|
||||
去支付
|
||||
</view>
|
||||
<AiOrderActionBar
|
||||
:status="Number(props.data.status)"
|
||||
:showView="true"
|
||||
@delay="onDelayShipment"
|
||||
@now="onNowShipment"
|
||||
@view="goAiOrderInfo"
|
||||
@confirm="confirmReceiveOrder"
|
||||
@pay="goPay"
|
||||
/>
|
||||
</view>
|
||||
<view class="" style="margin-top: 32rpx" v-else-if="props.index != 5">
|
||||
<card_orderBan :data="props.data" @downData="downData"></card_orderBan>
|
||||
@@ -109,6 +89,7 @@
|
||||
} from '@/sheep/hooks/useGoods';
|
||||
import card_order from './card_order.vue';
|
||||
import card_orderBan from '@/components/card_orderBan/card_orderBan.vue';
|
||||
import AiOrderActionBar from '@/components/orderItem/AiOrderActionBar.vue';
|
||||
import AfterSaleApi from '@/sheep/api/trade/afterSale';
|
||||
import {
|
||||
aiDelayedShipment,
|
||||
@@ -164,6 +145,14 @@
|
||||
return data?.id || data?.orderId;
|
||||
};
|
||||
|
||||
const onDelayShipment = () => {
|
||||
delayShipment(props.data);
|
||||
};
|
||||
|
||||
const onNowShipment = () => {
|
||||
nowShipment(props.data);
|
||||
};
|
||||
|
||||
function delayShipment(data) {
|
||||
const id = resolveAiOrderId(data);
|
||||
if (!id) {
|
||||
|
||||
Reference in New Issue
Block a user