|
|
@ -1,3 +1,4 @@ |
|
|
|
import { detail } from '@/api/mz/contract'; |
|
|
|
<template> |
|
|
|
<view class="checkout-detail-bg"> |
|
|
|
<!-- 房间图片 --> |
|
|
@ -8,14 +9,21 @@ |
|
|
|
></image> |
|
|
|
<!-- 基本信息卡片 --> |
|
|
|
<view class="info-card"> |
|
|
|
<view class="room-title">5号楼1单元101 房间1</view> |
|
|
|
<view class="info-row"><text class="label">居住人</text>王静</view> |
|
|
|
<view class="info-row"><text class="label">性别</text>女</view> |
|
|
|
<view class="room-title">{{ info.roomNamePath }}</view> |
|
|
|
<view class="info-row" |
|
|
|
><text class="label">联系电话</text>187****0001</view |
|
|
|
><text class="label">居住人</text>{{ info.graduateName }}</view |
|
|
|
> |
|
|
|
<view class="info-row" |
|
|
|
><text class="label">居住日期</text>2025-04-04 至 2025-05-06</view |
|
|
|
><text class="label">性别</text |
|
|
|
>{{ info.gender == 1 ? "男" : "女" }}</view |
|
|
|
> |
|
|
|
<view class="info-row" |
|
|
|
><text class="label">联系电话</text>{{ info.telephone }}</view |
|
|
|
> |
|
|
|
<view class="info-row" |
|
|
|
><text class="label">居住日期</text>{{ info.startDate }}至{{ |
|
|
|
info.checkOutDate |
|
|
|
}}</view |
|
|
|
> |
|
|
|
</view> |
|
|
|
<!-- 设备检查 --> |
|
|
@ -49,7 +57,7 @@ |
|
|
|
<view class="meter-row"> |
|
|
|
<text class="meter-label">水表数</text> |
|
|
|
<u-input |
|
|
|
v-model="waterMeter" |
|
|
|
v-model="waterMeterValue" |
|
|
|
type="digit" |
|
|
|
placeholder="请输入水表数" |
|
|
|
border="none" |
|
|
@ -58,7 +66,7 @@ |
|
|
|
<view class="meter-row"> |
|
|
|
<text class="meter-label">电表数</text> |
|
|
|
<u-input |
|
|
|
v-model="electricMeter" |
|
|
|
v-model="energyMeterValue" |
|
|
|
type="digit" |
|
|
|
placeholder="请输入电表数" |
|
|
|
border="none" |
|
|
@ -69,8 +77,8 @@ |
|
|
|
<view class="section-card"> |
|
|
|
<view class="section-title">其他说明</view> |
|
|
|
<u-textarea |
|
|
|
v-model="value" |
|
|
|
:formatter="formatter" |
|
|
|
v-model="facilitiesCheckDesc" |
|
|
|
|
|
|
|
ref="textarea" |
|
|
|
placeholder="请输入内容(不超过500字)" |
|
|
|
maxlength="500" |
|
|
@ -108,28 +116,36 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getRoomFacilities,submitCheckout } from "../../../pages/api"; |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
btnStyle: |
|
|
|
"background:linear-gradient(90deg,#0DC6C6 0%,#13C2C2 100%);font-size:36rpx;border-radius:48rpx;width:60vw;height:80rpx;", |
|
|
|
deviceList: [ |
|
|
|
{ name: "空调", status: "完好" }, |
|
|
|
{ name: "冰箱", status: "完好" }, |
|
|
|
{ name: "洗衣机", status: "完好" }, |
|
|
|
{ name: "电磁灶", status: "完好" }, |
|
|
|
{ name: "沙发", status: "完好" }, |
|
|
|
{ name: "茶几", status: "完好" }, |
|
|
|
{ name: "桌椅", status: "完好" }, |
|
|
|
], |
|
|
|
deviceList: [ ], |
|
|
|
statusOptions: ["完好", "破损", "丢失"], |
|
|
|
waterMeter: 3245.1, |
|
|
|
electricMeter: 2672.6, |
|
|
|
waterMeterValue: '', |
|
|
|
energyMeterValue: '', |
|
|
|
remark: "", |
|
|
|
fileList: [], |
|
|
|
info: {}, |
|
|
|
facilitiesCheckDesc: "", |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
console.log("options", options); |
|
|
|
|
|
|
|
const detail = uni.getStorageSync("checkoutDetail"); |
|
|
|
this.info = detail; |
|
|
|
this.getFacilities(options.houseId); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getFacilities(id) { |
|
|
|
getRoomFacilities({ houseId: id }).then((res) => { |
|
|
|
this.deviceList = res.data; |
|
|
|
}); |
|
|
|
}, |
|
|
|
onDeviceChange(idx, val) { |
|
|
|
this.deviceList[idx].status = val; |
|
|
|
}, |
|
|
@ -141,6 +157,17 @@ export default { |
|
|
|
this.fileList.splice(event.index, 1); |
|
|
|
}, |
|
|
|
onSubmit() { |
|
|
|
let data = { |
|
|
|
checkOutRecId: this.info.checkOutRecId, |
|
|
|
houseId: this.info.houseId, |
|
|
|
roomId: this.info.roomId, |
|
|
|
graduateId: this.info.graduateId, |
|
|
|
graduateName: this.info.graduateName, |
|
|
|
startDate: this.info.startDate, |
|
|
|
checkOutDate: this.info.checkOutDate, |
|
|
|
waterMeterValue: this.waterMeterValue, |
|
|
|
} |
|
|
|
|
|
|
|
uni.showToast({ title: "提交成功", icon: "success" }); |
|
|
|
}, |
|
|
|
}, |
|
|
|