首页、公共维修、出租屋管理、报事报修、门牌码信息更新
| | |
| | | { |
| | | "path": "views/rental", |
| | | "style": { |
| | | "onReachBottomDistance": 10, |
| | | "navigationBarTitleText": "出租房管理", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#fff", |
| | |
| | | } else {
|
| | | this.curSelectSite = dataList[0];
|
| | | }
|
| | | this.curHouseCode = this.curSelectSite.id
|
| | | this.curHouseCode = this.curSelectSite.id |
| | | uni.setStorageSync('curSelectSite', this.curSelectSite)
|
| | | }
|
| | | },
|
| | |
|
| | |
| | | <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" |
| | |
| | | }, |
| | | desc: "", |
| | | title: "", |
| | | curSelectSite: {} |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | }) |
| | | this.info.type = option.type |
| | | }, |
| | | onShow() { |
| | | this.curSelectSite = uni.getStorageSync('curSelectSite') |
| | | }, |
| | | methods: { |
| | | sumitInfo() { |
| | | const that = this |
| | |
| | | :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>
|
| | |
|
| | |
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | import {
|
| | | addHouseRental,
|
| | | updateRetalInfo
|
| | | updateRetalInfo, |
| | | deleteRentalInfo
|
| | | } from '@/api/houseRental/houseRental.js'
|
| | | import {
|
| | | data
|
| | |
| | | currentRole: '',
|
| | | form: {
|
| | | relation: "",
|
| | | rentTime: "", |
| | | houseTypeName: "", |
| | | rentTime: "",
|
| | | houseTypeName: "",
|
| | | rentalUseName: "",
|
| | | dueTime: "",
|
| | | fileUrls:"",
|
| | | images:[]
|
| | | fileUrls: "",
|
| | | images: []
|
| | | },
|
| | | imagesList: [],
|
| | | rules: {
|
| | |
| | | selectBusKey: '',
|
| | | typeShow: false,
|
| | | houseCode: '',
|
| | | rentId: '', |
| | | currentTime: Number(new Date())
|
| | | rentId: '',
|
| | | auditStatus: null,
|
| | | currentTime: Number(new Date()), |
| | | isModelShow: false, |
| | | |
| | | }
|
| | | },
|
| | | onLoad(option) {
|
| | |
| | | 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')
|
| | |
| | | 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 => {
|
| | |
| | | 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 {
|
| | |
| | | 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)
|
| | |
| | | houseRentalList
|
| | | }
|
| | | } = await getHouseRentInfo(this.houseCode)
|
| | | this.auditStatus = houseRentalList.auditStatus
|
| | | const images = []
|
| | | const {
|
| | | houseStatus,
|
| | |
| | | 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
|
| | | })
|
| | | })
|
| | |
| | | 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)
|
| | |
| | | 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>
|
| | |
| | | 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;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | <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"> |
| | |
| | | total: 0, |
| | | handle: 0, |
| | | }, |
| | | curSelectSite: {}, |
| | | navList: [{ |
| | | title: "公共维修", |
| | | type: 1, |
| | |
| | | }, |
| | | onShow() { |
| | | this.getStatistics() |
| | | this.curSelectSite = uni.getStorageSync('curSelectSite') |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | }
|
| | | </script>
|
| | |
|
| | | <style lang="scss" scoped>
|
| | | <style lang="scss" scoped> |
| | | page { |
| | | background-color: #f6f6f6; |
| | | }
|
| | | .container {
|
| | | min-height: 100%;
|
| | | overflow-y: auto;
|
| | | background-color: #f6f6f6;
|
| | |
|
| | | .tabsAndSearch {
|
| | |
| | | <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"
|
| | |
| | | </view>
|
| | | </view>
|
| | |
|
| | | <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="已经到底了" line />
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | },
|
| | | {
|
| | | name: '待审核',
|
| | | value: '0'
|
| | | },
|
| | | {
|
| | | name: '审核通过',
|
| | | value: '1'
|
| | | },
|
| | | {
|
| | | name: '未到期',
|
| | | name: '审核不通过',
|
| | | value: '2'
|
| | | },
|
| | | {
|
| | | name: '未到期',
|
| | | value: '10'
|
| | | },
|
| | | {
|
| | | name: '即将到期',
|
| | | value: '3'
|
| | | value: '20'
|
| | | },
|
| | | {
|
| | | name: '已到期',
|
| | | value: '3'
|
| | | value: '30'
|
| | | }
|
| | | ],
|
| | | [{
|
| | |
| | | ]
|
| | | ],
|
| | | defaultIndex: [0, 0],
|
| | | keyword: "", |
| | | keyword: "",
|
| | | statistics: [],
|
| | | tenantList: [],
|
| | | status: [{
|
| | | loadingStatus: 'nomore',
|
| | | pagingParams: {
|
| | | current: 1,
|
| | | size: 10
|
| | | },
|
| | | tenantStatus: [{
|
| | | name: '未到期',
|
| | | value: 0
|
| | | },
|
| | |
| | | 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 => {
|
| | |
| | | })
|
| | | 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({
|
| | |
| | | })
|
| | | return
|
| | | }
|
| | | this.tenantList = records
|
| | | this.tenantList = [...this.tenantList, ...records]
|
| | | this.loadingStatus = 'nomore'
|
| | | },
|
| | | search() {
|
| | | this.getRentalHouseInfo()
|
| | |
| | | }
|
| | | }
|
| | | </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> |