feat(checkout): 修复后置损耗结算全额归号主、支持角色隔离实时试算与全流程UI重构

- fix(pricing): 后置消耗/损耗金额 100% 划归号主收益,超出预收部分平台不抽成,避免被平台费吸收
- feat(checkout): 前端新增结账实时试算预览组件 (CheckoutTrialPreview + useCheckoutSimulator),角色隔离展示(仅见自身收入/退款,屏蔽平台服务费)
- refactor(admin): 重构交易全流程时间线 (ProcessTimeline.vue),将平铺挤压指标重构成4大分类仪表盘微型卡片矩阵,升级可视化业务状态流转徽章与阶段色彩主题
- style(admin): 优化支付与交接流水元信息网格布局,防止超宽屏下长单行拉伸
This commit is contained in:
yml2213
2026-09-13 10:19:33 +08:00
parent 7734f315ce
commit dff0577385
10 changed files with 1426 additions and 153 deletions
@@ -5,6 +5,8 @@ import { showDialog, showToast } from 'vant'
import MobilePaymentCashierPopup from '@/features/orders/components/MobilePaymentCashierPopup.vue'
import MobilePayWaySelectPopup from '@/features/orders/components/MobilePayWaySelectPopup.vue'
import CheckoutTrialPreview from '@/features/orders/components/CheckoutTrialPreview.vue'
import { useCheckoutSimulator } from '@/features/orders/composables/useCheckoutSimulator'
import { useOrderActions, CONFIRMABLE_ACTIONS } from '@/features/orders/composables/useOrderActions'
import { useMobilePaymentCashier } from '@/features/orders/composables/useMobilePaymentCashier'
import { useMobilePayWaySelect } from '@/features/orders/composables/useMobilePayWaySelect'
@@ -129,6 +131,13 @@ const showCheckoutCounterAction = computed(
(isRenter.value && order.value.status === 'pending_checkout_accept'))
)
const checkoutSimulation = useCheckoutSimulator({
order,
isOwner,
isRenter,
form: counterForm,
})
// 状态颜色映射(vant 标签主题)。
function getStatusTagType(status: string) {
if (['completed', 'received'].includes(status)) return 'success'
@@ -505,7 +514,7 @@ async function copyListingCode() {
}}。可填实际哈夫币消耗(允许超过发布量),打超按比例从押金扣。提案将交给对方确认。
</p>
<van-cell-group :border="false">
<van-field label="额外消耗品已用">
<van-field label="物资/损耗金额">
<template #input>
<input
v-model.number="counterForm.consumableAmountYuan"
@@ -533,6 +542,9 @@ async function copyListingCode() {
</template>
</van-field>
</van-cell-group>
<!-- 实时结算试算预览(仅展示当前角色自身收支,完全屏蔽平台服务费) -->
<CheckoutTrialPreview :simulation="checkoutSimulation" variant="mobile" />
<van-field
v-model="counterForm.reason"
rows="2"