feat: 自提状态下不展示延时发货
This commit is contained in:
+22
-1
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user