feat: 自提状态下不展示延时发货

This commit is contained in:
2026-07-23 10:59:54 +08:00
parent 8e8a76971e
commit 7705af52af
4 changed files with 53 additions and 6 deletions
+15 -1
View File
@@ -69,6 +69,7 @@
<view class="flex-center ju-flex-end m-t-12" v-if="props.index != 5 && isAiActionOrder">
<AiOrderActionBar
:status="currentStatus"
:disableDelayShipment="isPickUpOrder"
:showView="true"
@delay="onDelayShipment"
@now="onNowShipment"
@@ -87,6 +88,7 @@
getCurrentInstance,
defineProps,
defineEmits,
computed,
ref,
watch,
} from 'vue';
@@ -157,6 +159,15 @@
const isAiActionOrder =
String(props.data?.__source) === 'aishop' || Number(props.data?.type) === 5;
const isPickUpOrder = computed(() => {
if (Number(props.data?.deliveryType) === 2) return true;
return Boolean(
props.data?.pickUpStoreId ||
props.data?.pickUpStore ||
props.data?.pickUpStoreVO ||
props.data?.pickUpVerifyCode,
);
});
const currentStatus = ref(Number(props.data?.status));
watch(
() => props.data?.status,
@@ -165,7 +176,8 @@
},
{ immediate: true },
);
const isDelayedShipmentOrder = () => currentStatus.value === 50;
const isDelayedShipmentOrder = () =>
currentStatus.value === 50 && !isPickUpOrder.value;
const resolveAiOrderId = (data) => {
return data?.id || data?.orderId;
@@ -180,6 +192,7 @@
};
function delayShipment(data) {
if (isPickUpOrder.value) return;
const id = resolveAiOrderId(data);
if (!id) {
uni.showToast({
@@ -207,6 +220,7 @@
}
function nowShipment(data) {
if (isPickUpOrder.value) return;
const id = resolveAiOrderId(data);
if (!id) {
uni.showToast({