GULIMMO
2023-11-06 9dba26f6865d5c8cd44690dda5a4806fa4a6b262
房屋上报、租户详情、房屋详情逻辑修改
3 files modified
52 ■■■■ changed files
subPackage/bs/components/list/rentList.vue 8 ●●●●● patch | view | raw | blame | history
subPackage/bs/views/rentDetail.vue 16 ●●●● patch | view | raw | blame | history
subPackage/house/roomDetails/index.vue 28 ●●●● patch | view | raw | blame | history
subPackage/bs/components/list/rentList.vue
@@ -31,9 +31,9 @@
            <u-divider text="已经到底了"></u-divider>
        </view>
        <u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" @cancel="isPickerShow = false" mode="date"
        <u-datetime-picker v-model="currentTime" v-if="isPickerShow" :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" @cancel="isPickerShow = false" mode="date"
            @confirm="dueTimeConfirm"></u-datetime-picker>
        <u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="istPickerShow = false" :show="istPickerShow" @cancel="istPickerShow = false" mode="date"
        <u-datetime-picker v-model="currentTime" v-if="istPickerShow" :closeOnClickOverlay="true" @close="istPickerShow = false" :show="istPickerShow" @cancel="istPickerShow = false" mode="date"
            @confirm="terminateTimeConfirm"></u-datetime-picker>
        <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
            @cancel="isModelShow = false" @confirm="deleteRentalConfirm"></u-modal>
@@ -72,7 +72,7 @@
                        value: 2
                    },
                ],
                currentTime: Number(new Date()),
                currentTime: '',
                currentRentInfo: {}
            }
        },
@@ -116,7 +116,9 @@
            xzHandleClick(item) {
                this.currentRentalId = item.housingRentalId
                this.currentRentInfo = item
                this.currentTime = item.dueTime
                this.isPickerShow = true
            },
            async dueTimeConfirm(e) {
                // 判断当前选中的时间是否小于租房时间
subPackage/bs/views/rentDetail.vue
@@ -20,13 +20,13 @@
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item @click="rentTimeShow = true" class="form-item" labelWidth="100" label="租房时间:" required
                <u-form-item @click="rentTimeClick" class="form-item" labelWidth="100" label="租房时间:" required
                    prop="rentTime">
                    <u--input border="none" v-model="form.rentTime" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item @click="dueTimeShow = true" class="form-item" labelWidth="100" label="到期时间:" required
                <u-form-item @click="dueTimeClick" class="form-item" labelWidth="100" label="到期时间:" required
                    prop="dueTime">
                    <u--input border="none" v-model="form.dueTime" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
@@ -61,9 +61,9 @@
            :popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
        </select-bus>
        <!--出租时间选择-->
        <u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
        <u-datetime-picker v-model="currentTime" v-if="rentTimeShow" :closeOnClickOverlay="true" @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
            @cancel="rentTimeShow = false"></u-datetime-picker>
        <u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
        <u-datetime-picker v-model="currentTime" v-if="dueTimeShow" :closeOnClickOverlay="true" @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
            @cancel="dueTimeShow = false"></u-datetime-picker>
        <view class="bottom-tools">
@@ -217,11 +217,19 @@
                this.form[this.selectBusKey] = item.value
                this.typeShow = !this.typeShow
            },
            rentTimeClick() {
                this.currentTime = Number(new Date(this.form.rentTime)) || Number(new Date())
                this.rentTimeShow = true
            },
            rentTimeConfirm(e) {
                const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
                this.form.rentTime = time
                this.rentTimeShow = false
            },
            dueTimeClick() {
                this.currentTime = Number(new Date(this.form.dueTime)) || Number(new Date())
                this.dueTimeShow = true
            },
            dueTimeConfirm(e) {
                const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
                this.form.dueTime = time
subPackage/house/roomDetails/index.vue
@@ -22,7 +22,8 @@
                        <view class="l flex-1 flex">
                            <view class="flex_base">
                                <view class="head-img flex_base">
                                    <u--image shape="circle" :showLoading="true" :src="item.src|| '/static/icon/user-01.png'"  width="120rpx"
                                    <u--image shape="circle" :showLoading="true"
                                        :src="item.src|| '/static/icon/user-01.png'" width="120rpx"
                                        height="120rpx"></u--image>
                                </view>
                            </view>
@@ -62,8 +63,9 @@
                    </view>
                </view>
                <u-modal :show="isHouseholdModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前住户信息"
                    @cancel="isHouseholdModelShow = false" @confirm="deleteHousehold()"></u-modal>
                <u-modal :show="isHouseholdModelShow" width="auto" :showCancelButton="true" title="提示"
                    content="请确认是否删除当前住户信息" @cancel="isHouseholdModelShow = false"
                    @confirm="deleteHousehold()"></u-modal>
                <view class="mt-20 rent-out-box">
                    <box-title :title="'出租管理'"></box-title>
@@ -95,9 +97,11 @@
                        </view>
                    </view>
                </view>
                <u-datetime-picker :show="isPickerShow" @cancel="isPickerShow = false" mode="date"
                <u-datetime-picker v-model="currentTime" v-if="isPickerShow" :closeOnClickOverlay="true"
                    @close="isPickerShow = false" :show="isPickerShow" @cancel="isPickerShow = false" mode="date"
                    @confirm="dueTimeConfirm"></u-datetime-picker>
                <u-datetime-picker :show="istPickerShow" @cancel="istPickerShow = false" mode="date"
                <u-datetime-picker v-model="currentTime" v-if="istPickerShow" :closeOnClickOverlay="true"
                    @close="istPickerShow = false" :show="istPickerShow" @cancel="istPickerShow = false" mode="date"
                    @confirm="terminateTimeConfirm"></u-datetime-picker>
                <u-divider text="已经到底了"></u-divider>
                <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
@@ -166,6 +170,7 @@
                        value: 2
                    },
                ],
                currentTime: null
            }
        },
        onLoad(e) {
@@ -192,7 +197,10 @@
            // 删除住户信息
            deleteHousehold(){
                removeHousehold(this.householdId).then(res=>{
                    const {code,data}  = res
                    const {
                        code,
                        data
                    } = res
                    if (code !== 200) {
                        uni.showToast({
                            title: "删除失败",
@@ -267,16 +275,20 @@
                this.$u.func.globalNavigator(`/subPackage/house/member/index?data=${navData}`)
            },
            editRent(item) {
                const { houseCode, id } = item
                const {
                    houseCode,
                    id
                } = item
                this.$u.func.globalNavigator(`/subPackage/bs/views/rentDetail?houseCode=${houseCode}&id=${id}`)
            },
            reletRent(item) {
                console.log(item);
                this.currentTime = item.dueTime
                this.currentRentalId = item.housingRentalId
                this.isPickerShow = true
            },
            
            terRent(item) {
                this.currentTime = item.dueTime
                this.currentRentalId = item.housingRentalId
                this.istPickerShow = true
            },