Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
11 files modified
2 files added
| | |
| | | clientSecret |
| | | } from '@/common/setting'
|
| | |
|
| | | // 获取楼栋集合数据
|
| | | export const getDoorplateAddressList = (code, type) => {
|
| | | return http.request({
|
| | | url: 'blade-doorplateAddress/doorplateAddress/getDoorplateAddressList',
|
| | |
| | | })
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | // 获取功能菜单数据
|
| | | export const getFuncList = (type, roleName) => {
|
| | | return http.request({
|
| | | url: 'blade-doorplateAddress/doorplateAddress/getFuncList',
|
| | |
| | | })
|
| | | }
|
| | |
|
| | | // 获取当前房屋出租信息
|
| | | // 获取当前房屋/出租屋信息
|
| | | export const getHouseRentInfo = (code) => {
|
| | | return http.request({
|
| | | url: 'blade-doorplateAddress/doorplateAddress/getHouseRentInfo',
|
| | |
| | | params: {
|
| | | code
|
| | | }
|
| | | })
|
| | | }
|
| | |
|
| | | // 获取房屋标签信息
|
| | | export const getHouseLabelList = () => {
|
| | | return http.request({
|
| | | url: 'blade-label/label/getLabelList',
|
| | | method: 'GET',
|
| | | params: {
|
| | | parentId: 1001
|
| | | }
|
| | | })
|
| | | }
|
| | |
|
| | | // 获取房屋详细信息
|
| | | export const getHouseDetail = (houseCode) => {
|
| | | return http.request({
|
| | | url: 'blade-house/house/getHouseDetail',
|
| | | method: 'GET',
|
| | | params: {
|
| | | houseCode
|
| | | }
|
| | | })
|
| | | }
|
| | |
|
| | |
|
| | | // 获取房屋详细信息
|
| | | export const addHouseRental = (data) => {
|
| | | return http.request({
|
| | | url: 'blade-houseRental/houseRental/add',
|
| | | method: 'POST',
|
| | | data
|
| | | })
|
| | | }
|
| | |
|
| New file |
| | |
| | | import http from '@/http/api.js' |
| | | |
| | | // 获取房屋详细信息 |
| | | export const getHouseDetail = (param) => { |
| | | return http.request({ |
| | | url: 'blade-house/house/getHouseDetail', |
| | | method: 'GET', |
| | | params: param |
| | | }) |
| | | } |
| | | |
| | | // 获取房屋详细信息 |
| | | export const saveOrUpdateHouse = (data) => { |
| | | return http.request({ |
| | | url: 'blade-house/house/saveOrUpdateHouse', |
| | | method: 'POST', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| New file |
| | |
| | | import http from '@/http/api.js' |
| | | |
| | | // 获取房屋详细信息 |
| | | export const getHouseDetail = (houseCode) => { |
| | | return http.request({ |
| | | url: 'blade-house/house/getHouseDetail', |
| | | method: 'GET', |
| | | params: { |
| | | houseCode |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 房屋标签修改 |
| | | export const updateHouseLabel = (data) => { |
| | | return http.request({ |
| | | url: 'blade-houseLabel/houseLabel/saveOrUpdateHouseLabel', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 房屋标签撤销 |
| | | export const removeHouseLabel = (data) => { |
| | | return http.request({ |
| | | url: 'blade-houseLabel/houseLabel/removeHouseLabel', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | |
| | | import http from '@/http/api.js' |
| | | |
| | | |
| | | // 添加租赁信息 |
| | | export const addHouseRental = (data) => { |
| | | return http.request({ |
| | | url: 'blade-houseRental/houseRental/add', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | //删除 |
| | | export const deleteRentalInfo = (id) => { |
| | | return http.request({ |
| | |
| | | // 续租 |
| | | export const updateRetalInfo = (data) => { |
| | | return http.request({ |
| | | url: '/blade-houseRental/houseRental/updateHouseRental', |
| | | url: 'blade-houseRental/houseRental/updateHouseRental', |
| | | method: 'POST', |
| | | custom: { |
| | | 'Authorization': true |
| | |
| | | method: 'GET', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // 获取标签信息 |
| | | export const getLabelListByParentId = (param) => { |
| | | return http.request({ |
| | | url: 'blade-label/label/getLabelList', |
| | | method: 'GET', |
| | | params: param |
| | | }) |
| | | } |
| | |
| | | // 开发环境接口Url |
| | | // devUrl: 'https://sk.hubeishuiyi.cn', |
| | | // devUrl: 'http://192.168.1.156:9528', |
| | | devUrl:'http://192.168.0.207:9528', |
| | | devUrl:'http://192.168.1.50:9528', |
| | | minioBaseUrl:"http://60.220.177.113:9000/jczz/", |
| | | // 数据中台接口url |
| | | // dataCenterUrl: 'http://10.10.2.192/services', |
| | | dataCenterUrl: 'https://sk.hubeishuiyi.cn/services', |
| | |
| | | //上传成功后对返回数据进行处理 |
| | | async afterReadImg(event) { |
| | | this.showLoading() |
| | | |
| | | var that = this; |
| | | // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 |
| | | let lists = [].concat(event.file) |
| | | let fileListLen = this.form.images.length |
| | |
| | | }) |
| | | for (let i = 0; i < lists.length; i++) { |
| | | const result = await this.uploadFilePromise(lists[i].url) |
| | | this.form.images.splice(fileListLen, 1, Object.assign({}, { |
| | | url: result.data.link |
| | | that.form.images.splice(fileListLen, 1, Object.assign({}, { |
| | | url: result.data.link, |
| | | name:result.data.name |
| | | })) |
| | | fileListLen++ |
| | | } |
| | |
| | |
|
| | | <view class="list-btn">
|
| | | <u-button icon="edit-pen" class="btn-item" type="primary" plain text="修改"
|
| | | :disabled="item.status == 1 || item.status == 2"
|
| | | @click="pushPage(item)"></u-button>
|
| | | <u-button icon="calendar" class="btn-item" type="primary" plain text="续租"
|
| | | :disabled="item.status == 2"
|
| | | @click="xzHandleClick(item)"></u-button>
|
| | | <u-button icon="order" class="btn-item" type="primary" plain text="终止"
|
| | | :disabled="item.status == 1 || item.status == 2" @click="terminate(item)"></u-button>
|
| | |
| | | </u-form-item>
|
| | | <view class="pic">
|
| | | <view class="title">合同上传</view>
|
| | | <u-upload :fileList="imagesList" :previewFullImage="uploadConfig.previewFullImage"
|
| | | <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
|
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
|
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
|
| | | @delete="deletePic">
|
| | |
| | | <rentForm ref="rentform" />
|
| | | </view>
|
| | | </view>
|
| | |
|
| | |
|
| | | </u-form>
|
| | |
|
| | |
|
| | | <!-- 事件类型下拉框 -->
|
| | | <select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio"
|
| | | :popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
|
| | |
| | | import uploadMixin from "@/mixin/uploadMixin";
|
| | | import {
|
| | | uploadFile,
|
| | | addHouseRental,
|
| | | getHouseRentInfo,
|
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | import {
|
| | | addHouseRental,
|
| | | updateRetalInfo
|
| | | } from '@/api/houseRental/houseRental.js'
|
| | | import {
|
| | |
| | | import {
|
| | | update
|
| | | } from "../../../api/system/role";
|
| | | import {
|
| | | minioBaseUrl
|
| | | } from '@/common/setting'
|
| | | export default {
|
| | | mixins: [uploadMixin],
|
| | | components: {
|
| | |
| | | houseTypeName: "", |
| | | rentalUseName: "",
|
| | | dueTime: "",
|
| | | fileUrls:"",
|
| | | images:[]
|
| | | },
|
| | | imagesList: [],
|
| | | rules: {
|
| | |
| | | this.rentId = id
|
| | | this.getCurrentRentInfo()
|
| | | }
|
| | |
|
| | | },
|
| | | mounted() {
|
| | | this.currentRole = uni.getStorageSync("activeRole")
|
| | |
| | | const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
| | | this.form.dueTime = time
|
| | | this.dueTimeShow = false
|
| | | },
|
| | | async afterReadImg(e) { |
| | | console.log(this.$store); |
| | | |
| | | },
|
| | | addRentForm() {
|
| | | this.rentFormNum++
|
| | |
| | | }
|
| | | },
|
| | | saveOrUpdate() { |
| | | console.log(this.rentalUseName, this.houseTypeName);
|
| | | this.$refs.form.validate().then(res => {
|
| | | let rentFormValidGroup = []
|
| | | this.$refs.rentform.forEach(item => {
|
| | |
| | | })
|
| | | })
|
| | | },
|
| | | // 新增操作
|
| | | async save() {
|
| | | let houseTenantVOList = []
|
| | | this.$refs.rentform.forEach(item => {
|
| | | houseTenantVOList.push(item.form)
|
| | | })
|
| | | if (this.form.images.length > 0) {
|
| | | let urls = []
|
| | | this.form.images.forEach(e => {
|
| | | urls.push(e.name)
|
| | | })
|
| | | this.form.fileUrls = urls.join(",")
|
| | | }
|
| | | const relationIndex = this.dataList.relation.findIndex(item => item.name === this.relationName)
|
| | | const statusIndex = this.dataList.houseType.findIndex(item => item.name === this.houseTypeName)
|
| | | const rentalIndex = this.dataList.rentalUse.findIndex(item => item.name === this.rentalUseName)
|
| | |
| | | dueTime: this.form.dueTime,
|
| | | houseStatus: this.dataList.houseType[statusIndex].value,
|
| | | rentalUse: this.dataList.rentalUse[rentalIndex].value,
|
| | | fileUrls:this.form.fileUrls,
|
| | | houseTenantVOList
|
| | | }
|
| | | const {
|
| | |
| | | }
|
| | | })
|
| | | },
|
| | | // 更新操作
|
| | | async update() {
|
| | | let houseTenantVOList = []
|
| | | this.$refs.rentform.forEach(item => {
|
| | | houseTenantVOList.push(item.form)
|
| | | })
|
| | | if (this.form.images.length > 0) {
|
| | | let urls = []
|
| | | this.form.images.forEach(e => {
|
| | | urls.push(e.name)
|
| | | })
|
| | | this.form.fileUrls = urls.join(",")
|
| | | }
|
| | | const relationIndex = this.dataList.relation.findIndex(item => item.name === this.relationName)
|
| | | const statusIndex = this.dataList.houseType.findIndex(item => item.name === this.houseTypeName)
|
| | | const rentalIndex = this.dataList.rentalUse.findIndex(item => item.name === this.rentalUseName)
|
| | |
| | | dueTime: this.form.dueTime,
|
| | | houseStatus: this.dataList.houseType[statusIndex].value,
|
| | | rentalUse: this.dataList.rentalUse[rentalIndex].value,
|
| | | fileUrls:this.form.fileUrls,
|
| | | houseTenantVOList
|
| | | }
|
| | | const res = await updateRetalInfo(data)
|
| | |
| | | })
|
| | | return res.name
|
| | | },
|
| | | // 获取租赁相关信息
|
| | | async getCurrentRentInfo() {
|
| | | const {
|
| | | code,
|
| | |
| | | houseRentalList
|
| | | }
|
| | | } = await getHouseRentInfo(this.houseCode)
|
| | | const images = []
|
| | | const {
|
| | | houseStatus,
|
| | | tenantRelationship,
|
| | | rentalUse,
|
| | | rentalTime,
|
| | | dueTime,
|
| | | houseTenantVOList
|
| | | houseTenantVOList,
|
| | | fileUrls
|
| | | } = houseRentalList.find(item => item.id === this.rentId)
|
| | | // 合同展示处理
|
| | | if(fileUrls!=null && fileUrls.length>0){
|
| | | const urls = fileUrls.split(',')
|
| | | // 遍历
|
| | | urls.forEach(e=>{
|
| | | images.push({
|
| | | url:minioBaseUrl + e,
|
| | | name: e
|
| | | })
|
| | | })
|
| | | }
|
| | | this.form = {
|
| | | relation: tenantRelationship,
|
| | | rentTime: rentalTime,
|
| | | dueTime: dueTime, |
| | | houseTypeName: houseStatus, |
| | | rentalUseName: rentalUse
|
| | | rentalUseName: rentalUse,
|
| | | images:images
|
| | | }
|
| | | this.rentalUseName = this.findObjValue(rentalUse, this.dataList.rentalUse)
|
| | | this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation)
|
| | |
| | | location: "",
|
| | | room: "",
|
| | | num: 0,
|
| | |
|
| | | //出租列表
|
| | | rentList: []
|
| | | }
|
| | |
| | | const res = await getHouseRentInfo(this.houseCode)
|
| | | const {
|
| | | aoiName,
|
| | | subAoi,
|
| | | buildingName,
|
| | | doorplateName,
|
| | | unitName,
|
| | | houseRentalList
|
| | | } = res.data
|
| | | this.rentList = []
|
| | | this.location = (!!aoiName ? aoiName : '') + buildingName
|
| | | this.location = (!!aoiName ? aoiName : subAoi) + buildingName
|
| | | this.room = (!!unitName ? unitName : '') + doorplateName + "室" |
| | | this.num = 0
|
| | | houseRentalList !== 0 && houseRentalList.forEach(item => {
|
| | |
| | | </u--input>
|
| | | </u-form-item>
|
| | |
|
| | | <u-form-item class="form-item" labelWidth="100" label="地址" required>
|
| | | <u-form-item class="form-item" labelWidth="100" label="地址" >
|
| | | <u--input border="none" v-model="form.address" disabled>
|
| | | </u--input>
|
| | | </u-form-item>
|
| | |
|
| | | <u-form-item class="form-item" labelWidth="100" label="物业月费" required>
|
| | | <u--input border="none" v-model="form.property_price" disabled>
|
| | | <u-form-item class="form-item" labelWidth="100" label="物业月费" >
|
| | | <u--input border="none" v-model="form.propertyPrice" disabled>
|
| | | </u--input>
|
| | | </u-form-item>
|
| | |
|
| | | <u-form-item class="form-item" labelWidth="100" label="到期时间" required>
|
| | | <u--input border="none" v-model="form.service_due" disabled>
|
| | | <u-form-item class="form-item" labelWidth="100" label="到期时间" >
|
| | | <u--input border="none" v-model="form.serviceDue" disabled>
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | </view>
|
| | |
|
| | | <box-title class="mt-20" title="房屋外观"></box-title>
|
| | | <view class="pic mt-20">
|
| | | <u-upload :fileList="form.image_urls" :previewFullImage="uploadConfig.previewFullImage"
|
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
|
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
|
| | | @delete="deletePic">
|
| | | <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
|
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
|
| | | :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
|
| | | </u-upload>
|
| | | </view>
|
| | |
|
| | | <box-title title="房屋标签"></box-title>
|
| | | <view class="mt-20 flex label-btn-box b-c-w">
|
| | | <view v-for="(item, index) in labelBtnList" :key="index">
|
| | | <u-button color="#000" size="mini" type="primary" :plain="true" :text="item.name"
|
| | | <u-button color="#000" size="mini" type="primary" |
| | | :style="{background: item.color}"
|
| | | :plain="true" :text="item.name"
|
| | | @click="showLabelPopup(item)"></u-button>
|
| | | </view>
|
| | | </view>
|
| | |
| | | </view>
|
| | |
|
| | | <view class="edit-btn">
|
| | | <u-button type="primary" text="修改数据"></u-button>
|
| | | <u-button type="primary" text="修改数据" @click="updateHouseInfo(item)"></u-button>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | |
| | | </u-radio>
|
| | | </u-radio-group>
|
| | |
|
| | | <u--textarea class="mt-40" v-model="value1" placeholder="请输入内容"></u--textarea>
|
| | | <u--textarea class="mt-40" v-model="remark" placeholder="请输入内容"></u--textarea>
|
| | | </view>
|
| | | </u-modal>
|
| | |
|
| | |
| | | <script>
|
| | | import uploadMixin from "@/mixin/uploadMixin";
|
| | | import {
|
| | | getHouseDetail,
|
| | | getHouseLabelList, |
| | | uploadFile
|
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | import {
|
| | | getLabelListByParentId
|
| | | } from "@/api/label/label.js";
|
| | | import {
|
| | | updateHouseLabel,
|
| | | removeHouseLabel
|
| | | } from "@/api/house/houseLabel.js";
|
| | | import {
|
| | | getHouseDetail,saveOrUpdateHouse
|
| | | } from "@/api/house/house.js";
|
| | | import {
|
| | | minioBaseUrl
|
| | | } from '@/common/setting'
|
| | | import { number } from "echarts"; |
| | | export default {
|
| | | mixins: [uploadMixin],
|
| | | data() {
|
| | |
| | | form: {
|
| | | phone: "",
|
| | | address: "",
|
| | | property_price: "",
|
| | | service_due: "",
|
| | | image_urls: []
|
| | | propertyPrice: "",
|
| | | serviceDue: "",
|
| | | imageUrls: "",
|
| | | },
|
| | | showList: {
|
| | | relation: false
|
| | |
| | | color: '#EE0A24'
|
| | | }
|
| | | ],
|
| | | currentLabelInfo: {},
|
| | | currentColorInfo: {},
|
| | | labelModelInfo: {
|
| | | title: '',
|
| | | selectedColor: ''
|
| | | },
|
| | | labelValue: '苹果',
|
| | | value1: ''
|
| | | labelValue: '',
|
| | | remark: '',
|
| | | // 标记
|
| | | number:0
|
| | | }
|
| | | },
|
| | | created() {
|
| | |
| | | this.houseCode = code
|
| | | },
|
| | | onShow() {
|
| | | this.getLabelList()
|
| | | // this.getLabelList()
|
| | | this.getHouseDetailInfo()
|
| | | },
|
| | | methods: {
|
| | | // 获取房屋详情
|
| | | async getHouseDetailInfo() {
|
| | | var that = this;
|
| | | const param = {
|
| | | houseCode : this.houseCode
|
| | | }
|
| | | const res = await getHouseDetail(param)
|
| | | if(null != res.data){
|
| | | const images = []
|
| | | const {
|
| | | phone,
|
| | | address,
|
| | | propertyPrice,
|
| | | serviceDue,
|
| | | imageUrls,
|
| | | houseLabelVOList
|
| | | } = res.data
|
| | | if(imageUrls.length>0){
|
| | | const urls = imageUrls.split(',')
|
| | | // 遍历
|
| | | urls.forEach(e=>{
|
| | | images.push({
|
| | | url:minioBaseUrl + e,
|
| | | name: e
|
| | | })
|
| | | })
|
| | | }
|
| | | // 房屋标签处理
|
| | | if(houseLabelVOList.length>0){
|
| | | const param = {
|
| | | parentId:1001
|
| | | }
|
| | | const res = await getLabelListByParentId(param)
|
| | | this.labelBtnList = res.data
|
| | | that.labelBtnList.forEach(e=>{
|
| | | houseLabelVOList.forEach(f=>{
|
| | | if(Number(e.id) == f.labelId){
|
| | | e['color'] = f.color
|
| | | e['remark'] = f.remark
|
| | | }
|
| | | })
|
| | | })
|
| | | }
|
| | | this.form = {
|
| | | phone,
|
| | | address,
|
| | | propertyPrice,
|
| | | serviceDue,
|
| | | imageUrls,
|
| | | images
|
| | | }
|
| | | }
|
| | | },
|
| | | // 获取房屋标签信息
|
| | | async getLabelList() {
|
| | | const param = {
|
| | | parentId:1001
|
| | | }
|
| | | const res = await getLabelListByParentId(param)
|
| | | this.labelBtnList = res.data
|
| | | },
|
| | | // 更新房屋数据
|
| | | async updateHouseInfo(){
|
| | | this.form['houseCode'] = this.houseCode
|
| | | if (this.form.images.length > 0) {
|
| | | let urls = []
|
| | | this.form.images.forEach(e => {
|
| | | urls.push(e.name)
|
| | | })
|
| | | this.form.imageUrls = urls.join(",")
|
| | | }
|
| | | const {
|
| | | code,
|
| | | data
|
| | | } = await saveOrUpdateHouse(this.form)
|
| | | if (code !== 200) {
|
| | | uni.showToast({
|
| | | title: "房屋信息修改失败",
|
| | | icon: "error",
|
| | | duration: 1500
|
| | | })
|
| | | return
|
| | | }
|
| | | uni.showToast({
|
| | | title: "房屋信息修改成功",
|
| | | icon: "success",
|
| | | duration: 1500,
|
| | | success: () => {
|
| | | setTimeout(() => {
|
| | | // uni.navigateBack()
|
| | | }, 1500)
|
| | | }
|
| | | })
|
| | | },
|
| | | // 房屋弹窗
|
| | | showLabelPopup(item) {
|
| | | // 先清空
|
| | | this.number = 0
|
| | | this.labelValue = ""
|
| | | this.remark = ""
|
| | | this.popupShow = true
|
| | | this.labelModelInfo.title = item.name
|
| | | this.currentLabelInfo = item
|
| | | // 遍历标签集合
|
| | | this.labelList.forEach(e=>{
|
| | | if(e.color == item.color){
|
| | | this.labelValue = e.name
|
| | | this.remark = item.remark
|
| | | this.number = 1
|
| | | }
|
| | | })
|
| | | },
|
| | |
|
| | | popupConfirm() {
|
| | |
| | | },
|
| | |
|
| | | radioChange(item) {
|
| | |
|
| | | this.currentColorInfo = item
|
| | | },
|
| | | async getHouseDetailInfo() {
|
| | | const res = await getHouseDetail()
|
| | | // const { phone, address, property_price, service_due, image_urls } = res.data
|
| | | // this.form = {
|
| | | // phone,
|
| | | // address,
|
| | | // property_price,
|
| | | // service_due,
|
| | | // image_urls: [
|
| | | // image_urls
|
| | | // ]
|
| | | // }
|
| | | // 更新房屋标签
|
| | | async popupConfirm() {
|
| | | const {
|
| | | id
|
| | | } = this.currentLabelInfo
|
| | | const {
|
| | | color,
|
| | | name
|
| | | } = this.currentColorInfo
|
| | | let res = null
|
| | | if (name === '撤销') {
|
| | | if(this.number==1){
|
| | | const data = {
|
| | | labelId:id,
|
| | | houseCode: this.houseCode
|
| | | }
|
| | | res = await removeHouseLabel(data)
|
| | | }else{
|
| | | uni.showToast({
|
| | | title: "无可撤销项",
|
| | | icon: "error",
|
| | | duration: 1500
|
| | | })
|
| | | return
|
| | | }
|
| | | } else {
|
| | | res = await updateHouseLabel({
|
| | | houseCode: this.houseCode,
|
| | | labelId: id,
|
| | | remark:this.remark,
|
| | | color
|
| | | })
|
| | | }
|
| | | if (res.code !== 200) {
|
| | | uni.showToast({
|
| | | title: "修改失败",
|
| | | icon: "error",
|
| | | duration: 1500
|
| | | })
|
| | | return
|
| | | }
|
| | | // 刷新页面
|
| | | this.getHouseDetailInfo()
|
| | | this.popupShow = false
|
| | | },
|
| | | async getLabelList() {
|
| | | const res = await getHouseLabelList()
|
| | | this.labelBtnList = res.data
|
| | | },
|
| | | async afterReadImg(event) {
|
| | | let lists = [].concat(event.file) |
| | | lists.forEach(item => { |
| | | const { url } = item |
| | | uploadFile(item) |
| | | })
|
| | | |
| | | }
|
| | | |
| | | }
|
| | | }
|
| | | </script>
|
| | |
| | | 租客:{{item.tenant}}(共{{item.allNum}}人)
|
| | | </view>
|
| | | <view class="r">
|
| | | <u-icon name="trash-fill" color="red"></u-icon>
|
| | | <u-icon name="trash-fill" color="red" @click="deleteRent(item)"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | <view class="t flex j-c-s-b a-i-c">
|
| | |
| | | </view>
|
| | | </view>
|
| | | <view class="btn-box flex j-c-s-a">
|
| | | <u-button color="#CDF3DF" text="修改" @click="editRent(item)"></u-button>
|
| | | <u-button color="#DAE7FF" text="续租" @click="reletRent(item)"></u-button>
|
| | | <u-button color="#FCCED3" text="终止" @click="deleteRent(item)"></u-button>
|
| | | <u-button icon="edit-pen" class="btn-item" type="primary" plain text="修改"
|
| | | :disabled="item.status == 1 || item.status == 2" @click="editRent(item)"></u-button>
|
| | | <u-button icon="calendar" class="btn-item" type="primary" plain text="续租"
|
| | | :disabled="item.status == 2" @click="reletRent(item)"></u-button>
|
| | | <u-button icon="order" class="btn-item" type="primary" plain text="终止"
|
| | | :disabled="item.status == 1 || item.status == 2" @click="terRent(item)"></u-button>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | @confirm="dueTimeConfirm"></u-datetime-picker> |
| | | <u-datetime-picker :show="istPickerShow" @cancel="istPickerShow = false" mode="date" |
| | | @confirm="terminateTimeConfirm"></u-datetime-picker>
|
| | | <u-divider text="已经到底了"></u-divider>
|
| | | <u-divider text="已经到底了"></u-divider> |
| | | <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息" |
| | | @cancel="isModelShow = false" @confirm="deleteRentalConfirm"></u-modal>
|
| | | </view>
|
| | |
|
| | | <view class="edit-btn">
|
| | |
| | | this.isPickerShow = true |
| | | }, |
| | | |
| | | deleteRent(item) { |
| | | terRent(item) { |
| | | this.currentRentalId = item.housingRentalId |
| | | this.istPickerShow = true |
| | | }, |
| | | deleteRent(item) { |
| | | this.currentRentalId = item.housingRentalId |
| | | this.isModelShow = true |
| | | }, |
| | | async dueTimeConfirm(e) { |
| | | const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') |
| | |
| | | return |
| | | } |
| | | this.istPickerShow = false |
| | | this.getHouseRentInfoList() |
| | | }, |
| | | async deleteRentalConfirm() { |
| | | const { |
| | | code, |
| | | data |
| | | } = await deleteRentalInfo(this.currentRentalId) |
| | | if (code !== 200) { |
| | | uni.showToast({ |
| | | title: "删除失败", |
| | | icon: "error", |
| | | duration: 1500 |
| | | }) |
| | | return |
| | | } |
| | | this.isModelShow = false |
| | | this.getHouseRentInfoList() |
| | | }, |
| | | findObjValue(value, obj) { |
| | |
| | | &>.u-button {
|
| | | margin: 0 16rpx;
|
| | | }
|
| | | |
| | | .btn-item {
|
| | | margin: 0 10rpx;
|
| | | border: 0;
|
| | | color: #009FFF;
|
| | | font-weight: 700;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | submit() { |
| | | const that = this |
| | | this.$refs.form.validate().then(valid => { |
| | | |
| | | if (valid) { |
| | | |
| | | |
| | | if (this.form.images.length > 0) { |
| | | let urls = [] |
| | | this.form.images.forEach(e => { |
| | | urls.push(e.url) |
| | | urls.push(e.name) |
| | | }) |
| | | this.form.imageUrls = urls.join(",") |
| | | } |