Browse Source

强制清退记录

master
wangyx 2 weeks ago
parent
commit
733c77f47b
  1. 23
      pages/api.js
  2. 2
      pagesA/checkout/list/list.vue
  3. 127
      pagesA/force/index/index.vue
  4. 34
      pagesA/force/list/list.vue

23
pages/api.js

@ -209,3 +209,26 @@ export function handleRepair(data) {
data: data,
});
}
// 查询退房记录列表
export function listCheckOutRec(pageNum, pageSize, requestBody) {
return request({
url: "/apartment/manager/listCheckOutRec?pageNum=" + pageNum + "&pageSize=" + pageSize,
method: "post",
data: requestBody,
});
}
// 退房记录详情
export function getRecCheckOutInfo(id) {
return request({
url: "/apartment/manager/checkOutRecDetail?checkOutRecId=" + id,
method: "get",
});
}
// 强制清退记录修改
export function updateForceEvictionRecord(data) {
return request({
url: `/mz/forcedeviction`,
method: "put",
params: data,
});
}

2
pagesA/checkout/list/list.vue

@ -79,8 +79,6 @@ export default {
async fetchData() {
try {
const res = await listCheckout(this.form);
console.log(res, "res");
const tempList = res.rows || [];
let page = this.form.pageNum;
if (page === 1) {

127
pagesA/force/index/index.vue

@ -3,7 +3,7 @@
<view class="top-bg"></view>
<view class="container">
<u-form :model="form" ref="uForm" label-width="90">
<view class="info-card">
<!-- <view class="info-card">
<u-form-item prop="idCard">
<u-search
placeholder="请输入身份证号"
@ -17,33 +17,59 @@
@clickIcon="handleQuery"
></u-search>
</u-form-item>
</view>
</view> -->
<view class="cont" v-if="showInfo">
<view class="info-card info-item">
<u-form-item label="姓名" prop="name" required borderBottom labelStyle="{color:red;}">
<text style="text-align: right">{{ baseInfo.graduateName }}</text>
<u-form-item label="房间" prop="room" borderBottom>
<text style="text-align: right"
>{{ baseInfo.buildingName || "" }}{{ baseInfo.unitName || ""
}}{{ baseInfo.houseName || ""
}}{{ baseInfo.roomTypeName || "" }}</text
>
<!-- <u-input
v-model="baseInfo.graduateName"
placeholder="请输入姓名"
v-model="roomAllPath"
placeholder="请输入房间"
border="none"
input-align="right"
:disabled="true"
/> -->
</u-form-item>
<u-form-item label="房间" prop="room" required borderBottom>
<text style="text-align: right">{{ roomAllPath }}</text>
<u-form-item
label="姓名"
prop="name"
borderBottom
labelStyle="{color:red;}"
>
<text style="text-align: right">{{
baseInfo.graduateName || ""
}}</text>
<!-- <u-input
v-model="roomAllPath"
placeholder="请输入房间"
v-model="baseInfo.graduateName"
placeholder="请输入姓名"
border="none"
input-align="right"
:disabled="true"
/> -->
</u-form-item>
<u-form-item label="手机号" prop="phone" required borderBottom>
<text style="text-align: right">{{ baseInfo.telephone }}</text>
<!-- 性别 -->
<u-form-item
label="性别"
prop="gender"
borderBottom
labelStyle="{color:red;}"
>
<text style="text-align: right">{{
baseInfo.gender == 1 ? "男" : baseInfo.gender == 2 ? "女" : ""
}}</text></u-form-item
>
<u-form-item label="手机号" prop="phone" borderBottom>
<text style="text-align: right">{{
baseInfo.telephone || ""
}}</text>
<!-- <u-input
v-model="baseInfo.telephone"
@ -151,7 +177,13 @@
</template>
<script>
import { uploadImage, getResidentInfo, forceRelease } from "../../../pages/api";
import {
uploadImage,
getResidentInfo,
forceRelease,
getRecCheckOutInfo,
updateForceEvictionRecord,
} from "../../../pages/api";
export default {
data() {
return {
@ -199,9 +231,25 @@ export default {
}`;
},
},
onLoad(options) {
this.form.idCard = options.idCard;
this.form.checkOutRecId = options.checkOutRecId;
this.getRecCheckOutInfo(options.checkOutRecId);
},
methods: {
getRecCheckOutInfo(checkOutRecId) {
getRecCheckOutInfo(checkOutRecId).then((res) => {
this.baseInfo = res.data;
if (this.baseInfo) {
this.showInfo = true;
}
this.baseInfo.roomId = res.data.mzCheckOutRec.roomId;
this.baseInfo.checkOutRecId = checkOutRecId;
this.forceCheckoutDesc = res.data.forcedEvictionRecord.content;
this.fileList = res.data.forcedEvictionRecord.attrList;
});
},
handleQuery() {
console.log("查询参数:", this.form);
getResidentInfo({
idCard: this.form.idCard,
}).then((res) => {
@ -303,17 +351,31 @@ export default {
this.showProblemTypePicker = false;
},
submit() {
const params = {
// idCard: this.baseInfo.idCard,
chooseRoomRecId: this.baseInfo.chooseRecId,
checkOutType: 1, //0退1退
// questionType: this.form.problemTypeValue,
content: this.forceCheckoutDesc,
imageList: this.fileList, //退
};
console.log(params, "params");
if (
this.baseInfo.forcedEvictionRecord &&
this.baseInfo.forcedEvictionRecord.id
) {
//
let params = {
...this.baseInfo.forcedEvictionRecord,
content: this.forceCheckoutDesc,
attrList: this.fileList,
id: this.baseInfo.forcedEvictionRecord.id,
checkOutRecId: this.baseInfo.checkOutRecId,
};
this.updateForceEvictionRecord(params);
} else {
const params = {
// idCard: this.baseInfo.idCard,
checkOutRecId: Number(this.baseInfo.checkOutRecId),
checkOutType: 1, //0退1退
// questionType: this.form.problemTypeValue,
content: this.forceCheckoutDesc,
attrList: this.fileList, //退
};
this.handleTempSave(params);
this.handleTempSave(params);
}
},
handleTempSave(params) {
forceRelease(params).then((res) => {
@ -335,6 +397,16 @@ export default {
}
});
},
updateForceEvictionRecord(params) {
updateForceEvictionRecord(params).then((res) => {
if (res.code === 200) {
uni.showToast({
title: res.msg,
icon: "success",
});
}
});
},
},
};
</script>
@ -365,7 +437,7 @@ export default {
margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx 0 #e6f6fd;
}
.info-item{
.info-item {
padding: 0 34rpx;
}
@ -478,7 +550,10 @@ export default {
margin-top: 8rpx;
}
::v-deep .u-form-item .u-form-item__body__left .u-form-item__body__left__content__label {
::v-deep
.u-form-item
.u-form-item__body__left
.u-form-item__body__left__content__label {
color: #68758b !important;
font-size: 28rpx;
}

34
pagesA/force/list/list.vue

@ -18,15 +18,20 @@
mode="aspectFill"
></image>
<view class="room-info">
<view class="room-title">{{ item.roomNamePath }}</view>
<view class="room-title">{{
`${item.buildingName}${item.unitName}${item.houseName}${item.roomTypeName}`
}}</view>
<view class="room-user">
<text>{{ item.graduateName }}</text>
<text class="gender">{{ item.gender == 1 ? "男" : "女" }}</text>
<text class="phone">{{ maskPhoneNumber(item.telephone) }}</text>
</view>
<view class="room-date">{{ item.checkInDate }}{{ item.checkOutDate }}</view>
<!-- <view class="room-date"
>{{ item.checkInDate }}{{ item.checkOutDate }}</view
> -->
</view>
</view>
</view>
<view style="text-align: center" v-if="isLoading">加载中...</view>
<!-- <view v-else style="text-align: center">没有更多了~</view> -->
@ -36,7 +41,7 @@
</template>
<script>
import { listCheckout } from "../../../pages/api";
import { listCheckOutRec } from "@/pages/api";
export default {
data() {
return {
@ -46,6 +51,7 @@ export default {
form: {
pageNum: 1,
pageSize: 10,
checkOutType: 1,
},
listData: [],
};
@ -78,14 +84,17 @@ export default {
//
async fetchData() {
try {
const res = await listCheckout(this.form);
const res = await listCheckOutRec(
this.form.pageNum,
this.form.pageSize,
this.form
);
console.log(res, "res");
const tempList = res.rows || [];
let page = this.form.pageNum;
if (page === 1) {
// this.listData = tempList;
this.listData = [];
this.listData = tempList;
} else {
if (tempList.length > 0) {
this.listData = [...this.listData, ...tempList];
@ -109,18 +118,9 @@ export default {
}
},
goDetail(item) {
uni.setStorageSync("checkoutDetail", {
idCard: item.graduateIdCard,
roomNamePath: item.roomNamePath, //
graduateName: item.graduateName, //
gender: item.gender, //
telephone: item.telephone, //
checkInDate: item.checkInDate,
checkOutDate: item.checkOutDate, //
houseTypeCoverImg: item.coverImg,
});
console.log(item,'item');
uni.navigateTo({
url: `/pagesA/force/index/index?houseId=${item.houseId}&idCard=${item.graduateIdCard}`,
url: `/pagesA/force/index/index?checkOutRecId=${item.checkOutRecId}&idCard=${item.idCard}`,
});
},
},

Loading…
Cancel
Save