GULIMMO
2023-11-08 61e0e73ea58e1e6295be51ace3c184d21c0738c9
首页、公共维修、出租屋管理、报事报修、门牌码信息更新
7 files modified
405 ■■■■■ changed files
pages.json 1 ●●●● patch | view | raw | blame | history
pages/home/index.vue 3 ●●●● patch | view | raw | blame | history
subPackage/bs/views/addRepair.vue 6 ●●●● patch | view | raw | blame | history
subPackage/bs/views/rentDetail.vue 156 ●●●●● patch | view | raw | blame | history
subPackage/bs/views/repair.vue 4 ●●● patch | view | raw | blame | history
subPackage/workbench/views/csjl.vue 7 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/rental.vue 228 ●●●●● patch | view | raw | blame | history
pages.json
@@ -171,6 +171,7 @@
                {
                    "path": "views/rental",
                    "style": {
                        "onReachBottomDistance": 10,
                        "navigationBarTitleText": "出租房管理",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
pages/home/index.vue
@@ -382,7 +382,8 @@
                    } else {
                        this.curSelectSite = dataList[0];
                    }
                    this.curHouseCode = this.curSelectSite.id
                    this.curHouseCode = this.curSelectSite.id
                    uni.setStorageSync('curSelectSite', this.curSelectSite)
                }
            },
subPackage/bs/views/addRepair.vue
@@ -6,7 +6,7 @@
                <text class="f-28 c-aa ml-20">当前小区:</text>
            </view>
            <text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text>
            <text class="address f-28">{{ curSelectSite.name }}</text>
        </view>
        <view class="content bgc-ff">
            <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
