|
|
@ -125,13 +125,17 @@ |
|
|
|
|
|
|
|
</text> |
|
|
|
</checkbox-group> --> |
|
|
|
<checkbox-group @change="checkboxChange"> |
|
|
|
<label> |
|
|
|
<checkbox value="isChecked" :checked="isChecked" style="transform:scale(0.7)" />确认以上信息无误,生成“房屋交割单”,由毕业生在微信小程序端签字确认。 |
|
|
|
</label> |
|
|
|
</checkbox-group> |
|
|
|
<checkbox-group @change="checkboxChange"> |
|
|
|
<label> |
|
|
|
<checkbox |
|
|
|
value="isChecked" |
|
|
|
:checked="isChecked" |
|
|
|
style="transform: scale(0.7)" |
|
|
|
/>确认以上信息无误,生成“房屋交割单”,由毕业生在微信小程序端签字确认。 |
|
|
|
</label> |
|
|
|
</checkbox-group> |
|
|
|
</view> |
|
|
|
<view class="btn" @click="onSubmit">提交</view> |
|
|
|
<view class="btn" @click="onSubmit">提交</view> |
|
|
|
<!-- <view class="submit-btn-wrap"> |
|
|
|
<u-button |
|
|
|
type="primary" |
|
|
@ -150,7 +154,8 @@ import { |
|
|
|
submitCheckout, |
|
|
|
uploadImage, |
|
|
|
tempSaveCheckOut, |
|
|
|
} from "../../../pages/api"; |
|
|
|
loadCheckOutDetail, |
|
|
|
} from "@/pages/api"; |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
@ -185,14 +190,28 @@ export default { |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
console.log("options", options); |
|
|
|
|
|
|
|
const detail = uni.getStorageSync("checkoutDetail"); |
|
|
|
this.info = detail; |
|
|
|
loadCheckOutDetail({ idCard: options.idCard }).then((res) => { |
|
|
|
this.deviceList = res.data.facilitiesCheckResults.map((v) => ({ |
|
|
|
name: v.facilityName, |
|
|
|
id: v.facilityId, |
|
|
|
facilityStatus: v.checkResult, |
|
|
|
})); |
|
|
|
console.log("dev", this.deviceList); |
|
|
|
this.checkStatus = this.deviceList.map((v) => |
|
|
|
v.facilityStatus.toString() |
|
|
|
); |
|
|
|
this.waterMeterValue = res.data.waterMeterValue; |
|
|
|
this.energyMeterValue = res.data.energyMeterValue; |
|
|
|
this.facilitiesCheckDesc = res.data.facilitiesCheckDesc; |
|
|
|
this.fileList = res.data.facilitiesCheckImages; |
|
|
|
}); |
|
|
|
this.getFacilities(options.houseId); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
checkboxChange(event) { |
|
|
|
this.isChecked = !this.isChecked |
|
|
|
this.isChecked = !this.isChecked; |
|
|
|
}, |
|
|
|
maskPhoneNumber(phoneNumber) { |
|
|
|
if (!phoneNumber || phoneNumber.length !== 11) { |
|
|
@ -286,9 +305,14 @@ export default { |
|
|
|
handleTempSave(formData) { |
|
|
|
tempSaveCheckOut(formData).then((res) => { |
|
|
|
if (res.code === 200) { |
|
|
|
uni.showToast({ title: res.msg, icon: "success" }); |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pagesA/checkout/list/list`, |
|
|
|
uni.showToast({ title: "提交成功", icon: "success" }); |
|
|
|
setTimeout(() => { |
|
|
|
uni.navigateTo( |
|
|
|
{ |
|
|
|
url: `/pagesA/checkout/list/list`, |
|
|
|
}, |
|
|
|
1000 |
|
|
|
); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
uni.showToast({ title: res.msg, icon: "warning" }); |
|
|
@ -297,7 +321,7 @@ export default { |
|
|
|
}, |
|
|
|
onSubmit() { |
|
|
|
console.log(this.isChecked); |
|
|
|
|
|
|
|
|
|
|
|
if (!this.isChecked) { |
|
|
|
uni.showToast({ |
|
|
|
title: "请先确认信息无误并勾选", |
|
|
@ -321,9 +345,7 @@ export default { |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 校验水电表是否填写 |
|
|
|
if (!this.waterMeterValue || this.waterMeterValue.trim() === "") { |
|
|
|
if (!String(this.waterMeterValue).trim()) { |
|
|
|
uni.showToast({ |
|
|
|
title: "请输入水表数", |
|
|
|
icon: "none", |
|
|
@ -332,7 +354,7 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.energyMeterValue || this.energyMeterValue.trim() === "") { |
|
|
|
if (!String(this.energyMeterValue).trim()) { |
|
|
|
uni.showToast({ |
|
|
|
title: "请输入电表数", |
|
|
|
icon: "none", |
|
|
@ -340,12 +362,10 @@ export default { |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const facilitiesCheckResults = this.deviceList.map((item, index) => ({ |
|
|
|
facilityId: item.id, |
|
|
|
checkResult: this.checkStatus[index], |
|
|
|
})); |
|
|
|
console.log(facilitiesCheckResults, "facilitiesCheckResults"); |
|
|
|
const params = { |
|
|
|
idCard: this.info.idCard, |
|
|
|
checkOutType: 0, //正常退房 |
|
|
@ -356,10 +376,6 @@ export default { |
|
|
|
energyMeterValue: this.energyMeterValue || "", |
|
|
|
}; |
|
|
|
this.handleTempSave(params); |
|
|
|
uni.switchTab({ |
|
|
|
url: "/pages/tabBar/work/index", |
|
|
|
}); |
|
|
|
uni.showToast({ title: "提交成功", icon: "success" }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|