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
+14 -2
View File
@@ -1,9 +1,17 @@
<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
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" @tap.stop="emit('now')">
<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" @tap.stop="emit('view')">
@@ -24,6 +32,10 @@
type: Number,
default: -1,
},
disableDelayShipment: {
type: Boolean,
default: false,
},
showView: {
type: Boolean,
default: false,
+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({
+2 -2
View File
@@ -2,8 +2,8 @@
"name" : "优购商城",
"appid" : "__UNI__8B19741",
"description" : "",
"versionName" : "1.5.8",
"versionCode" : 158,
"versionName" : "1.6.0",
"versionCode" : 160,
"transformPx" : false,
"app-plus" : {
"privacy" : {
+22 -1
View File
@@ -93,11 +93,12 @@
</view>
</view>
</view>
<su-fixed bottom placeholder bg="bg24">
<su-fixed bottom placeholder bg="bg24" v-if="showBottomBar">
<view class="orderBan flex-column ju-center">
<AiOrderActionBar
v-if="isAiActionOrder"
:status="Number(state.orderInfo.status)"
:disableDelayShipment="isPickUpOrder"
@delay="delayShipment"
@now="nowShipment"
@confirm="confirmReceiveOrder"
@@ -162,6 +163,24 @@
);
});
const isPickUpOrder = computed(() => {
if (Number(state.orderInfo?.deliveryType) === 2) return true;
return Boolean(
state.orderInfo?.pickUpStoreId ||
state.orderInfo?.pickUpStore ||
state.orderInfo?.pickUpStoreVO ||
state.orderInfo?.pickUpVerifyCode,
);
});
const showBottomBar = computed(() => {
if (!isAiActionOrder.value) return true;
const status = Number(state.orderInfo?.status);
if ([0, 20].includes(status)) return true;
if (isPickUpOrder.value) return false;
return [10, 50].includes(status);
});
const resolvePickUpStoreId = (data = {}) => {
return Number(
data?.pickUpStoreId ||
@@ -181,6 +200,7 @@
};
function delayShipment() {
if (isPickUpOrder.value) return;
const id = resolveAiOrderId(state.orderInfo);
if (!id) {
uni.showToast({
@@ -207,6 +227,7 @@
}
function nowShipment() {
if (isPickUpOrder.value) return;
const id = resolveAiOrderId(state.orderInfo);
if (!id) {
uni.showToast({