支持号主与租客查看自己的发布/订单详情
新增卖家商品详情页;订单详情底部增加可折叠账号快照,已完成订单展示结账明细。
This commit is contained in:
@@ -8,13 +8,9 @@ import MobilePayWaySelectPopup from '@/features/orders/components/MobilePayWaySe
|
||||
import { useOrderActions, CONFIRMABLE_ACTIONS } from '@/features/orders/composables/useOrderActions'
|
||||
import { useMobilePaymentCashier } from '@/features/orders/composables/useMobilePaymentCashier'
|
||||
import { useMobilePayWaySelect } from '@/features/orders/composables/useMobilePayWaySelect'
|
||||
import { amountYuan, money } from '@/features/orders/composables/useOrderSnapshot'
|
||||
import {
|
||||
amountYuan,
|
||||
money,
|
||||
readAssetSummary as readOrderAssetSummary,
|
||||
readSnapshot as readOrderSnapshot,
|
||||
} from '@/features/orders/composables/useOrderSnapshot'
|
||||
import {
|
||||
OrderAccountSnapshot,
|
||||
OrderCheckoutSummary,
|
||||
OrderHandoffTimeline,
|
||||
OrderResourceUsageEditor,
|
||||
@@ -116,20 +112,11 @@ const {
|
||||
onCreateDisputeSuccess: () => (showDisputePopup.value = false),
|
||||
})
|
||||
|
||||
// Mobile 独有 UI 状态:折叠面板、各类 popup 显隐。
|
||||
const activeNames = ref<string[]>([])
|
||||
// Mobile 独有 UI 状态:各类 popup 显隐。
|
||||
const showDisputePopup = ref(false)
|
||||
const showCounterPopup = ref(false)
|
||||
const showRejectPopup = ref(false)
|
||||
|
||||
// 账号快照展示(PC 不用,保留在本视图)。
|
||||
function readSnapshot() {
|
||||
return readOrderSnapshot(order.value) as Record<string, any> | null
|
||||
}
|
||||
function readAssetSummary() {
|
||||
return readOrderAssetSummary(order.value) as Record<string, any> | null
|
||||
}
|
||||
|
||||
// 状态颜色映射(vant 标签主题)。
|
||||
function getStatusTagType(status: string) {
|
||||
if (['completed', 'received'].includes(status)) return 'success'
|
||||
@@ -336,11 +323,16 @@ async function copyListingCode() {
|
||||
@submit="handleSubmitCheckout"
|
||||
/>
|
||||
|
||||
<!-- Checkout Details Display -->
|
||||
<!-- Checkout Details Display(结账中 / 已完成均可查看) -->
|
||||
<OrderCheckoutSummary
|
||||
v-if="
|
||||
order.checkout &&
|
||||
['pending_checkout_confirm', 'pending_checkout_accept'].includes(order.status)
|
||||
[
|
||||
'pending_checkout_confirm',
|
||||
'pending_checkout_accept',
|
||||
'checkout_disputing',
|
||||
'completed',
|
||||
].includes(order.status)
|
||||
"
|
||||
variant="mobile"
|
||||
:order="order"
|
||||
@@ -421,32 +413,7 @@ async function copyListingCode() {
|
||||
</van-button>
|
||||
</section>
|
||||
|
||||
<!-- Snapshot Account Details Accordion -->
|
||||
<section class="card-section">
|
||||
<van-collapse v-model="activeNames">
|
||||
<van-collapse-item title="查看订单账号快照信息" name="snapshot">
|
||||
<template v-if="readSnapshot()">
|
||||
<van-cell-group :border="false">
|
||||
<van-cell title="区服" :value="order.server_region" />
|
||||
<van-cell title="登录平台" :value="order.login_platform" />
|
||||
<van-cell title="烽火等级" :value="readAssetSummary()?.fire_level || '--'" />
|
||||
<van-cell title="绝密KD" :value="readAssetSummary()?.secret_kd || '--'" />
|
||||
<van-cell
|
||||
title="常用登录地区"
|
||||
:value="readAssetSummary()?.common_regions?.join('、') || '--'"
|
||||
/>
|
||||
<van-cell title="封禁记录" :value="readAssetSummary()?.ban_record || '无'" />
|
||||
<van-cell title="体力等级" :value="readAssetSummary()?.stamina_level || '--'" />
|
||||
<van-cell title="负重等级" :value="readAssetSummary()?.load_level || '--'" />
|
||||
<van-cell title="账号备注" :label="readSnapshot()?.description || '无'" />
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="no-snapshot-hint">暂无快照数据</div>
|
||||
</template>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</section>
|
||||
<OrderAccountSnapshot v-if="order" :order="order" variant="mobile" />
|
||||
</template>
|
||||
|
||||
<div v-else class="empty-wrap">
|
||||
|
||||
@@ -7,6 +7,7 @@ import { ChatDotRound, CopyDocument, Loading, Service } from '@element-plus/icon
|
||||
import {
|
||||
amountYuan,
|
||||
money,
|
||||
OrderAccountSnapshot,
|
||||
OrderCheckoutSummary,
|
||||
OrderHandoffTimeline,
|
||||
OrderResourceUsageEditor,
|
||||
@@ -467,7 +468,12 @@ watch([() => route.query.focus, order, loading], () => {
|
||||
v-if="
|
||||
order &&
|
||||
order.checkout &&
|
||||
['pending_checkout_confirm', 'pending_checkout_accept'].includes(order.status)
|
||||
[
|
||||
'pending_checkout_confirm',
|
||||
'pending_checkout_accept',
|
||||
'checkout_disputing',
|
||||
'completed',
|
||||
].includes(order.status)
|
||||
"
|
||||
:order="order"
|
||||
:is-owner="isOwner"
|
||||
@@ -569,6 +575,9 @@ watch([() => route.query.focus, order, loading], () => {
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 账号快照放最下方,默认折叠 -->
|
||||
<OrderAccountSnapshot v-if="order" :order="order" variant="desktop" />
|
||||
</div>
|
||||
|
||||
<!-- 右侧悬浮操作区 -->
|
||||
|
||||
Reference in New Issue
Block a user