This commit is contained in:
dzc committed 2026-09-10 18:51:01 +08:00
1 parent f16c1e6eb7
commit 75a36d36ad
1 file changed
+13 -4
@@ -8,7 +8,8 @@
<div class="mb-2 flex flex-wrap items-center gap-2">
<span class="text-sm font-medium text-[var(--el-text-color-secondary)]">订单售后详情</span>
<dict-tag :options="hard_order_type" :value="globalData.detail.orderType" />
<dict-tag :options="hard_order_status" :value="globalData.detail.orderStatus" />
<el-tag v-if="isOfflinePaidCompleted" type="success" :disable-transitions="true">已完成</el-tag>
<dict-tag v-else :options="hard_order_status" :value="globalData.detail.orderStatus" />
<dict-tag :options="hard_pay_type" :value="globalData.detail.payType" />
</div>
<div class="flex flex-wrap items-baseline gap-x-3 gap-y-1">
@@ -839,6 +840,8 @@ const HARD_DOOR_FREE_PAY_TYPE = "9"
const DOOR_ORDER_PENDING_SETTLE_STATUS = "1"
/** 消费机支付订单类型编码,后端允许该类型没有购物车明细。 */
const SIMPLE_PAYMENT_ORDER_TYPE = "9"
/** 线下购买订单类型编码,终端支付完成即履约完成,没有后续核销或配送流程。 */
const OFFLINE_ORDER_TYPE = "1"
/** 商城订单类型编码,使用发货、收货履约状态。 */
const MARKETPLACE_ORDER_TYPE = "7"
/** 外卖订单类型编码,使用接单、配送履约状态。 */
@@ -1230,6 +1233,10 @@ const { getDataList, tableStyle } = useTable(state)
const orderTypeCode = computed(() => String(globalData.detail.orderType || ""))
/** 当前订单状态协议编码。 */
const orderStatusCode = computed(() => String(globalData.detail.orderStatus || ""))
/** 线下订单支付即完成:该类型没有核销流程,状态停在已支付(5/6)即代表订单已完成。 */
const isOfflinePaidCompleted = computed(
() => orderTypeCode.value === OFFLINE_ORDER_TYPE && ["5", "6"].includes(orderStatusCode.value),
)
/** 是否为商城订单。 */
const isMarketplaceOrder = computed(() => orderTypeCode.value === MARKETPLACE_ORDER_TYPE)
/** 是否为外卖订单。 */
@@ -1749,13 +1756,15 @@ const lifecycleStages = computed<LifecycleStage[]>(() => {
}
if (type !== SIMPLE_PAYMENT_ORDER_TYPE) {
// 线下订单支付即完成,完成时间回退到支付时间。
const offlineCompleted = isOfflinePaidCompleted.value
stages.push(
createLifecycleStage(
"completed",
"订单完成",
detail.verificationTime || detail.deliveredTime,
Boolean(detail.verificationTime || detail.deliveredTime) || status === "20",
["5", "6"].includes(status),
detail.verificationTime || detail.deliveredTime || (offlineCompleted ? detail.payTime : undefined),
Boolean(detail.verificationTime || detail.deliveredTime) || status === "20" || offlineCompleted,
!offlineCompleted && ["5", "6"].includes(status),
"等待履约完成",
),
)