hz-zhhq-app/pages/house/house-examine-detail.vue

2798 lines
89 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="hzIndex">
<hzHeader :title="title"></hzHeader>
<view class="hzContent" style="padding-top: 200upx;">
<view class="details">
<view class="detail_msg">
<view class="info-item status">
<text class="label">   </text>
<text v-if="item.examineState ==0&&item.examineBatch==1" class="infoSpan" style="color: #ff9000;" >待审核</text>
<text v-if="item.examineState ==0&&item.examineBatch>1" class="infoSpan" style="color: #ff9000;" >审核中</text>
<text v-if="item.examineState ==3&&item.examineBatch>1" class="infoSpan" style="color: #ff9000;" >审核中</text>
<text v-if="item.examineState ==1&&item.isUpload!='2'" class="infoSpan" style="color: #ff9000;">审核中</text>
<text v-if="item.examineState ==1&&item.isUpload=='2'" class="infoSpan" style="color: #ff9000;">待上传合同</text>
<text v-if="item.examineState ==2" class="infoSpan" style="color: red;">已拒绝</text>
<!-- <text v-if="item.examineState ==3" class="infoSpan" style="color: green;">已选房</text> -->
<text v-if="item.examineState ==4&&!item.unCheckType" class="infoSpan" style="color: #ff9000;">退租待审核</text>
<text v-if="item.examineState ==4&&item.unCheckType" class="infoSpan" style="color: #ff9000;">退租审核中</text>
<text v-if="item.examineState ==5" class="infoSpan" style="color: gray;">已退租</text>
<text v-if="item.examineState ==6" class="infoSpan" style="color: red;">退租未通过</text>
<text v-if="item.examineState ==7" class="infoSpan" style="color: green;">已入住</text>
</view>
<view class="info-item">
<text class="label">姓  名: </text>
<text class="infoSpan">{{item.userName}}</text>
</view>
<view @click="callPhone(item.phone)" class="info-item">
<text class="label">联系方式: </text>
<text class="infoSpan" >{{ item.phone }}</text>
</view>
<view class="info-item" v-if="item.userType!=3">
<text class="label">部  门: </text>
<text class="infoSpan">{{ item.orgName }}</text>
</view>
<view class="info-item" v-if="item.userType!=3">
<text class="label">婚姻状况: </text>
<text class="infoSpan">{{ item.marriageState }}</text>
</view>
<view class="info-item" v-if="item.userType!=3">
<text class="label">房查照片: </text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.roomInspection" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item">
<text class="label" style="width: 180rpx;">身份证照片: </text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.idCardImg" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item" v-if="item.userType==3">
<text class="label">附件: </text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.attachment" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item" v-if="item.userType==2">
<text class="label">工作岗位: </text>
<text class="infoSpan">{{ item.position }}</text>
</view>
<view class="info-item">
<text class="label">人员类别: </text>
<text class="infoSpan">{{ formatUserType(item.userType) }}</text>
</view>
<view class="info-item">
<text class="label">申请房型: </text>
<text class="infoSpan">{{ formatHouseType(item.houseType) }}</text>
</view>
<view class="info-item">
<text class="label">申请日期: </text>
<text class="infoSpan">{{ formatDate(item.applyTime,'dateTime') }}</text>
</view>
<view class="info-item" v-if="item.userType!=3">
<text class="label">申请事由: </text>
<text class="infoSpan">{{ item.applyCause }}</text>
</view>
<view class="info-item" v-if="queryType==0&&item.checkType==1&&item.checkOperat==1&&!item.unCheckType">
<text class="label">分配房源: </text>
<text class="infoSpan" @click="houseSelect" style="color:aquamarine;" >{{ chosenHouse }}</text>
</view>
<view class="info-item" v-if="queryType==0&&item.checkType==1&&item.checkOperat==1&&!item.unCheckType">
<text class="label">租金: </text>
<text class="infoSpan">{{ chosenHouseCost }}元</text>
</view>
<view class="info-item" v-if="item.houseId">
<text class="label">分配房源: </text>
<text class="infoSpan">{{item.houseName}}-{{item.houseCode}}</text>
</view>
<view class="info-item" v-if="item.houseId">
<text class="label">租金: </text>
<text class="infoSpan">{{ item.rent }}元</text>
</view>
<view v-if="queryType=='0'&&item.checkType=='1'&&item.checkOperat=='2'">
<view class="info-item">
<text class="label">合同期限<text style="color: red;">*</text>:</text>
<view class="infoSpan"><uni-datetime-picker :clear-icon="false" v-model="dateRange" type="daterange"/></view>
</view>
<view class="info-item">
<text class="label">合同照片<text style="color: red;">*</text>:</text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs1" :key="index">
<image class="remove-btn" @click="removeImg(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg()" v-if="imgs1.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
<view class="info-item">
<text class="label">缴费凭证<text style="color: red;">*</text>: </text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs2" :key="index">
<image class="remove-btn" @click="removeImg2(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg2()" v-if="imgs2.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
</view>
<view class="info-item">
<text class="label" style="width: 200upx;">入住房间照片<text style="color: red;">*</text>:</text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs3" :key="index">
<image class="remove-btn" @click="removeImg3(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg3()" v-if="imgs3.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
</view>
<view class="form-item">
<text class="label" style="width: 200upx;">入住水表数值<text style="color: red;">*</text>:</text>
<view class="ipt-box"><input class="top-t" v-model="waterValue" placeholder="请输入水表数值"
type="number" maxlength="10" /></view>
</view>
<view class="form-item">
<text class="label" style="width: 200upx;">入住电表数值<text style="color: red;">*</text>:</text>
<view class="ipt-box"><input class="top-t" v-model="powerValue" placeholder="请输入电表数值"
type="number" maxlength="10" /></view>
</view>
<view class="form-item">
<text class="label" style="width: 200upx;">入住燃气数值<text style="color: red;">*</text>:</text>
<view class="ipt-box"><input class="top-t" v-model="gasValue" placeholder="请输入燃气表数值"
type="number" maxlength="10" /></view>
</view>
<view class="form-item">
<text class="label" style="width: 190upx;">附属设备清单:</text>
<view style="width: 100%;">
<uni-table ref="table" style="width: 96%;" :border="true" type="selection" emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr>
<uni-th width="80" align="left">名称</uni-th>
<uni-th width="80" align="left">品牌</uni-th>
<uni-th width="60" align="left">型号</uni-th>
<uni-th width="60" align="left">价格</uni-th>
<uni-th width="60" align="left">数量</uni-th>
</uni-tr>
<uni-tr v-for="(items, indexs) in devicesList" :key="indexs">
<uni-td align="left">{{ items.name }}</uni-td>
<uni-td align="left">{{ items.brand }}</uni-td>
<uni-td align="left">{{ items.model }}</uni-td>
<uni-td align="left">{{ items.price }}</uni-td>
<uni-td align="left">{{ items.num }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view v-if="item.isUpload=='3'">
<view class="info-item">
<text class="label">合同期限: </text>
<text class="infoSpan">{{ formatDate(item.contractStartTime,'date')+"~"+ formatDate(item.contractEndTime,'date')}}</text>
</view>
<view class="info-item" v-if="item.examineState=='4'&&item.unCheckOperat==1" style="display: flex;">
<text class="label">退租日期<text style="color: red;">*</text>:</text>
<view class="infoSpan" style="width: 70%;"><uni-datetime-picker :clear-icon="false" v-model="dateOut" type="date"/></view>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label">退租日期: </text>
<text class="infoSpan">{{ formatDate(item.checkOutDate,'date')}}</text>
</view>
<view class="info-item">
<text class="label">合同图片: </text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.contractPhoto" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item">
<text class="label">缴费凭证: </text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.photo" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item">
<text class="label" style="width: 200upx;">入住房间照片: </text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.checkInPhoto" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">退租房间照片<text style="color: red;">*</text>:</text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs4" :key="index">
<image class="remove-btn" @click="removeImg4(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg4()" v-if="imgs4.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 200upx;">退租房间照片: </text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.checkOutPhoto" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 240upx;">物业费结清凭证<text style="color: red;">*</text>:</text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs5" :key="index">
<image class="remove-btn" @click="removeImg5(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg5()" v-if="imgs5.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 240upx;">物业费结清凭证:</text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.propertyPhoto" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item">
<text class="label" style="width: 200upx;">入住水表数值:</text>
<text class="infoSpan">{{ item.waterValue }}</text>
</view>
<view class="form-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">水表当前数值<text style="color: red;">*</text>:</text>
<view class="ipt-box"><input class="top-t" v-model="waterValueNow" placeholder="请输入水表数值"
type="number" maxlength="10" /></view>
</view>
<view class="info-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">水费结清凭证<text style="color: red;">*</text>:</text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs6" :key="index">
<image class="remove-btn" @click="removeImg6(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg6()" v-if="imgs6.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 200upx;">水表退租数值:</text>
<text class="infoSpan">{{ item.waterValueNow }}</text>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 200upx;">水费结清凭证:</text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.waterSettlePhoto" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item">
<text class="label" style="width: 200upx;">入住电表数值: </text>
<text class="infoSpan">{{ item.powerValue }}</text>
</view>
<view class="form-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">电表当前数值<text style="color: red;">*</text>:</text>
<view class="ipt-box"><input class="top-t" v-model="powerValueNow" placeholder="请输入电表数值"
type="number" maxlength="10" /></view>
</view>
<view class="info-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">电费结清凭证<text style="color: red;">*</text>:</text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs7" :key="index">
<image class="remove-btn" @click="removeImg7(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg7()" v-if="imgs7.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 200upx;">电表退租数值:</text>
<text class="infoSpan">{{ item.powerValueNow }}</text>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 220upx;">电费结清凭证:</text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.powerSettlePhoto" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item">
<text class="label" style="width: 200upx;">入住燃气数值: </text>
<text class="infoSpan">{{ item.gasValue }}</text>
</view>
<view class="form-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">燃气当前数值<text style="color: red;">*</text>:</text>
<view class="ipt-box"><input class="top-t" v-model="gasValueNow" placeholder="请输入燃气表数值"
type="number" maxlength="10" /></view>
</view>
<view class="info-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">燃气结清凭证<text style="color: red;">*</text>:</text>
<view class="pic" style="border-bottom: 1px solid #eee;">
<view class="img-box">
<view class="img-item" v-for="(item, index) in imgs8" :key="index">
<image class="remove-btn" @click="removeImg8(index)" src="/static/icons/delete-icon.png"
mode=""></image>
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
</view>
<view class="img-item upload-btn" @click="chooseImg8()" v-if="imgs8.length < 3">
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
</view>
</view>
</view>
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 200upx;">燃气退租数值:</text>
<text class="infoSpan">{{ item.gasValueNow }}</text>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 220upx;">燃气结清凭证:</text>
<view class="img-list">
<image v-for="(itemImg,imgIndex) in item.gasSettlePhoto" :key="imgIndex" :src="formatImgUrl(itemImg)" mode="" @click="vbPicture(new Array(formatImgUrl(itemImg)))"></image>
</view>
</view>
<view class="info-item">
<text class="label" style="width: 200upx;">入住设备清单:</text>
<view style="margin-top: 20upx;">
<uni-table ref="table" style="width: 90%;" :border="true" emptyText="暂无更多数据">
<uni-tr>
<uni-th width="80" align="left">名称</uni-th>
<uni-th width="80" align="left">品牌</uni-th>
<uni-th width="60" align="left">型号</uni-th>
<uni-th width="60" align="left">价格</uni-th>
<uni-th width="60" align="left">数量</uni-th>
</uni-tr>
<uni-tr v-for="(items, indexs) in devicesList" :key="indexs">
<uni-td align="left">{{ items.name }}</uni-td>
<uni-td align="left">{{ items.brand }}</uni-td>
<uni-td align="left">{{ items.model }}</uni-td>
<uni-td align="left">{{ items.price }}</uni-td>
<uni-td align="left">{{ items.num }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view class="form-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 200upx;">检查设备清单:</text>
<view >
<uni-table ref="table" style="width: 96%;" :border="true" type="selection" emptyText="暂无更多数据" @selection-change="selectionChangeOut">
<uni-tr>
<uni-th width="80" align="left">名称</uni-th>
<uni-th width="80" align="left">品牌</uni-th>
<uni-th width="60" align="left">型号</uni-th>
<uni-th width="60" align="left">价格</uni-th>
<uni-th width="60" align="left">数量</uni-th>
</uni-tr>
<uni-tr v-for="(items, indexs) in devicesList" :key="indexs">
<uni-td align="left">{{ items.name }}</uni-td>
<uni-td align="left">{{ items.brand }}</uni-td>
<uni-td align="left">{{ items.model }}</uni-td>
<uni-td align="left">{{ items.price }}</uni-td>
<uni-td align="left">{{ items.num }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view class="info-item" v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<text class="label" style="width: 200upx;">检查设备清单:</text>
<view style="margin-top: 20upx;">
<uni-table ref="table" style="width: 90%;" :border="true" emptyText="暂无更多数据">
<uni-tr>
<uni-th width="80" align="left">名称</uni-th>
<uni-th width="80" align="left">品牌</uni-th>
<uni-th width="60" align="left">型号</uni-th>
<uni-th width="60" align="left">价格</uni-th>
<uni-th width="60" align="left">数量</uni-th>
</uni-tr>
<uni-tr v-for="(items, indexs) in devicesList2" :key="indexs">
<uni-td align="left">{{ items.name }}</uni-td>
<uni-td align="left">{{ items.brand }}</uni-td>
<uni-td align="left">{{ items.model }}</uni-td>
<uni-td align="left">{{ items.price }}</uni-td>
<uni-td align="left">{{ items.num }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view class="form-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 220upx;">押金是否退还:</text>
<view class="ipt-box select">
<radio-group @change="changeDepositBack" style="display: flex;justify-content: flex-start;align-items: center">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in depositBackStates" :key="item.id" style="font-size: 26upx;display: flex;justify-content: flex-start;align-items: center;margin-right: 40upx;min-width: 140upx;">
<view>
<radio color="#4db4ea" :value="item.id" :checked="item.id == depositBack"/>
</view>
<view>{{item.name}}</view>
</label>
</radio-group>
</view>
</view>
<view class="form-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label">是否抵扣:</text>
<view class="ipt-box select">
<radio-group @change="changeIsDeduction" style="display: flex;justify-content: flex-start;align-items: center">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in isDeductionStates" :key="item.id" style="font-size: 26upx;display: flex;justify-content: flex-start;align-items: center;margin-right: 40upx;min-width: 140upx;">
<view>
<radio color="#4db4ea" :value="item.id" :checked="item.id == isDeduction"/>
</view>
<view>{{item.name}}</view>
</label>
</radio-group>
</view>
</view>
<view class="form-item" v-if="item.examineState=='4'&&item.unCheckOperat==1">
<text class="label" style="width: 190upx;">抵扣说明:</text>
<view class="ipt-box"><input class="top-t" v-model="deductionReason" placeholder="请输入抵扣说明"
type="text" maxlength="20" /></view>
</view>
<view v-if="item.examineState=='5'||(item.examineState=='4'&&item.unCheckOperat!='1')">
<view class="info-item" >
<text class="label" style="width: 220upx;">押金是否退还:</text>
<text class="infoSpan">{{ depositBackStates[Number(item.depositBack)].name }}</text>
</view>
<view class="info-item">
<text class="label">是否抵扣:</text>
<text class="infoSpan">{{ isDeductionStates[Number(item.isDeduction)].name }}</text>
</view>
<view class="info-item">
<text class="label">抵扣说明:</text>
<text class="infoSpan">{{ item.deductionReason }}</text>
</view>
</view>
</view>
</view>
</view>
<view >
<view class="details">
<YSteps color='#fff' backgroundColor='#4db4ea' :infoList='process'></YSteps>
</view>
</view>
<view v-if="item.unCheckType&&item.unCheckType!=''">
<view class="details">
<YSteps color='#fff' backgroundColor='#4db4ea' :infoList='process2'></YSteps>
</view>
</view>
<view class="occupied" style="height: 180upx;"></view>
<view v-if="queryType==0&&item.checkType==2&&!item.unCheckType" style="position: fixed;bottom:0upx;height: 50upx;width: 100%;z-index: 9;">
<view>
<view class="footer-btn footer-btn-two batchBtn">
<view class="btn btn-col btn1" @click="circulation()">拒绝</view>
<view class="btn btn-col1 btn2" @click="submit(1)">通过</view>
</view>
</view>
</view>
<view v-if="queryType==0&&item.checkType=='1'&&item.checkOperat=='1'&&!item.unCheckType" style="position: fixed;bottom:0upx;height: 50upx;width: 100%;z-index: 9;">
<view>
<view class="footer-btn">
<view class="btn" @click="saveHouse">确认</view>
</view>
</view>
</view>
<view v-if="queryType=='0'&&item.checkType=='1'&&item.checkOperat=='2'&&!item.unCheckType" style="position: fixed;bottom:0upx;height: 50upx;width: 100%;z-index: 9;">
<view>
<view class="footer-btn">
<view class="btn" @click="saveContract">确认上传</view>
</view>
</view>
</view>
<view v-if="queryType=='0'&&item.examineState=='4'&&item.unCheckType=='1'" style="position: fixed;bottom:0upx;height: 50upx;width: 100%;z-index: 9;">
<view v-if="item.unCheckOperat=='1'">
<view class="footer-btn">
<view class="btn" @click="checkOutHouse">确认退租</view>
</view>
</view>
<view v-if="item.unCheckOperat=='2'">
<view class="footer-btn footer-btn-two batchBtn">
<view class="btn btn-col btn1" @click="circulation()">拒绝</view>
<view class="btn btn-col1 btn2" @click="submit(1)">通过</view>
</view>
</view>
</view>
<view v-if="queryType=='0'&&item.examineState=='4'&&item.unCheckType==2" style="position: fixed;bottom:0upx;height: 50upx;width: 100%;z-index: 9;">
<view>
<view class="footer-btn footer-btn-two batchBtn">
<view class="btn btn-col btn1" @click="circulation()">拒绝</view>
<view class="btn btn-col1 btn2" @click="submit(1)">通过</view>
</view>
</view>
</view>
<uni-popup ref="popup" @change="show(arguments)" type="center" style="">
<view style="background: white;width: 80%;height: 540upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
<view style="color: #333;font-size: 30upx;font-weight: bold;padding: 10upx 0px;">
<text>审核内容:</text>
</view>
<view style="width: 100%;border: 1px solid #E5E5E5;margin-top: 20upx;padding: 20upx;height: 300upx;color: #666;border-radius: 10upx;">
<textarea style="width: 100%;height: 100%;" v-model="replyContent" placeholder="请输入审核内容"/>
</view>
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
<view class="btn btn-col" style="width:40%;margin-left:7%;margin-right: 6%;border-radius: 10upx;" @click="closeCirculation()">取消</view>
<view class="btn btn-col1" style="width:40%;border-radius: 10upx" @click="submit(2)">确定</view>
</view>
</view>
</uni-popup>
</view>
</view>
</template>
<script>
import {
greenHouseDetail,greenHouseExamine,getHouseType,getHouseTypes,addSelectedHouse,checkedHouse,houseCheckOut
} from '@/common/api.js';
import {
callbackRequest,
callbackRequestNoLoading ,
getStorage,
alertTip,
formatDate,
sureAlterTip,
convertImgToBase64,
vbPicture,
callPhone,wxSdk,uploadImg,
formatImgUrl
} from '@/common/util.js';
import UniPopup from "@/components/uni-popup/uni-popup.vue"
import YSteps from '@/components/Y-Steps/Y-Steps.vue'
export default {
components: {
UniPopup,
YSteps
},
data() {
return {
title:"租房审核",
callPhone:callPhone,
vbPicture:vbPicture,
formatImgUrl:formatImgUrl,
userInfo:getStorage('userInfo'),
formatDate:formatDate,
item: {},
id:0,
queryType:0,//0待审核进入1已审核进入
replyContent:'',
userId: getStorage('userInfo').id,
imgs:[],
showAlert:false,
userTypes:[],
houseType:[],
examineBatch:'',
examineButton:true,
process: [],
process2: [],//退租审核
chosenHouse:'请选择房源 >',
chosenHouseCost:'xxx',
houseInfo:{},
houseModel:[],
applyId:'',
submitFlag:true,
devicesList:[],
devicesList2:[],
dateRange:'',
waterValue:'',
powerValue:'',
gasValue:'',
devices:'',
imgs1: [],
imgsId1: [],
imgs2: [],
imgsId2: [],
imgs3: [],
imgsId3: [],
dateOut:'',
imgs4: [],
imgsId4: [],
imgs5: [],
imgsId5: [],
waterValueNow:'',
powerValueNow:'',
gasValueNow:'',
checkDeviceList:'',
imgs6: [],
imgsId6: [],
imgs7: [],
imgsId7: [],
imgs8: [],
imgsId8: [],
depositBackStates: [{ id: '0', name: '是' }, { id: '1', name: '否' }],
depositBack:'1',
isDeductionStates: [{ id: '0', name: '是' }, { id: '1', name: '否' }],
isDeduction:'1',
deductionReason:'',
}
},
onLoad(option) {
this.id = option.id;
this.title = option.title||"租房审核";
this.queryType = option.queryType||0;
this.examineBatch = option.examineBatch || 1;
this.getHouseTypes('houseType');
this.getHouseType('userType');
this.greenHouseDetail();
},
methods: {
//房屋类型
getHouseType(dataType){
let params = {
method: getHouseType,
data: {
dataType:dataType
}
};
callbackRequestNoLoading(params).then(res => {
res = res.data;
if (res.returnCode == 1) {
if(dataType == 'houseType'){
this.houseType = res.returnData || [];
}else{
this.userTypes = res.returnData || [];
}
} else {
}
});
},
// 人员类别
getHouseTypes(dataType){
let params = {
method: getHouseTypes,
data: {
dataType:dataType,
userId:getStorage('userInfo').userId,
}
};
callbackRequestNoLoading(params).then(res => {
res = res.data;
if (res.returnCode == 1) {
if(dataType == 'houseType'){
this.houseType = res.returnData || [];
}else{
this.userTypes = res.returnData || [];
}
} else {
}
});
},
formatHouseType(houseType){
for(let i=0;i<this.houseType.length;i++){
let obj = this.houseType[i];
if(obj.id == houseType){
return obj.name;
}
}
},
formatUserType(userType){
for(let i=0;i<this.userTypes.length;i++){
let obj = this.userTypes[i];
if(obj.id == userType){
return obj.name;
}
}
},
//租房申请详情
greenHouseDetail(){
let _this = this;
let params = {
"method": greenHouseDetail,
"data":{
id: _this.id,
userId:getStorage('userInfo').userId,
}
};
callbackRequest(params).then(res => {
res = res.data;
if ( res.returnCode === "1"){
_this.item = res.returnData[0];
_this.item.roomInspection = _this.item.roomInspection.split(',')
_this.item.idCardImg = _this.item.idCardImg.split(',')//身份证
_this.item.attachment = _this.item.attachment.split(',')//附件
if(_this.item.photo){
_this.item.photo = _this.item.photo.split(',')
}
if(_this.item.contractPhoto){
_this.item.contractPhoto = _this.item.contractPhoto.split(',')
}
if(_this.item.checkInPhoto){
_this.item.checkInPhoto = _this.item.checkInPhoto.split(',')
}
if(_this.item.checkOutPhoto){
_this.item.checkOutPhoto = _this.item.checkOutPhoto.split(',')
}
if(_this.item.propertyPhoto){
_this.item.propertyPhoto = _this.item.propertyPhoto.split(',')
}
if(_this.item.waterSettlePhoto){
_this.item.waterSettlePhoto = _this.item.waterSettlePhoto.split(',')
}
if(_this.item.powerSettlePhoto){
_this.item.powerSettlePhoto = _this.item.powerSettlePhoto.split(',')
}
if(_this.item.gasSettlePhoto){
_this.item.gasSettlePhoto = _this.item.gasSettlePhoto.split(',')
}
if(_this.item.ancillaryFacilitieList){
_this.devicesList = _this.item.ancillaryFacilitieList
}
if(_this.item.deviceList){
_this.item.deviceList = _this.item.deviceList.split(',')
if(_this.item.deviceList.length>0){
_this.devicesList = []
_this.item.deviceList.forEach(item=>{
let i = _this.item.ancillaryFacilitieList.findIndex(obj => obj.id == item)
if(i>-1){
_this.devicesList.push(_this.item.ancillaryFacilitieList[i])
}
})
}
}
if(_this.item.checkDeviceList){
_this.item.checkDeviceList = _this.item.checkDeviceList.split(',')
if(_this.item.checkDeviceList.length>0){
_this.devicesList2 = []
_this.item.checkDeviceList.forEach(item=>{
let i = _this.item.ancillaryFacilitieList.findIndex(obj => obj.id == item)
if(i>-1){
_this.devicesList2.push(_this.item.ancillaryFacilitieList[i])
}
})
}
}
// if(_this.item.checkDeviceList){
// _this.item.checkDeviceList = _this.item.checkDeviceList.split(',')
// if(_this.item.checkDeviceList.length>0){
// _this.item.checkDeviceList.forEach(item=>{
// let i = _this.item.ancillaryFacilitieList.findIndex(obj => obj.id == item)
// if(i>-1){
// _this.item.deviceList.push(_this.item.ancillaryFacilitieList[i])
// }
// })
// }
// }
// if(_this.item.checkDeviceList.length>0){
// _this.item.deviceList=_this.item.deviceList.map((item,index)=>{
// let i = this.checkDeviceList.findIndex(obj => obj == item.id)
// })
// }
let details = res.returnData[0].detail||[]
for(let i=0;i<details.length;i++){
let obj = details[i];
// if(_this.examineBatch == obj.examineBatch){
// setTimeout(()=>{_this.examineButton = false;},400)
// // _this.examineButton = false;
// }
}
// if(_this.item.examineState==0&&_this.examineBatch==_this.item.examineBatch){
// _this.examineButton = true;
// }
_this.process=[];
// console.log(obj.examineState!=0)
if(_this.process.length==0){
let pObj0 = {
date: '提交人',
info: _this.item.applyUserName+' 发起租房申请',
time: _this.item.applyTime
}
_this.process.push(pObj0);
}
if(details.length>0){
for(let i=0;i<details.length;i++){
let pObj = {
date: details[i].batchDescription,
info: details[i].examineState==1?"同意":details[i].examineState==3?"同意":"拒绝 "+(details[i].examineOpinion||''),
time: details[i].examineTime
}
_this.process.push(pObj);
}
}
//退租审核流程
_this.process2=[];
if(_this.process2.length==0){
let pObj0 = {
date: '提交人',
info: _this.item.applyUserName+' 发起退租申请',
time: _this.item.applyTime
}
_this.process2.push(pObj0);
}
let details2 = res.returnData[0].unDetail||[]
if(details2.length>0){
for(let i=0;i<details2.length;i++){
let pObj = {
date: details2[i].batchDescription,
info: details2[i].examineState==1?"同意":details2[i].examineState==3?"同意":"拒绝 "+(details2[i].examineOpinion||''),
time: details2[i].examineTime
}
_this.process2.push(pObj);
}
}
}
})
},
//在线选房跳转
houseSelect(id,houseType){
uni.navigateTo({
url: '/pages/house/house-select?id=' + this.id+"&houseType="+this.item.houseType
});
},
//房屋经办人-确认选房
saveHouse(){
// console.log(this.houseInfo)
if(!this.item.houseId){
if (JSON.stringify(this.houseInfo) == "{}") {
alertTip('请先选择房源');
return false;
}
}
if(this.item.houseId){
if (!this.dateRange) {
alertTip('请选择合同期限');
return false;
}
if (this.imgsId1.length==0) {
alertTip('请上传合同图片');
return false;
}
}
if(!this.submitFlag){
return false;
}
this.submitFlag=false;
uni.showModal({
title: '确认',
content: '请确认是否选择该房源!',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: res => {
if (res.confirm) {
console.log(this.applyId)
console.log(this.houseInfo)
let data = {
method: checkedHouse,
data: {
userId:getStorage('userInfo').userId,
applyId:this.id,
operType:1,//1 选房 2.上传合同
houseId:this.houseInfo.UUID,
}
};
console.log(data,"data");
callbackRequest(data).then(res => {
res = res.data;
if (res.returnCode == 1) {
console.log(res);
this.submitFlag = true;
alertTip(res.returnMsg);
// this.goPageA()
setTimeout(()=>{
this.submit(1)
},800)
} else {
alertTip(res.returnMsg);
this.submitFlag = true;
}
});
} else if (res.cancel) {
this.submitFlag = true;
}
}
});
},
//房屋经办人-上传合同
saveContract(){
if (!this.dateRange) {
alertTip('请选择合同期限');
return false;
}
if (this.imgsId1.length==0) {
alertTip('请上传合同图片');
return false;
}
if (this.imgsId2.length==0) {
alertTip('请上传缴费凭证');
return false;
}
if (this.imgsId3.length==0) {
alertTip('请上传入住房间照片');
return false;
}
if (!this.waterValue) {
alertTip('请输入水表数值');
return false;
}
if (!this.powerValue) {
alertTip('请输入电表数值');
return false;
}
if (!this.gasValue) {
alertTip('请输入燃气表数值');
return false;
}
if(!this.submitFlag){
return false;
}
this.submitFlag=false;
let data = {
method: checkedHouse,
data: {
userId:getStorage('userInfo').userId,
applyId:this.id,
operType:2,//1 选房 2.上传合同
houseId:this.item.houseId,
contractPhoto:this.imgsId1.join(),
photo:this.imgsId2.join(),
checkInPhoto:this.imgsId3.join(),
contractStartTime:this.dateRange[0],
contractEndTime:this.dateRange[1],
waterValue:this.waterValue,
powerValue:this.powerValue,
gasValue:this.gasValue,
deviceList:this.devices,
}
};
console.log(data,"data");
callbackRequest(data).then(res => {
res = res.data;
if (res.returnCode == 1) {
console.log(res);
this.submitFlag = true;
alertTip(res.returnMsg);
// this.goPageA()
setTimeout(()=>{
this.submit(1)
},800)
} else {
alertTip(res.returnMsg);
this.submitFlag = true;
}
});
},
//退租
checkOutHouse(){
if (!this.dateOut) {
alertTip('请选择退房时间');
return false;
}
if (this.imgsId4.length==0) {
alertTip('请上传退租时房间照片');
return false;
}
if (this.imgsId5.length==0) {
alertTip('请上传物业费结清凭证');
return false;
}
if (!this.waterValueNow) {
alertTip('请输入当前水表数值');
return false;
}
if (this.imgsId6.length==0) {
alertTip('请上传水费结清凭证');
return false;
}
if (!this.powerValueNow) {
alertTip('请输入当前电表数值');
return false;
}
if (this.imgsId7.length==0) {
alertTip('请上传电费结清凭证');
return false;
}
if (!this.gasValueNow) {
alertTip('请输入当前燃气表数值');
return false;
}
if (this.imgsId8.length==0) {
alertTip('请上传燃气费结清凭证');
return false;
}
if(!this.submitFlag){
return false;
}
this.submitFlag=false;
let data = {
method: houseCheckOut,
data: {
userId:getStorage('userInfo').userId,
applyId:this.id,
status: '5',
houseId:this.item.houseId,
checkOutDate:this.dateOut, //退房时间
checkOutPhoto:this.imgsId4.join(), //入住后照片
propertyPhoto:this.imgsId5.join(), //物业费结清凭证
waterValueNow:this.waterValueNow, //当前水表数值
powerValueNow:this.powerValueNow, //当前电表数值
gasValueNow:this.gasValueNow, //当前燃气数值
waterSettlePhoto:this.imgsId6.join(), //水费结清凭证
powerSettlePhoto:this.imgsId7.join(), //电费结清凭证
gasSettlePhoto:this.imgsId8.join(), //燃气费结清凭证
checkDeviceList:this.checkDeviceList, //附属设备清单是否完好
depositBack:this.depositBack, //押金是否退还 1 是 2 否
isDeduction:this.isDeduction, //是否抵扣 1 是 2 否
deductionReason:this.deductionReason //抵扣说明
}
};
// console.log(data,"data");
callbackRequest(data).then(res => {
res = res.data;
if (res.returnCode == 1) {
this.submitFlag = true;
alertTip(res.returnMsg);
setTimeout(()=>{
this.submit(1)
},800)
} else {
alertTip(res.returnMsg);
this.submitFlag = true;
}
});
},
//押金是否退还 radio选择
changeDepositBack(e){
this.depositBack = e.detail.value;
},
//是否抵扣 radio选择
changeIsDeduction(e){
this.isDeduction = e.detail.value;
},
//设备清单
selectionChange(e) {
console.log(e.detail.index)
let arrList = []
// let arrIdsList = []
let selectedIndexs = [] // 选择的下标数组
selectedIndexs = e.detail.index
// // 将数组中的值作为table表格数组的下标来获取对应的当前行数据
selectedIndexs.map(i => {
arrList.push(this.devicesList[i].id)
})
console.log(arrList)
this.devices = arrList.join(',')
},
//退租检查设备清单
selectionChangeOut(e) {
console.log(e.detail.index)
let arrList = []
// let arrIdsList = []
let selectedIndexs = [] // 选择的下标数组
selectedIndexs = e.detail.index
// // 将数组中的值作为table表格数组的下标来获取对应的当前行数据
selectedIndexs.map(i => {
arrList.push(this.devicesList[i].id)
})
console.log(arrList)
this.checkDeviceList = arrList.join(',')
},
//拒绝弹窗
circulation(){
this.$refs.popup.open();
},
//打开拒绝原因弹窗
show(val){
this.examineButton = !val[0].show;
},
//关闭弹窗
closeCirculation(){
this.$refs.popup.close()
},
//同意拒绝
submit(examineState){
this.examineButton = false;
//examineState 1通过2不通过
let params = {
"method": greenHouseExamine,
"data":{
applyId: this.item.id,
houseId: this.item.houseId || '',
userId:getStorage('userInfo').id,
userName:getStorage('userInfo').userName,
isUpload:'',
examineState:examineState+'',
examineOpinion:this.replyContent,
examineBatch:this.examineBatch+'',
checkId:this.item.checkId,
checkSort:this.item.checkNode,
checkType:this.item.checkType,
checkOperate:this.item.checkOperat,
checkName:this.item.checkName
}
};
if(this.item.unCheckType&&this.item.unCheckType!=""){
params.data.checkId=this.item.unCheckId,
params.data.checkSort=this.item.unCheckSort,
params.data.checkType=this.item.unCheckType,
params.data.checkOperate=this.item.unCheckOperat,
params.data.checkName=this.item.unCheckName,
params.data.isLease="2"
}
callbackRequest(params).then(res => {
res = res.data;
if (res.returnCode == 1) {
alertTip(res.returnMsg);
this.queryType=1
this.closeCirculation();
this.greenHouseDetail();
// uni.navigateBack({
// delta: 1
// });
} else {
alertTip(res.returnMsg);
}
})
},
//合同照片
async chooseImg() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs1.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs1.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs1.push(base64);
_this.imgsId1.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs1
.push(
base64
);
_this
.imgsId1
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除合同照片
removeImg(index) {
this.imgs1.splice(index, 1);
this.imgsId1.splice(index, 1);
},
//消费凭证
async chooseImg2() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs2.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs2.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
// console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs2.push(base64);
_this.imgsId2.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
// console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs2
.push(
base64
);
_this
.imgsId2
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除消费凭证
removeImg2(index) {
this.imgs2.splice(index, 1);
this.imgsId2.splice(index, 1);
},
//入住照片
async chooseImg3() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs3.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs3.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
// console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs3.push(base64);
_this.imgsId3.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
// console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs3
.push(
base64
);
_this
.imgsId3
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除入住照片
removeImg3(index) {
this.imgs3.splice(index, 1);
this.imgsId3.splice(index, 1);
},
//退租照片
async chooseImg4() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs4.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs4.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
// console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs4.push(base64);
_this.imgsId4.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
// console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs4
.push(
base64
);
_this
.imgsId4
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除退租照片
removeImg4(index) {
this.imgs4.splice(index, 1);
this.imgsId4.splice(index, 1);
},
//费用结清凭证
async chooseImg5() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs5.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs5.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
// console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs5.push(base64);
_this.imgsId5.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
// console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs5
.push(
base64
);
_this
.imgsId5
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除费用结清凭证
removeImg5(index) {
this.imgs5.splice(index, 1);
this.imgsId5.splice(index, 1);
},
//水费结清凭证
async chooseImg6() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs6.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs6.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
// console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs6.push(base64);
_this.imgsId6.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
// console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs6
.push(
base64
);
_this
.imgsId6
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除水费结清凭证
removeImg6(index) {
this.imgs6.splice(index, 1);
this.imgsId6.splice(index, 1);
},
//电费结清凭证
async chooseImg7() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs7.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs7.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
// console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs7.push(base64);
_this.imgsId7.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
// console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs7
.push(
base64
);
_this
.imgsId7
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除电费结清凭证
removeImg7(index) {
this.imgs7.splice(index, 1);
this.imgsId7.splice(index, 1);
},
//燃气费结清凭证
async chooseImg8() {
let chec = 0;
let sty = [];
let _this = this;
uni.showActionSheet({
itemList: ['拍照', '相册'],
success: function(resp) {
chec = resp.tapIndex;
if (chec == 0) {
sty = ['camera']; //从相册相机选择
} else {
sty = ['album']; //从相册相机选择
}
uni.chooseImage({
count: 2,
sizeType: ['compressed'],
sourceType: sty,
quality: 1,
success: async function(res) {
let resData = res.tempFilePaths;
for (let i = 0; i < resData.length; i++) {
if (_this.imgs8.length > 3) {
break;
}
uni.getImageInfo({
src: resData[i],
success: async (path) => {
convertImgToBase64(path.path,
async function(base64) {
if (_this.imgs8.length < 3) {
// _this.imgs.push(base64);
uni.showLoading({
title: '图片上传中'
})
let blength = base64.length;
let glength = 7500;
// console.log("base64:",base64)
if (blength <=
glength) {
let uploadParam = {
base64: base64,
userId: getStorage('userInfo').userId +i,
groupEnd: '1'
}
await uploadImg(uploadParam)
.then(
resu => {
resu =resu.data;
uni.hideLoading();
if (resu.returnCode !=1) {
alertTip(resu.returnMsg);
} else {
_this.imgs8.push(base64);
_this.imgsId8.push(resu.returnData +".jpg");
}
});
} else {
let fnum =parseInt(blength /glength);
for (let j =1; j <fnum +1; j++) {
if (j ==fnum) {
let groupBase =base64.slice((j -1) *glength);
// console.log(groupBase.length,"groupBaselength");
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '1'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {
_this
.imgs8
.push(
base64
);
_this
.imgsId8
.push(
resu
.returnData +
".jpg"
);
} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
} else {
let groupBase =
base64
.slice(
(j -
1) *
glength,
glength *
j
);
let uploadParam = {
base64: groupBase,
userId: getStorage(
'userInfo'
)
.userId +
i,
groupEnd: '0'
}
await uploadImg
(
uploadParam)
.then(
resu => {
resu =
resu
.data;
if (resu
.returnCode ==
1
) {} else {
uni
.hideLoading();
alertTip
(resu
.returnMsg
);
return;
}
}
);
}
}
uni
.hideLoading();
}
}
});
},
});
}
}
});
},
fail: function(resp) {
console.log(resp.errMsg);
}
});
},
//删除燃气费结清凭证
removeImg8(index) {
this.imgs8.splice(index, 1);
this.imgsId8.splice(index, 1);
},
}
}
</script>
<style lang="scss">
@import '@/static/css/common.scss';
.batchBtn{
position: absolute;
display: flex;
justify-content: space-between;
padding: 10upx 40upx;
.btn1{
background: #C1EFEA;
color: #09AFA5;
width: 40%;
border-radius: 50upx;
}
.btn2{
background: linear-gradient( 90deg, #50CBA1 0%, #06AEA6 100%), #C1EFEA;
color: #fff;
width: 40%;
border-radius: 50upx;
}
}
.img-box {
overflow: hidden;
padding-top: 20rpx;
padding-bottom: 10rpx;
.img-item {
float: left;
width: 200upx;
height: 200upx;
border: 1px solid #ddd;
margin: 0 22rpx 20upx 0upx;
position: relative;
box-sizing: border-box;
.img {
display: block;
width: 100%;
height: 100%;
}
.remove-btn {
position: absolute;
top: -18upx;
right: -18upx;
width: 44upx;
height: 44upx;
z-index: 2;
}
}
.upload-btn {
.img {
width: 60upx;
height: 60upx;
margin: unset;
}
}
}
.details{
font-size: 26upx;
// height: 550upx;
background: white;
margin: 20upx;
border-radius: 15upx;
padding-bottom:15rpx;
position: relative;
.detail_header {
border-bottom: #f8f8f8 5upx solid;
height: 90upx;
line-height: 90upx;
margin: 15upx;
border-radius: 10upx;
.blueSign {
height: 28upx;
width: 5upx;
background: #00c277;
display: inline-block;
margin-left: 20upx;
}
.font-tilte {
font-weight:bold;
margin-left: 20upx;
}
}
.detail_msg {
margin-left: 20upx;
border-radius: 10upx;
.info-item{
border-bottom:1px solid #f8f8f8;
padding:20upx 10upx;
line-height: 50upx;
.label{
display:inline-block;
width:160upx;
font-size:28upx;
color:#333;
font-weight:bold;
}
}
.status {
.infoSpan{
color: #00c277;
}
.infoSpan2{
color: red;
}
}
.img-list {
image{
width: 200upx;
height: 200upx;
margin:20upx 20upx 0 0;
}
}
}
}
.form-item {
overflow: hidden;
border-bottom: 1px solid #eee;
padding: 30upx 20upx;
.label {
float: left;
width: 190upx;
font-size: 28upx;
color: #333;
font-weight: bold;
line-height: 50upx;
}
.ipt-box {
margin-left: 200upx;
.areaBtn{
font-size: 24upx;
width: 100upx;
height: 60upx;
line-height: 65upx;
text-align: center;
background: linear-gradient( 90deg, #50CBA1 0%, #06AEA6 100%), #C1EFEA;
border-radius: 15upx;
color: #fff;
margin-right: 20upx;
}
input {
width: 100%;
height: 50upx;
line-height: 50upx;
font-size: 26upx;
color: #666;
}
}
.select {
.arrow {
float: right;
width: 16upx;
height: 29upx;
margin-top: 10upx;
}
.picker {
height: 50upx;
line-height: 50upx;
font-size: 26upx;
color: #666;
margin-left: 10upx;
}
}
}
.common-shade{
position:fixed;
top:0;
left:0;
width:100%;
height:100vh;
background: rgba(0,0,0,0.7);
z-index:9999;
}
.box {
display: flex;
display: -webkit-flex;
}
.box-row-reverse {
flex-direction: row;
}
/*上下排列*/
.box-column {
flex-direction: column;
}
/*上下排列*/
.box-left {
justify-content: flex-start;
}
/*居右*/
.box-right {
justify-content: flex-end;
}
/*居左*/
.box-center {
justify-content: center;
}
/*居中*/
.box-between {
justify-content: space-between;
}
/*两端对齐*/
.box-align-center {
align-items: center;
}
.box-wrap {
flex-wrap: wrap;
}
</style>