feat(quality-owner): 增加优质号主、极品专区与无忧租号保险
- 支持保证金余额支付、在线支付开通及后台手动设置审计 - 新增极品专区发布权限、赔付方案与保险结算费率快照 - 优化首页、商品卡和个人中心的优质号主身份展示
This commit is contained in:
@@ -50,6 +50,10 @@ export interface Order {
|
||||
account_snapshot?: Record<string, unknown>
|
||||
account_source?: 'internal' | 'external' | string
|
||||
source_channel?: string
|
||||
is_premium?: boolean
|
||||
compensation_plan?: 'normal' | 'insurance' | string
|
||||
insurance_fee_bps?: number
|
||||
insurance_fee_cent?: number
|
||||
listing_snapshot?: string
|
||||
checkout_info?: string
|
||||
counter_info?: string
|
||||
@@ -174,6 +178,8 @@ export interface Checkout {
|
||||
rent_amount_cent?: number
|
||||
owner_rent_amount_cent?: number
|
||||
platform_fee_cent?: number
|
||||
insurance_fee_bps?: number
|
||||
insurance_fee_cent?: number
|
||||
deposit_amount_cent: number
|
||||
pure_coin_amount_cent: number
|
||||
pure_coin_discount_cent: number
|
||||
@@ -234,12 +240,14 @@ export interface PaymentOrder {
|
||||
payment_no: string
|
||||
order_id: number
|
||||
order_no: string
|
||||
biz_id?: number
|
||||
provider: string
|
||||
third_order_id: string
|
||||
provider_order_id: string
|
||||
pay_way: string
|
||||
jspay_flag: string
|
||||
amount_cent: number
|
||||
biz_type?: string
|
||||
status: string
|
||||
td_code?: string
|
||||
jspay_url?: string
|
||||
|
||||
@@ -91,6 +91,13 @@ const checkoutContent = computed(() => splitCheckoutContent(props.order.checkout
|
||||
:value="`¥${money(amountYuan(checkout.renter_refund_amount_cent))}`"
|
||||
value-class="green-text"
|
||||
/>
|
||||
<van-cell
|
||||
v-if="props.isOwner && Number(checkout.insurance_fee_cent || 0) > 0"
|
||||
title="无忧租号保险服务费"
|
||||
:label="`费率 ${(Number(checkout.insurance_fee_bps || 0) / 100).toFixed(1)}%`"
|
||||
:value="`-¥${money(amountYuan(checkout.insurance_fee_cent))}`"
|
||||
value-class="red-text"
|
||||
/>
|
||||
<van-cell
|
||||
v-if="props.isOwner"
|
||||
title="号主最终收入"
|
||||
@@ -186,6 +193,15 @@ const checkoutContent = computed(() => splitCheckoutContent(props.order.checkout
|
||||
<span>退还租客(未使用租金 + 剩余押金)</span>
|
||||
<strong class="amount">¥{{ money(amountYuan(checkout.renter_refund_amount_cent)) }}</strong>
|
||||
</div>
|
||||
<div
|
||||
v-if="props.isOwner && Number(checkout.insurance_fee_cent || 0) > 0"
|
||||
class="summary-row highlight"
|
||||
>
|
||||
<span>
|
||||
无忧租号保险服务费({{ (Number(checkout.insurance_fee_bps || 0) / 100).toFixed(1) }}%)
|
||||
</span>
|
||||
<strong class="warning">-¥{{ money(amountYuan(checkout.insurance_fee_cent)) }}</strong>
|
||||
</div>
|
||||
<div v-if="props.isOwner" class="summary-row highlight">
|
||||
<span>号主最终收入(租金 + 押金赔付)</span>
|
||||
<strong class="amount">¥{{ money(amountYuan(checkout.owner_income_amount_cent)) }}</strong>
|
||||
|
||||
@@ -7,6 +7,7 @@ export interface OwnerSimulation {
|
||||
role: 'owner'
|
||||
totalIncomeYuan: number
|
||||
rentIncomeYuan: number
|
||||
insuranceFeeYuan: number
|
||||
damageCompensationYuan: number
|
||||
lossCompensationYuan: number
|
||||
shortfallYuan: number
|
||||
@@ -99,7 +100,14 @@ export function useCheckoutSimulator(options: {
|
||||
ownerConsumableYuan = consumableYuan
|
||||
}
|
||||
|
||||
const ownerRentIncomeYuan = roundMoney(ownerCoinYuan + ownerConsumableYuan)
|
||||
const grossOwnerRentIncomeYuan = roundMoney(ownerCoinYuan + ownerConsumableYuan)
|
||||
const insuranceFeeYuan = roundMoney(
|
||||
(grossOwnerRentIncomeYuan * Number(o.insurance_fee_bps || 0)) / 10000
|
||||
)
|
||||
const ownerRentIncomeYuan = Math.max(
|
||||
roundMoney(grossOwnerRentIncomeYuan - insuranceFeeYuan),
|
||||
0
|
||||
)
|
||||
|
||||
// 押金赔付覆盖与差额
|
||||
const damageCoveredYuan = Math.min(depositDeductYuan, depositYuan)
|
||||
@@ -110,6 +118,7 @@ export function useCheckoutSimulator(options: {
|
||||
role: 'owner',
|
||||
totalIncomeYuan,
|
||||
rentIncomeYuan: ownerRentIncomeYuan,
|
||||
insuranceFeeYuan,
|
||||
damageCompensationYuan: damageCoveredYuan,
|
||||
lossCompensationYuan: ownerConsumableYuan,
|
||||
shortfallYuan,
|
||||
|
||||
Reference in New Issue
Block a user