From 0d016f8d394ace564853e8ae29e69974cd5fd324 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 08 Dec 2023 11:24:48 +0800
Subject: [PATCH] 出租房bug修复
---
subPackage/bs/views/zhsb.vue | 290 ++++++++++++++++++++++++++++++----------------------------
1 files changed, 150 insertions(+), 140 deletions(-)
diff --git a/subPackage/bs/views/zhsb.vue b/subPackage/bs/views/zhsb.vue
index dcac41c..98afd6f 100644
--- a/subPackage/bs/views/zhsb.vue
+++ b/subPackage/bs/views/zhsb.vue
@@ -2,8 +2,8 @@
<view class="container">
<view class="content-box">
<view class="info">
- <view class="item location">
- <u-icon name="map" color="#AAAAAA" size="15"></u-icon>
+ <view class="item location">
+ <u-icon name="map" color="#AAAAAA" size="15"></u-icon>
<text>当前小区:</text>
<view class="location">
{{ location }}{{ room }}{{ `(共${num}人)` }}
@@ -13,7 +13,7 @@
<view class="box-title">
- <view class="line"></view>
+ <view class="line"></view>
<view class="title">出租管理</view>
</view>
<view class="list">
@@ -27,157 +27,167 @@
<u-button @click="addRent" type="primary" :plain="true" text="添加租赁信息"></u-button>
</view>
</view> -->
-
- <footer-btn @click="addRent" text="添加租赁信息" />
-
-
+
+ <footer-btn @click="addRent" text="添加租赁信息" />
+
+
</view>
</template>
<script>
-import rentList from "@/subPackage/bs/components/list/rentList.vue"
-import {
- getHouseRentInfo
-} from "@/api/doorplateAddress/doorplateAddress";
-import {
- logAdd
-} from "../../../api/system/logManage";
-export default {
- components: {
- rentList
- },
- data() {
- return {
- houseCode: '',
- location: "",
- room: "",
- num: 0,
- //出租列表
- rentList: []
- }
- },
- onLoad(option) {
- const {
- houseCode
- } = option
- this.houseCode = houseCode
- },
- onShow() {
- this.getHouseRent()
- },
- methods: {
- async getHouseRent() {
- const res = await getHouseRentInfo(this.houseCode)
- const {
- aoiName,
- subAoi,
- buildingName,
- doorplateName,
- unitName,
- houseRentalList
- } = res.data
- this.rentList = []
- this.location = (!!aoiName ? aoiName : subAoi) + buildingName
- this.room = (!!unitName ? unitName : '') + doorplateName + "室"
- this.num = 0
- houseRentalList !== 0 && houseRentalList.forEach(item => {
- const { houseTenantVOList, dueTime, rentalTime } = item
- item.num = houseTenantVOList.length
- this.num += item.num
- if (item.num !== 0) {
- item.name = houseTenantVOList[0].name
- item.housingRentalId = houseTenantVOList[0].housingRentalId
- }
- this.rentList = houseRentalList
- })
+ import rentList from "@/subPackage/bs/components/list/rentList.vue"
+ import {
+ getHouseRentInfo
+ } from "@/api/doorplateAddress/doorplateAddress";
+ import {
+ logAdd
+ } from "../../../api/system/logManage";
+ export default {
+ components: {
+ rentList
},
- addRent() {
- this.$u.func.globalNavigator("/subPackage/bs/views/rentDetail?houseCode=" + this.houseCode)
- },
- refreshData() {
- this.getHouseRent()
+ data() {
+ return {
+ houseCode: '',
+ location: "",
+ room: "",
+ num: 0,
+ //出租列表
+ rentList: []
+ }
+ },
+ onLoad(option) {
+ const {
+ houseCode
+ } = option
+ this.houseCode = houseCode
+ },
+ onShow() {
+ this.getHouseRent()
+ },
+ methods: {
+ async getHouseRent() {
+ if (!this.houseCode) {
+ this.houseCode = uni.getStorageSync("siteInfo").houseCode
+ }
+ const res = await getHouseRentInfo(this.houseCode)
+ const {
+ aoiName,
+ subAoi,
+ buildingName,
+ doorplateName,
+ unitName,
+ houseRentalList
+ } = res.data
+ this.rentList = []
+ this.location = (!!aoiName ? aoiName : subAoi) + buildingName
+ this.room = (!!unitName ? unitName : '') + doorplateName + "室"
+ this.num = 0
+ houseRentalList !== 0 && houseRentalList.forEach(item => {
+ const {
+ householdVOList,
+ dueTime,
+ rentalTime
+ } = item
+ item.num = householdVOList.length
+ this.num += item.num
+ if (item.num !== 0) {
+ item.name = householdVOList[0].name
+ item.housingRentalId = householdVOList[0].housingRentalId
+ }
+ this.rentList = houseRentalList
+ })
+ },
+ addRent() {
+ this.$u.func.globalNavigator("/subPackage/bs/views/rentDetail?houseCode=" + this.houseCode)
+ },
+ refreshData() {
+ this.getHouseRent()
+ }
}
}
-}
</script>
-
-<style>
- page {
- background-color: #F5F5F5;
- }
-</style>
+
+<style>
+ page {
+ background-color: #F5F5F5;
+ }
+</style>
<style scoped lang="scss">
-.container {
- position: relative;
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- background: #F6F6F6;
-
- .content-box {
- height: 0;
- flex: 1;
- overflow-y: auto;
- margin: 20rpx 30rpx;
- }
-
- .list {
- // padding-bottom: 20px;
- }
-
- .item {
+ .container {
+ position: relative;
+ width: 100%;
+ height: 100%;
display: flex;
- padding: 30rpx 20rpx;
- background-color: #ffffff;
- border-bottom: 1px solid #eff1f3;
+ flex-direction: column;
+ background: #F6F6F6;
+
+ .content-box {
+ height: 0;
+ flex: 1;
+ overflow-y: auto;
+ margin: 20rpx 30rpx;
+ }
+
+ .list {
+ // padding-bottom: 20px;
+ }
+
+ .item {
+ display: flex;
+ padding: 30rpx 20rpx;
+ background-color: #ffffff;
+ border-bottom: 1px solid #eff1f3;
+ }
+
+ .location {
+ font-weight: 700;
+ font-size: 27rpx;
+
+ text {
+ color: #AAAAAA;
+ }
+ }
+
+ .room {
+ font-weight: 700;
+ }
+
+ .bottom {
+ padding: 20rpx;
+ background-color: #ffffff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: calc(100% - 40rpx);
+
+ .btn {
+ // width: calc(100% - 40rpx);
+ }
+ }
+
}
- .location {
- font-weight: 700;
- font-size: 27rpx;
- text {
- color: #AAAAAA;
+ .box-title {
+ margin: 25rpx 0;
+ display: flex;
+
+ .line {
+ width: 8rpx;
+ margin-right: 10rpx;
+ background-color: #2978FF;
+ }
+
+ .title {
+ font-weight: 700;
}
}
- .room {
- font-weight: 700;
+ view {
+ font-size: 32rpx;
}
-
- .bottom {
- padding: 20rpx;
- background-color: #ffffff;
- display: flex;
- justify-content: center;
- align-items: center;
- position: fixed;
- left: 0;
- bottom: 0;
- width: calc(100% - 40rpx);
-
- .btn {
- // width: calc(100% - 40rpx);
- }
- }
-
-}
-
-.box-title {
- margin: 25rpx 0;
- display: flex;
- .line {
- width: 8rpx;
- margin-right: 10rpx;
- background-color: #2978FF;
- }
- .title {
- font-weight: 700;
- }
-}
-
-view {
- font-size: 32rpx;
-}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3