feat: 重构核心租住流程页面与交互体验

统一注册、看房、申请与入住等核心页面的视觉和流程衔接,补齐支付、签约与状态流转闭环,提升移动端操作连贯性。
This commit is contained in:
liangjian
2026-07-29 09:05:38 +08:00
parent da6bdc6a02
commit 1111ac148b
34 changed files with 8734 additions and 2801 deletions

View File

@@ -241,7 +241,7 @@ import {
getAccountBillRefundStatusLabel,
getAccountReferenceTypeLabel
} from '@/utils/enum-store.js'
import { getActiveApplicationCode, getMyApplicationList, saveActiveApplicationCode, saveMyApplicationList } from '@/utils/app-state'
import { getActiveApplicationCode, getMyApplicationList, getSessionSnapshot, saveActiveApplicationCode, saveMyApplicationList } from '@/utils/app-state'
const VIEWING_APPLICATION_PATTERN = /预约看房申请|看房时间:|意向房型:|意向区域:|viewing request|viewing time|preferred room type|preferred area/i
@@ -730,7 +730,7 @@ export default {
getCancelButtonText(item = {}) {
return this.cancelingBillNo === this.getBillNo(item)
? this.$tr('取消中...')
: this.$tr('取消订单')
: this.$tr('取消申请')
},
resolveReferenceTypeNo(item = {}) {
return item.code || item.detailCode || ''
@@ -755,6 +755,19 @@ export default {
return Promise.resolve('')
}
const session = getSessionSnapshot()
const sessionUser = session && session.currentUser ? session.currentUser : {}
const currentFlowRefNo = String(
sessionUser.currentReservationRefNo
|| (session && session.resolvedUser && session.resolvedUser.currentReservationRefNo)
|| ''
).trim()
if (currentFlowRefNo) {
this.currentReferenceTypeNo = currentFlowRefNo
saveActiveApplicationCode(currentFlowRefNo)
return Promise.resolve(this.currentReferenceTypeNo)
}
const cachedActiveCode = getActiveApplicationCode()
if (cachedActiveCode) {
this.currentReferenceTypeNo = cachedActiveCode
@@ -1011,8 +1024,8 @@ export default {
confirmCancelOrder() {
return new Promise((resolve) => {
uni.showModal({
title: this.$tr('取消订单'),
content: this.$tr('取消后将关闭当前未支付订单,是否继续?'),
title: this.$tr('取消申请'),
content: this.$tr('取消后将关闭当前申请单,是否继续?'),
confirmColor: '#ef4444',
success: (res) => resolve(!!(res && res.confirm)),
fail: () => resolve(false)
@@ -1020,18 +1033,8 @@ export default {
})
},
buildCancelOrderPayload(item = {}) {
const pendingOrder = this.getPendingPaymentOrder(item) || {}
const billNo = this.getBillNo(item)
const paymentNo = pendingOrder.paymentNo || pendingOrder.payNo || pendingOrder.payRequestNo || ''
return {
detailCode: this.currentReferenceTypeNo,
code: this.currentReferenceTypeNo,
referenceTypeNo: this.currentReferenceTypeNo,
billNo,
BillNo: billNo,
paymentNo,
payNo: paymentNo,
payRequestNo: pendingOrder.payRequestNo || ''
detailCode: this.currentReferenceTypeNo
}
},
createPaymentSession(item = {}) {
@@ -1274,7 +1277,7 @@ export default {
return userDetailCancel(this.buildCancelOrderPayload(item), this.language)
.then(() => {
uni.showToast({
title: this.$tr('订单已取消'),
title: this.$tr('申请已取消'),
icon: 'success'
})
return this.refreshBillList()
@@ -1282,7 +1285,7 @@ export default {
})
.catch((error) => {
uni.showToast({
title: (error && (error.message || error.msg)) || this.$tr('取消订单失败'),
title: (error && (error.message || error.msg)) || this.$tr('取消申请失败'),
icon: 'none'
})
})