feat: 立即发货按钮展示
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user