支持结账多轮协商与按实际消耗双比例结算
允许双方最多 6 轮修改结账方案;哈夫币按实际消耗与 buyer/seller 比例计价,打超从押金扣,押金不足禁止自动完结并引导人工争议。同步收紧结账明细展示密度。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { showDialog, showToast } from 'vant'
|
||||
|
||||
@@ -73,6 +73,10 @@ const {
|
||||
ownerIncomeLabel,
|
||||
canOpenDispute,
|
||||
canCancelDispute,
|
||||
canCounterCheckout,
|
||||
canAcceptCheckoutProposal,
|
||||
checkoutShortfallCent,
|
||||
checkoutRoundLabel,
|
||||
isCheckoutDisputeStage,
|
||||
handleCancel,
|
||||
handlePay,
|
||||
@@ -116,6 +120,13 @@ const {
|
||||
const showDisputePopup = ref(false)
|
||||
const showCounterPopup = ref(false)
|
||||
const showRejectPopup = ref(false)
|
||||
const showCheckoutCounterAction = computed(
|
||||
() =>
|
||||
!!order.value &&
|
||||
canCounterCheckout.value &&
|
||||
((isOwner.value && order.value.status === 'pending_checkout_confirm') ||
|
||||
(isRenter.value && order.value.status === 'pending_checkout_accept'))
|
||||
)
|
||||
|
||||
// 状态颜色映射(vant 标签主题)。
|
||||
function getStatusTagType(status: string) {
|
||||
@@ -347,7 +358,11 @@ async function copyListingCode() {
|
||||
>
|
||||
<h3 class="section-title">结账处理</h3>
|
||||
<p class="action-hint">
|
||||
租客已发起结账并归还账号。确认无误后点击“确认结账”;若扣款不足,可以提出“修改结账”反向提案。
|
||||
{{ checkoutRoundLabel || '请核对消耗与扣款' }}。确认无误后同意完结;也可修改方案交对方确认(最多
|
||||
6 轮)。押金不足无法自动完结,请改方案或争议。
|
||||
</p>
|
||||
<p v-if="checkoutShortfallCent > 0" class="action-hint" style="color: #ef4444">
|
||||
押金不足差额 ¥{{ money(amountYuan(checkoutShortfallCent)) }},无法同意完结。
|
||||
</p>
|
||||
<div class="action-buttons">
|
||||
<van-button
|
||||
@@ -355,25 +370,37 @@ async function copyListingCode() {
|
||||
block
|
||||
round
|
||||
:loading="completing"
|
||||
:disabled="!canAcceptCheckoutProposal"
|
||||
loading-text="处理中..."
|
||||
@click="handleConfirmCheckout"
|
||||
>
|
||||
同意并确认结账
|
||||
</van-button>
|
||||
<van-button type="warning" block plain round @click="showCounterPopup = true">
|
||||
修改扣款金额
|
||||
<van-button
|
||||
v-if="showCheckoutCounterAction"
|
||||
type="warning"
|
||||
block
|
||||
plain
|
||||
round
|
||||
@click="showCounterPopup = true"
|
||||
>
|
||||
修改结账方案
|
||||
</van-button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Renter Action: Accept Counter Checkout Proposal / Refuse and Dispute -->
|
||||
<!-- Renter Action: Accept / Counter / Dispute -->
|
||||
<section
|
||||
v-if="isRenter && order.status === 'pending_checkout_accept'"
|
||||
class="card-section action-card"
|
||||
>
|
||||
<h3 class="section-title">号主结账修正审批</h3>
|
||||
<h3 class="section-title">结账方案确认</h3>
|
||||
<p class="action-hint">
|
||||
号主修改了您的结账申请并对押金进行了扣除。请审查,同意将完成结算,不同意将进入仲裁申诉。
|
||||
{{ checkoutRoundLabel || '对方已提出结账方案' }}。可同意完结、还价修改(最多 6
|
||||
轮),或发起争议由人工处理。
|
||||
</p>
|
||||
<p v-if="checkoutShortfallCent > 0" class="action-hint" style="color: #ef4444">
|
||||
押金不足差额 ¥{{ money(amountYuan(checkoutShortfallCent)) }},无法同意完结。
|
||||
</p>
|
||||
<div class="action-buttons">
|
||||
<van-button
|
||||
@@ -381,13 +408,24 @@ async function copyListingCode() {
|
||||
block
|
||||
round
|
||||
:loading="acceptingCheckout"
|
||||
:disabled="!canAcceptCheckoutProposal"
|
||||
loading-text="同意中..."
|
||||
@click="handleAcceptCheckout"
|
||||
>
|
||||
同意修正并结账
|
||||
同意并结账
|
||||
</van-button>
|
||||
<van-button
|
||||
v-if="showCheckoutCounterAction"
|
||||
type="warning"
|
||||
block
|
||||
plain
|
||||
round
|
||||
@click="showCounterPopup = true"
|
||||
>
|
||||
还价修改方案
|
||||
</van-button>
|
||||
<van-button type="danger" block plain round @click="showRejectPopup = true">
|
||||
拒绝修正并提起申诉
|
||||
发起结账争议
|
||||
</van-button>
|
||||
</div>
|
||||
</section>
|
||||
@@ -436,15 +474,15 @@ async function copyListingCode() {
|
||||
@refresh="refreshPaymentStatus(false)"
|
||||
/>
|
||||
|
||||
<!-- POPUP: Owner Counter Checkout Adjustments -->
|
||||
<!-- POPUP: Counter Checkout Adjustments(号主/租客) -->
|
||||
<van-popup v-model:show="showCounterPopup" position="bottom" round class="mobile-popup-form">
|
||||
<header class="popup-header">
|
||||
<h3>修改结账扣款金额</h3>
|
||||
<h3>修改结账方案</h3>
|
||||
<button class="popup-close" @click="showCounterPopup = false">✕</button>
|
||||
</header>
|
||||
<div class="popup-body">
|
||||
<p class="form-hint-info">
|
||||
在此调整实际使用的租金项目和押金赔付金额,提案将交由租客二次确认。
|
||||
{{ checkoutRoundLabel }}。可填实际哈夫币消耗(允许超过发布量),打超按比例从押金扣。提案将交给对方确认。
|
||||
</p>
|
||||
<van-cell-group :border="false">
|
||||
<van-field label="额外消耗品已用">
|
||||
@@ -456,7 +494,7 @@ async function copyListingCode() {
|
||||
/>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="消耗哈夫币 M">
|
||||
<van-field label="实际消耗哈夫币 M">
|
||||
<template #input>
|
||||
<input
|
||||
v-model.number="counterForm.coin_consumed_m"
|
||||
@@ -465,7 +503,7 @@ async function copyListingCode() {
|
||||
/>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="押金赔付扣除" required>
|
||||
<van-field label="押金赔付(损坏等)">
|
||||
<template #input>
|
||||
<input
|
||||
v-model.number="counterForm.depositDeductAmountYuan"
|
||||
@@ -481,7 +519,7 @@ async function copyListingCode() {
|
||||
autosize
|
||||
label="修改原因"
|
||||
type="textarea"
|
||||
placeholder="请说明调整扣款的原因,说服租客确认"
|
||||
placeholder="请说明调整原因(必填)"
|
||||
class="popup-field"
|
||||
/>
|
||||
<van-field
|
||||
@@ -506,7 +544,7 @@ async function copyListingCode() {
|
||||
@click="handleCounterCheckout"
|
||||
class="popup-submit"
|
||||
>
|
||||
提交提案给租客确认
|
||||
提交给对方确认
|
||||
</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
Reference in New Issue
Block a user