feat: 立即发货按钮展示

This commit is contained in:
2026-08-06 15:02:09 +08:00
parent 53f0736d29
commit 497babbc3d
3 changed files with 32 additions and 1 deletions
+15
View File
@@ -105,6 +105,7 @@
v-if="isAiActionOrder"
:status="Number(state.orderInfo.status)"
:disableDelayShipment="isPickUpOrder || !isAiStoreOrder"
:hasDelayedItems="hasDelayedItems"
@delay="delayShipment"
@now="nowShipment"
@confirm="confirmReceiveOrder"
@@ -215,12 +216,26 @@
);
});
const hasDelayedItems = computed(() => {
if (!isAiStoreOrder.value) return false;
if (isPickUpOrder.value) return false;
const records = Array.isArray(state.delayRecords)
? state.delayRecords
: Array.isArray(state.orderInfo?.delayRecords)
? state.orderInfo.delayRecords
: Array.isArray(state.orderInfo?.delayRecordList)
? state.orderInfo.delayRecordList
: [];
return records.some((record) => Number(record?.status) === 1);
});
const showBottomBar = computed(() => {
if (!isAiActionOrder.value) return true;
const status = Number(state.orderInfo?.status);
if ([0, 20].includes(status)) return true;
if (!isAiStoreOrder.value) return false;
if (isPickUpOrder.value) return false;
if (hasDelayedItems.value) return true;
return [10, 50, 70].includes(status);
});