@@ -75,6 +75,7 @@
                },
                desc: "",
                title: "",
                curSelectSite: {}
            }
        },
        onLoad(option) {
@@ -84,6 +85,9 @@
            })
            this.info.type = option.type
        },
        onShow() {
            this.curSelectSite = uni.getStorageSync('curSelectSite')
        },
        methods: {
            sumitInfo() {
                const that = this
subPackage/bs/views/rentDetail.vue
@@ -61,15 +61,23 @@
            :popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
        </select-bus>
        <!--出租时间选择-->
        <u-datetime-picker v-model="currentTime" v-if="rentTimeShow" :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" v-if="dueTimeShow" :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">
            <u-button class="btn-item" @click="addRentForm">再加一人</u-button>
            <u-button class="btn-item" @click="saveOrUpdate">{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
        </view>
            <u-button class="btn-item" color="#2CD5C0" @click="addRentForm">再加一人</u-button>
            <u-button class="btn-item" type="error" @click="isModelShow = true" v-if="rentId !== ''">删除</u-button>
            <u-button class="btn-item" type="warning" @click=""
                v-if="auditStatus == '0' && currentRole === 'admin'">审核</u-button>
            <u-button class="btn-item" color="linear-gradient(to right, #06B0FD, #027BFE)"
                @click="saveOrUpdate">{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
        </view>
        <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
            @cancel="isModelShow = false" @confirm="deleteRent"></u-modal>
    </view>
</template>
@@ -83,7 +91,8 @@
    } from "@/api/doorplateAddress/doorplateAddress";
    import {
        addHouseRental,
        updateRetalInfo
        updateRetalInfo,
        deleteRentalInfo
    } from '@/api/houseRental/houseRental.js'
    import {
        data
@@ -105,12 +114,12 @@
                currentRole: '',
                form: {
                    relation: "",
                    rentTime: "",
                    houseTypeName: "",
                    rentTime: "",
                    houseTypeName: "",
                    rentalUseName: "",
                    dueTime: "",
                    fileUrls:"",
                    images:[]
                    fileUrls: "",
                    images: []
                },
                imagesList: [],
                rules: {
@@ -184,8 +193,11 @@
                selectBusKey: '',
                typeShow: false,
                houseCode: '',
                rentId: '',
                currentTime: Number(new Date())
                rentId: '',
                auditStatus: null,
                currentTime: Number(new Date()),
                isModelShow: false,
            }
        },
        onLoad(option) {
@@ -216,19 +228,19 @@
                this[this.selectBusModel] = item.name
                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
            },
            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
            },
            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')
@@ -239,30 +251,30 @@
                this.rentFormNum++
            },
            decRentForm(i) {
                try{
                    let formData = []
                    this.$refs.rentform.forEach(vc => {
                        formData.push(vc.form)
                    })
                    formData.splice(i, 1)
                    formData.forEach((sform, i) => {
                        this.$refs.rentform[i].form = sform
                    })
                    this.rentFormNum > 1 && this.rentFormNum--
                    uni.showToast({
                        title: "删除成功",
                        icon: "success",
                        duration: 1500
                    })
                }catch(e){
                    uni.showToast({
                        title: "删除失败",
                        icon: "error",
                        duration: 1500
                    })
                try {
                    let formData = []
                    this.$refs.rentform.forEach(vc => {
                        formData.push(vc.form)
                    })
                    formData.splice(i, 1)
                    formData.forEach((sform, i) => {
                        this.$refs.rentform[i].form = sform
                    })
                    this.rentFormNum > 1 && this.rentFormNum--
                    uni.showToast({
                        title: "删除成功",
                        icon: "success",
                        duration: 1500
                    })
                } catch (e) {
                    uni.showToast({
                        title: "删除失败",
                        icon: "error",
                        duration: 1500
                    })
                }
            },
            saveOrUpdate() {
            saveOrUpdate() {
                this.$refs.form.validate().then(res => {
                    let rentFormValidGroup = []
                    this.$refs.rentform.forEach(item => {
@@ -301,7 +313,7 @@
                    dueTime: this.form.dueTime,
                    houseStatus: this.dataList.houseType[statusIndex].value,
                    rentalUse: this.dataList.rentalUse[rentalIndex].value,
                    fileUrls:this.form.fileUrls,
                    fileUrls: this.form.fileUrls,
                    houseTenantVOList
                }
                const {
@@ -351,7 +363,7 @@
                    dueTime: this.form.dueTime,
                    houseStatus: this.dataList.houseType[statusIndex].value,
                    rentalUse: this.dataList.rentalUse[rentalIndex].value,
                    fileUrls:this.form.fileUrls,
                    fileUrls: this.form.fileUrls,
                    houseTenantVOList
                }
                const res = await updateRetalInfo(data)
@@ -388,6 +400,7 @@
                        houseRentalList
                    }
                } = await getHouseRentInfo(this.houseCode)
                this.auditStatus = houseRentalList.auditStatus
                const images = []
                const {
                    houseStatus,
@@ -399,12 +412,12 @@
                    fileUrls
                } = houseRentalList.find(item => item.id === this.rentId)
                // 合同展示处理
                if(fileUrls!=null && fileUrls.length>0){
                if (fileUrls != null && fileUrls.length > 0) {
                    const urls = fileUrls.split(',')
                    // 遍历
                    urls.forEach(e=>{
                    urls.forEach(e => {
                        images.push({
                            url:minioBaseUrl + e,
                            url: minioBaseUrl + e,
                            name: e
                        })
                    })
@@ -412,10 +425,10 @@
                this.form = {
                    relation: tenantRelationship,
                    rentTime: rentalTime,
                    dueTime: dueTime,
                    houseTypeName: houseStatus,
                    dueTime: dueTime,
                    houseTypeName: houseStatus,
                    rentalUseName: rentalUse,
                    images:images
                    images: images
                }
                this.rentalUseName = this.findObjValue(rentalUse, this.dataList.rentalUse)
                this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation)
@@ -426,7 +439,32 @@
                        this.$refs.rentform[index].form = item
                    })
                })
            }
            },
            async deleteRent() {
                const {
                    code,
                    data
                } = await deleteRentalInfo(this.rentId)
                if (code !== 200) {
                    uni.showToast({
                        title: "删除失败",
                        icon: "error",
                        duration: 1500
                    })
                    return
                }
                this.isModelShow = false
                uni.showToast({
                    title: '删除成功',
                    icon: 'success',
                    duration: 1000,
                    complete: () => {
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 1000)
                    }
                })
            },
        }
    }
