缴费记录对接数据、我的车位新增选择业主

This commit is contained in:
zhouyanli
2026-06-17 17:38:03 +08:00
parent c363c90f95
commit 1efa212d26
5 changed files with 510 additions and 76 deletions

View File

@@ -54,6 +54,13 @@
</view>
</view>
</view>
<view class="form-item" @click="selectItem('选择业主')">
<text class="item-label">选择业主</text>
<text class="item-placeholder"
:class="{selected: formData.owner}">{{ formData.owner || '请选择' }}</text>
<text class="item-arrow"></text>
</view>
<view class="form-item" @click="bindCarClick">
<text class="item-label">绑定车辆</text>
@@ -100,6 +107,8 @@
parkingStatus: uni.getStorageSync('parkingStatus') || '0',
bindCar: uni.getStorageSync('bindCarName'),
bindCarId: uni.getStorageSync('bindCarId'),
owner: uni.getStorageSync('ownerName'),
ownerId: uni.getStorageSync('ownerId'),
})
onShow(() => {
@@ -115,6 +124,8 @@
formData.value.parkingStatus = uni.getStorageSync('parkingStatus') || '0',
formData.value.bindCar = uni.getStorageSync('bindCarName')
formData.value.bindCarId = uni.getStorageSync('bindCarId')
formData.value.owner = uni.getStorageSync('ownerName')
formData.value.ownerId = uni.getStorageSync('ownerId')
})
onLoad((option) => {
if (uni.getStorageSync('operationType') == 'update') {
@@ -178,7 +189,8 @@
parkingId: formData.value.parkingSpaceId,
parkingStatus: formData.value.parkingStatus,
carId: formData.value.bindCarId,
residentId: uni.getStorageSync('userId')
// residentId: uni.getStorageSync('userId')
residentId: formData.value.ownerId
}).then(res => {
uni.hideLoading()
console.log(res);
@@ -241,11 +253,14 @@
formData.value.bindCarId = data.carId
uni.setStorageSync('bindCarId', data.carId)
formData.value.owner = data.ownerName
uni.setStorageSync('ownerName', data.ownerName)
formData.value.ownerId = data.ownerId
uni.setStorageSync('ownerId', data.ownerId)
} catch (err) {
uni.showToast({
title: `${err}`,
title: err.msg,
icon: 'none'
})
console.error('列表接口报错:', err)
@@ -295,6 +310,17 @@
url: '/pageSubPack/my/selectParingLot'
})
}
if (typeStr === '选择业主') {
if (!formData.value.community) {
return uni.showToast({
title: '请先选择小区',
icon: 'none'
})
}
uni.redirectTo({
url: '/pageSubPack/my/selectOwner'
})
}
}
const goBack = () => {
@@ -310,6 +336,8 @@
uni.removeStorageSync('parkingSpaceName')
uni.removeStorageSync('bindCarId')
uni.removeStorageSync('bindCarName')
uni.removeStorageSync('ownerId')
uni.removeStorageSync('ownerName')
uni.redirectTo({
url: '/pageSubPack/my/myParkingSpaceIndex'
})