Browse Source

强制清退记录

master
wangyx 2 weeks ago
parent
commit
733c77f47b
  1. 23
      pages/api.js
  2. 2
      pagesA/checkout/list/list.vue
  3. 111
      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, 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() { async fetchData() {
try { try {
const res = await listCheckout(this.form); const res = await listCheckout(this.form);
console.log(res, "res");
const tempList = res.rows || []; const tempList = res.rows || [];
let page = this.form.pageNum; let page = this.form.pageNum;
if (page === 1) { if (page === 1) {

111
pagesA/force/index/index.vue

@ -3,7 +3,7 @@
<view class="top-bg"></view> <view class="top-bg"></view>
<view class="container"> <view class="container">
<u-form :model="form" ref="uForm" label-width="90"> <u-form :model="form" ref="uForm" label-width="90">
<view class="info-card"> <!-- <view class="info-card">
<u-form-item prop="idCard"> <u-form-item prop="idCard">
<u-search <u-search
placeholder="请输入身份证号" placeholder="请输入身份证号"
@ -17,33 +17,59 @@
@clickIcon="handleQuery" @clickIcon="handleQuery"
></u-search> ></u-search>
</u-form-item> </u-form-item>
</view> </view> -->
<view class="cont" v-if="showInfo"> <view class="cont" v-if="showInfo">
<view class="info-card info-item"> <view class="info-card info-item">
<u-form-item label="姓名" prop="name" required borderBottom labelStyle="{color:red;}"> <u-form-item label="房间" prop="room" borderBottom>
<text style="text-align: right">{{ baseInfo.graduateName }}</text> <text style="text-align: right"
>{{ baseInfo.buildingName || "" }}{{ baseInfo.unitName || ""
}}{{ baseInfo.houseName || ""
}}{{ baseInfo.roomTypeName || "" }}</text
>
<!-- <u-input <!-- <u-input
v-model="baseInfo.graduateName" v-model="roomAllPath"
placeholder="请输入姓名" placeholder="请输入房间"
border="none" border="none"
input-align="right" input-align="right"
:disabled="true" :disabled="true"
/> --> /> -->
</u-form-item> </u-form-item>
<u-form-item label="房间" prop="room" required borderBottom> <u-form-item
<text style="text-align: right">{{ roomAllPath }}</text> label="姓名"
prop="name"
borderBottom
labelStyle="{color:red;}"
>
<text style="text-align: right">{{
baseInfo.graduateName || ""
}}</text>
<!-- <u-input <!-- <u-input
v-model="roomAllPath" v-model="baseInfo.graduateName"
placeholder="请输入房间" placeholder="请输入姓名"
border="none" border="none"
input-align="right" input-align="right"
:disabled="true" :disabled="true"
/> --> /> -->
</u-form-item> </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 <!-- <u-input
v-model="baseInfo.telephone" v-model="baseInfo.telephone"
@ -151,7 +177,13 @@
</template> </template>
<script> <script>
import { uploadImage, getResidentInfo, forceRelease } from "../../../pages/api"; import {
uploadImage,
getResidentInfo,
forceRelease,
getRecCheckOutInfo,
updateForceEvictionRecord,
} from "../../../pages/api";
export default { export default {
data() { data() {
return { return {
@ -199,9 +231,25 @@ export default {
}`; }`;
}, },
}, },
onLoad(options) {
this.form.idCard = options.idCard;
this.form.checkOutRecId = options.checkOutRecId;
this.getRecCheckOutInfo(options.checkOutRecId);
},
methods: { 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() { handleQuery() {
console.log("查询参数:", this.form);
getResidentInfo({ getResidentInfo({
idCard: this.form.idCard, idCard: this.form.idCard,
}).then((res) => { }).then((res) => {
@ -303,17 +351,31 @@ export default {
this.showProblemTypePicker = false; this.showProblemTypePicker = false;
}, },
submit() { submit() {
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 = { const params = {
// idCard: this.baseInfo.idCard, // idCard: this.baseInfo.idCard,
chooseRoomRecId: this.baseInfo.chooseRecId, checkOutRecId: Number(this.baseInfo.checkOutRecId),
checkOutType: 1, //0退1退 checkOutType: 1, //0退1退
// questionType: this.form.problemTypeValue, // questionType: this.form.problemTypeValue,
content: this.forceCheckoutDesc, content: this.forceCheckoutDesc,
imageList: this.fileList, //退 attrList: this.fileList, //退
}; };
console.log(params, "params");
this.handleTempSave(params); this.handleTempSave(params);
}
}, },
handleTempSave(params) { handleTempSave(params) {
forceRelease(params).then((res) => { 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> </script>
@ -478,7 +550,10 @@ export default {
margin-top: 8rpx; 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; color: #68758b !important;
font-size: 28rpx; font-size: 28rpx;
} }

34
pagesA/force/list/list.vue

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