feat: 优化首页服务入口与租住业务流程

补齐首页待办跳转、押金支付引导和多类租住服务页面能力,统一租客端关键业务流程体验。
This commit is contained in:
liangjian
2026-08-25 13:53:12 +08:00
parent 1111ac148b
commit 9fee2c3a74
41 changed files with 6985 additions and 933 deletions

View File

@@ -71,7 +71,7 @@
<view class="item-order">{{ String(index + 1).padStart(2, '0') }}</view>
<view class="item-title-col">
<view class="item-title-row">
<text class="item-name">{{ item.deviceName || $tr('未命名设备') }}</text>
<text class="item-name">{{ getInspectionItemDisplayName(item) || $tr('未命名设备') }}</text>
<text v-if="item.isRequiredSnapshot" class="item-required">{{ $tr('必查') }}</text>
</view>
</view>
@@ -393,6 +393,7 @@ export default {
.map(item => ({
itemId: item.id,
deviceName: item.deviceName || '',
assetNameEn: item.assetNameEn || item.deviceNameEn || '',
brandSnapshot: item.brandSnapshot || '',
isRequiredSnapshot: !!item.isRequiredSnapshot,
expectedQuantityText: item.expectedQuantity === null || item.expectedQuantity === undefined ? '--' : String(item.expectedQuantity),
@@ -415,6 +416,12 @@ export default {
items
}
},
getInspectionItemDisplayName(item = {}) {
if (this.language === 'en') {
return item.assetNameEn || item.deviceName || ''
}
return item.deviceName || item.assetNameEn || ''
},
async loadPage(force = false) {
this.loading = true
try {
@@ -492,14 +499,23 @@ export default {
if (!result) {
return 'pending'
}
const label = this.getInspectionItemResultLabel(result, '')
if (/未检|待检|未查/i.test(label)) {
const matchedOption = (Array.isArray(this.inspectionResultOptions) ? this.inspectionResultOptions : []).find((option) => {
return String(option && option.key) === result
}) || null
const candidateText = [
this.getInspectionItemResultLabel(result, ''),
matchedOption && matchedOption.value,
matchedOption && matchedOption.label,
result
].filter(value => value !== undefined && value !== null).join(' ')
if (/未检|待检|未查|unchecked|notchecked|pending|not checked|not inspected/i.test(candidateText)) {
return 'pending'
}
if (/问题|异常|损坏|缺失|故障/i.test(label)) {
if (/问题|异常|损坏|缺失|故障|problem|issue|abnormal|damage|damaged|missing|fault|broken|unusable/i.test(candidateText)) {
return 'abnormal'
}
if (/正常|可用|完好/i.test(label)) {
if (/正常|可用|完好|normal|available|good|intact|ok/i.test(candidateText)) {
return 'normal'
}
return 'done'
@@ -944,6 +960,7 @@ export default {
z-index: 1;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18rpx;
padding: 22rpx 24rpx;
}
@@ -1004,8 +1021,9 @@ export default {
}
.item-header__right {
margin-left: auto;
flex-shrink: 0;
max-width: 56%;
max-width: none;
}
.item-body {
@@ -1099,6 +1117,7 @@ export default {
margin-top: 0;
justify-content: flex-end;
gap: 10rpx;
flex-wrap: nowrap;
}
.radio-btn {
@@ -1116,10 +1135,11 @@ export default {
.radio-btn--compact {
min-width: auto;
padding: 12rpx 18rpx;
padding: 12rpx 16rpx;
border-radius: 999rpx;
font-size: 22rpx;
line-height: 1.2;
white-space: nowrap;
}
.radio-btn--active {