feat: 重构核心租住流程页面与交互体验
统一注册、看房、申请与入住等核心页面的视觉和流程衔接,补齐支付、签约与状态流转闭环,提升移动端操作连贯性。
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
const RESERVATION_FLOW_STEP = {
|
||||
INSPECTION: 10,
|
||||
BILL: 20,
|
||||
CONTRACT: 30,
|
||||
CHECKIN: 40
|
||||
APPLICATION: 1,
|
||||
INSPECTION: 2,
|
||||
BILL: 3,
|
||||
CONTRACT: 4,
|
||||
CHECKIN: 5
|
||||
}
|
||||
|
||||
function getLanguage(language) {
|
||||
@@ -92,6 +93,23 @@ export function getReservationCurrentNode(flow = {}) {
|
||||
return nodes.find(item => item.isCurrent) || nodes[nodes.length - 1]
|
||||
}
|
||||
|
||||
export function hasEffectiveReservationFlow(flow = {}) {
|
||||
const currentNode = getReservationCurrentNode(flow)
|
||||
if (!currentNode) {
|
||||
return false
|
||||
}
|
||||
|
||||
const step = Number(currentNode.step || 0)
|
||||
const refNo = String(currentNode.refNo || '').trim()
|
||||
|
||||
// 当前步骤为申请单(1)且没有 refNo 时,视为尚未提交预约单
|
||||
if (step === 1 && !refNo) {
|
||||
return false
|
||||
}
|
||||
|
||||
return step > 0
|
||||
}
|
||||
|
||||
export function buildReservationFlowMap(flowList = []) {
|
||||
return normalizeArray(flowList)
|
||||
.filter(item => item && typeof item === 'object')
|
||||
|
||||
Reference in New Issue
Block a user