</script>
@@ -512,20 +550,16 @@
            z-index: 999;
            .btn-item {
                margin: 40rpx;
                // margin: 40rpx;
                // margin: 30rpx;
                color: #ffffff;
                font-weight: 700;
                border: 0;
                margin: 30rpx;
                margin-left: 0;
                &:nth-child(1) {
                    flex: 1;
                    background-color: #2CD5C0;
                }
                &:nth-child(2) {
                    flex: 3;
                    background: linear-gradient(to right, #06B0FD, #027BFE);
                    margin-left: 0rpx;
                &:first-child {
                    margin-left: 30rpx;
                }
            }
        }
subPackage/bs/views/repair.vue
@@ -37,7 +37,7 @@
                    <text class="f-28 c-aa ml-20">当前小区:</text>
                </view>
                <text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text>
                <text class="address f-28">{{ curSelectSite.name }}</text>
            </view>
            <view class="nav flex flex-wrap j-c-s-b">
@@ -69,6 +69,7 @@
                    total: 0,
                    handle: 0,
                },
                curSelectSite: {},
                navList: [{
                        title: "公共维修",
                        type: 1,
@@ -113,6 +114,7 @@
        },
        onShow() {
            this.getStatistics()
            this.curSelectSite = uni.getStorageSync('curSelectSite')
        },
        methods: {
subPackage/workbench/views/csjl.vue
@@ -132,10 +132,11 @@
    }
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
    page {
        background-color: #f6f6f6;
    }
    .container {
        min-height: 100%;
        overflow-y: auto;
        background-color: #f6f6f6;
        .tabsAndSearch {
subPackage/workbench/views/rental.vue
@@ -3,7 +3,7 @@
        <view class="header bgc-ff">
            <view class="filter-box">
                <chenchuang-CCDropDownFilter :filterData='filterData' :defaultIndex='defaultIndex'
                    @ed='handleSelect'></chenchuang-CCDropDownFilter>
                    @onSelected='handleSelect'></chenchuang-CCDropDownFilter>
            </view>
            <view class="search-box">
                <u-search placeholder="请输入租户名" v-model="keyword" :clearabled="true" :showAction="true" :animation="true"
@@ -60,6 +60,7 @@
            </view>
        </view>
        <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="已经到底了" line />
    </view>
</template>
@@ -79,19 +80,27 @@
                        },
                        {
                            name: '待审核',
                            value: '0'
                        },
                        {
                            name: '审核通过',
                            value: '1'
                        },
                        {
                            name: '未到期',
                            name: '审核不通过',
                            value: '2'
                        },
                        {
                            name: '未到期',
                            value: '10'
                        },
                        {
                            name: '即将到期',
                            value: '3'
                            value: '20'
                        },
                        {
                            name: '已到期',
                            value: '3'
                            value: '30'
                        }
                    ],
                    [{
@@ -113,10 +122,15 @@
                    ]
                ],
                defaultIndex: [0, 0],
                keyword: "",
                keyword: "",
                statistics: [],
                tenantList: [],
                status: [{
                loadingStatus: 'nomore',
                pagingParams: {
                    current: 1,
                    size: 10
                },
                tenantStatus: [{
                        name: '未到期',
                        value: 0
                    },
@@ -148,12 +162,30 @@
            this.getStatistics()
            this.getList()
        },
        onShow() {
        onShow() {
            this.tenantList = []
            this.getRentalHouseInfo()
        },
        onReachBottom() {
            this.pagingParams.current++
            this.getRentalHouseInfo()
        },
        methods: {
            handleSelect(res) {
                console.log('选择res = ' + JSON.stringify(res));
                const [auditStatus, floor] = res
                console.log(auditStatus, floor);
                this.pagingParams = {
                    current: 1,
                    size: 10
                }
                this.tenantList = []
                let params = {}
                if (auditStatus[0].value !== '') {
                    params = {
                        auditStatus: auditStatus[0].value
                    }
                }
                this.getRentalHouseInfo(params)
            },
            getStatistics() {
                getStatistics().then(res => {
@@ -172,14 +204,17 @@
                })
                return res.name
            },
            async getRentalHouseInfo() {
            async getRentalHouseInfo(params = {}) {
                this.loadingStatus = 'loadmore'
                const {
                    code,
                    data: {
                        records
                    }
                } = await getRentalHouseContent({
                    tenantName: this.keyword
                    tenantName: this.keyword,
                    ...this.pagingParams,
                    ...params
                })
                if (code !== 200) {
                    uni.showToast({
@@ -188,7 +223,8 @@
                    })
                    return
                }
                this.tenantList = records
                this.tenantList = [...this.tenantList, ...records]
                this.loadingStatus = 'nomore'
            },
            search() {
                this.getRentalHouseInfo()
@@ -206,90 +242,90 @@
        }
    }
</script>
<style lang="scss">
    page {
        background-color: #F5F5F5;
    }
    .header {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 10;
    }
    .filter-box {
        width: 100%;
        height: 100rpx;
    }
    .search-box {
        padding: 20rpx 24rpx 30rpx;
    }
    .content {
        width: 100%;
        margin-top: 220rpx;
        padding: 0 30rpx;
        box-sizing: border-box;
        .row {
            width: 100%;
            padding: 20rpx 0;
        }
        .row-item {
            width: calc(100% / 3);
            height: 46rpx;
            border-radius: 30rpx;
            padding: 0 20rpx;
            box-sizing: border-box;
        }
        .dot {
            width: 10rpx;
            height: 10rpx;
            border-radius: 50%;
            margin-right: 18rpx;
        }
        .bgc-green {
            background-color: #30D17C;
        }
        .bgc-orange {
            background-color: #FFAC3D;
        }
        .list {
            width: 100%;
            padding: 30rpx 30rpx 0;
            box-sizing: border-box;
            margin-bottom: 20rpx;
            .list-address {
                padding: 30rpx 0;
            }
            .list-action {
                padding: 22rpx 0 30rpx;
                border-top: 1px solid #F5F5F5;
            }
            .action-item {
                display: flex;
                flex: 1;
                justify-content: center;
            }
            .action-item:first-child {
                border-right: 1px solid #DBDBDB;
            }
            .mr-50 {
                margin-right: 50rpx;
            }
        }
<style lang="scss">
    page {
        background-color: #F5F5F5;
    }
    .header {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 10;
    }
    .filter-box {
        width: 100%;
        height: 100rpx;
    }
    .search-box {
        padding: 20rpx 24rpx 30rpx;
    }
    .content {
        width: 100%;
        margin-top: 220rpx;
        padding: 0 30rpx;
        box-sizing: border-box;
        .row {
            width: 100%;
            padding: 20rpx 0;
        }
        .row-item {
            width: calc(100% / 3);
            height: 46rpx;
            border-radius: 30rpx;
            padding: 0 20rpx;
            box-sizing: border-box;
        }
        .dot {
            width: 10rpx;
            height: 10rpx;
            border-radius: 50%;
            margin-right: 18rpx;
        }
        .bgc-green {
            background-color: #30D17C;
        }
        .bgc-orange {
            background-color: #FFAC3D;
        }
        .list {
            width: 100%;
            padding: 30rpx 30rpx 0;
            box-sizing: border-box;
            margin-bottom: 20rpx;
            .list-address {
                padding: 30rpx 0;
            }
            .list-action {
                padding: 22rpx 0 30rpx;
                border-top: 1px solid #F5F5F5;
            }
            .action-item {
                display: flex;
                flex: 1;
                justify-content: center;
            }
            .action-item:first-child {
                border-right: 1px solid #DBDBDB;
            }
            .mr-50 {
                margin-right: 50rpx;
            }
        }
    }
</style>