|
|
@ -4,19 +4,12 @@ |
|
|
|
<view class="container"> |
|
|
|
<u-form :model="form" ref="uForm" label-width="90"> |
|
|
|
<view class="info-card"> |
|
|
|
<u-form-item label="身份证号" prop="idCard"> |
|
|
|
<u-input |
|
|
|
v-model="form.idCard" |
|
|
|
placeholder="请输入身份证号" |
|
|
|
border="none" |
|
|
|
input-align="left" |
|
|
|
suffixIcon="search" |
|
|
|
suffixIconStyle="color: #909399" |
|
|
|
@confirm="handleQuery" |
|
|
|
/> |
|
|
|
<u-form-item prop="idCard"> |
|
|
|
<u-input v-model="form.idCard" placeholder="请输入身份证号" border="none" input-align="left" |
|
|
|
suffixIcon="search" suffixIconStyle="color: #909399" @confirm="handleQuery" /> |
|
|
|
</u-form-item> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cont" v-if="showInfo"> |
|
|
|
<view class="info-card"> |
|
|
|
<u-form-item label="姓名" prop="name" required> |
|
|
|
<text style="text-align: right">{{ baseInfo.graduateName }}</text> |
|
|
@ -54,12 +47,7 @@ |
|
|
|
/> --> |
|
|
|
</u-form-item> |
|
|
|
<view style="border-bottom: 2rpx solid #e5e5e5; margin: 0"></view> |
|
|
|
<u-form-item |
|
|
|
label="退房日期" |
|
|
|
prop="leaveDate" |
|
|
|
required |
|
|
|
@click="showDate = false" |
|
|
|
> |
|
|
|
<u-form-item label="退房日期" prop="leaveDate" required @click="showDate = false"> |
|
|
|
<text style="text-align: right">{{ baseInfo.checkOutTime }}</text> |
|
|
|
<!-- <u--input |
|
|
|
v-model="baseInfo.checkOutTime" |
|
|
@ -86,33 +74,16 @@ |
|
|
|
</view> |
|
|
|
<view class="desc-card"> |
|
|
|
<view class="label-des">说明</view> |
|
|
|
<u-textarea |
|
|
|
v-model="forceCheckoutDesc" |
|
|
|
ref="textarea" |
|
|
|
placeholder="请输入内容(不超过500字)" |
|
|
|
maxlength="500" |
|
|
|
height="150" |
|
|
|
border="none" |
|
|
|
custom-style="background:#f7f7f7;border-radius:12rpx;padding:16rpx;" |
|
|
|
></u-textarea> |
|
|
|
<u-textarea v-model="forceCheckoutDesc" ref="textarea" placeholder="请输入内容(不超过500字)" |
|
|
|
maxlength="500" height="150" border="none" |
|
|
|
custom-style="background:#f7f7f7;border-radius:12rpx;padding:16rpx;"></u-textarea> |
|
|
|
<view class="label-des">上传图片/视频</view> |
|
|
|
<u-upload |
|
|
|
accept="all" |
|
|
|
:fileList="fileList" |
|
|
|
@afterRead="afterRead" |
|
|
|
@delete="deletePic" |
|
|
|
multiple |
|
|
|
:maxCount="10" |
|
|
|
uploadIconColor="#12c3c3" |
|
|
|
:previewImage="true" |
|
|
|
> |
|
|
|
<u-upload accept="all" :fileList="fileList" @afterRead="afterRead" @delete="deletePic" multiple |
|
|
|
:maxCount="10" uploadIconColor="#12c3c3" :previewImage="true"> |
|
|
|
<view class="custom-upload-btn"> |
|
|
|
<view class="icon-box"> |
|
|
|
<image |
|
|
|
class="camera-icon" |
|
|
|
src="/static/img/camera-icon.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image class="camera-icon" src="/static/img/camera-icon.png" mode="aspectFill"> |
|
|
|
</image> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="upload-tips">点击上传</view> |
|
|
@ -120,40 +91,30 @@ |
|
|
|
</u-upload> |
|
|
|
</view> |
|
|
|
<view class="submit-box"> |
|
|
|
<u-button |
|
|
|
type="primary" |
|
|
|
shape="circle" |
|
|
|
@click="submit" |
|
|
|
:custom-style="btnStyle" |
|
|
|
>提交</u-button |
|
|
|
> |
|
|
|
<u-button type="primary" shape="circle" @click="submit" :custom-style="btnStyle">提交</u-button> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</u-form> |
|
|
|
<u-datetime-picker |
|
|
|
:show="showDate" |
|
|
|
v-model="form.pickerValue" |
|
|
|
mode="date" |
|
|
|
@confirm="onDateConfirm" |
|
|
|
@cancel="showDate = false" |
|
|
|
/> |
|
|
|
<u-picker |
|
|
|
:show="showProblemTypePicker" |
|
|
|
:columns="[problemTypeOptions]" |
|
|
|
@confirm="onProblemTypeConfirm" |
|
|
|
@cancel="showProblemTypePicker = false" |
|
|
|
keyName="label" |
|
|
|
/> |
|
|
|
<u-datetime-picker :show="showDate" v-model="form.pickerValue" mode="date" @confirm="onDateConfirm" |
|
|
|
@cancel="showDate = false" /> |
|
|
|
<u-picker :show="showProblemTypePicker" :columns="[problemTypeOptions]" @confirm="onProblemTypeConfirm" |
|
|
|
@cancel="showProblemTypePicker = false" keyName="label" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { uploadImage, getResidentInfo, forceRelease } from "../../../pages/api"; |
|
|
|
export default { |
|
|
|
import { |
|
|
|
uploadImage, |
|
|
|
getResidentInfo, |
|
|
|
forceRelease |
|
|
|
} 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; margin-bottom:60rpx;", |
|
|
|
btnStyle: "background:linear-gradient(90deg,#0DC6C6 0%,#13C2C2 100%);font-size:36rpx;border-radius:48rpx;width:60vw;height:80rpx; margin-bottom:60rpx;", |
|
|
|
form: { |
|
|
|
room: "", |
|
|
|
name: "", |
|
|
@ -175,17 +136,23 @@ export default { |
|
|
|
showDate: false, |
|
|
|
minDate: "2000-01-01", |
|
|
|
maxDate: "2100-12-31", |
|
|
|
descStyle: |
|
|
|
"background:#f7f8fa;border-radius:12rpx;padding:24rpx;font-size:28rpx;color:#222;min-height:250rpx;box-sizing:border-box;", |
|
|
|
problemTypeOptions: [ |
|
|
|
{ label: "违法居住条款,故意破坏房间设施", value: 1 }, |
|
|
|
], |
|
|
|
descStyle: "background:#f7f8fa;border-radius:12rpx;padding:24rpx;font-size:28rpx;color:#222;min-height:250rpx;box-sizing:border-box;", |
|
|
|
problemTypeOptions: [{ |
|
|
|
label: "违法居住条款,故意破坏房间设施", |
|
|
|
value: 1 |
|
|
|
}, ], |
|
|
|
showProblemTypePicker: false, // 控制选择器显示 |
|
|
|
showInfo: true |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
roomAllPath() { |
|
|
|
const { apartmentName, buildingName, unitName, roomTypeName } = |
|
|
|
const { |
|
|
|
apartmentName, |
|
|
|
buildingName, |
|
|
|
unitName, |
|
|
|
roomTypeName |
|
|
|
} = |
|
|
|
this.baseInfo; |
|
|
|
return `${apartmentName || ""}${buildingName || ""}${unitName || ""}${ |
|
|
|
roomTypeName || "" |
|
|
@ -194,10 +161,15 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleQuery() { |
|
|
|
getResidentInfo({ idCard: this.form.idCard }).then((res) => { |
|
|
|
getResidentInfo({ |
|
|
|
idCard: this.form.idCard |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === 200) { |
|
|
|
console.log("查询结果:", res); |
|
|
|
this.baseInfo = res.data; |
|
|
|
if (this.baseInfo) { |
|
|
|
this.showInfo = true |
|
|
|
} |
|
|
|
this.baseInfo.roomId = res.data.roomId; |
|
|
|
} |
|
|
|
}); |
|
|
@ -205,10 +177,15 @@ export default { |
|
|
|
// 上传前校验 |
|
|
|
beforeRead(event) { |
|
|
|
// 可以在这里做文件大小、类型校验 |
|
|
|
const { file } = event; |
|
|
|
const { |
|
|
|
file |
|
|
|
} = event; |
|
|
|
if (file.size > 10 * 1024 * 1024) { |
|
|
|
// 10MB |
|
|
|
uni.showToast({ title: "文件过大", icon: "none" }); |
|
|
|
uni.showToast({ |
|
|
|
title: "文件过大", |
|
|
|
icon: "none" |
|
|
|
}); |
|
|
|
return false; |
|
|
|
} |
|
|
|
return true; |
|
|
@ -242,18 +219,26 @@ export default { |
|
|
|
} |
|
|
|
var arry = []; |
|
|
|
this.fileList.filter((v, i) => { |
|
|
|
arry.push(v.url); |
|
|
|
arry.push({ |
|
|
|
name: v.name || '', |
|
|
|
format: v.type, |
|
|
|
url: v.url |
|
|
|
}); |
|
|
|
this.img1 = arry; |
|
|
|
}); |
|
|
|
// this.img1 = arry; |
|
|
|
}, |
|
|
|
// 删除文件 |
|
|
|
deletePic(event) { |
|
|
|
this[`fileList${event.name}`].splice(event.index, 1); |
|
|
|
var arry = []; |
|
|
|
this.fileList.filter((v, i) => { |
|
|
|
arry.push(v.url); |
|
|
|
arry.push({ |
|
|
|
name: v.name || '', |
|
|
|
format: v.type, |
|
|
|
url: v.url |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.img1 = arry; |
|
|
|
// this.img1 = arry; |
|
|
|
}, |
|
|
|
onProblemTypeConfirm(e) { |
|
|
|
const selectedItem = e.value[0]; |
|
|
@ -276,77 +261,89 @@ export default { |
|
|
|
}, |
|
|
|
handleTempSave(params) { |
|
|
|
forceRelease(params).then((res) => { |
|
|
|
uni.showToast({ title: res.msg, icon: "success" }); |
|
|
|
uni.switchTab({ url: "/pages/tabBar/work/index" }); |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: "success" |
|
|
|
}); |
|
|
|
uni.switchTab({ |
|
|
|
url: "/pages/tabBar/work/index" |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.top-bg { |
|
|
|
.top-bg { |
|
|
|
position: fixed; |
|
|
|
top: 0; |
|
|
|
left: 0; |
|
|
|
width: 100vw; |
|
|
|
height: 220rpx; |
|
|
|
height: 260rpx; |
|
|
|
background: linear-gradient(120deg, #c6e6f7 0%, #e3e5fc 100%); |
|
|
|
z-index: 0; |
|
|
|
} |
|
|
|
.container { |
|
|
|
} |
|
|
|
|
|
|
|
.container { |
|
|
|
position: relative; |
|
|
|
z-index: 1; |
|
|
|
padding: 32rpx 24rpx 0 24rpx; |
|
|
|
background: transparent; |
|
|
|
min-height: 80vh; |
|
|
|
} |
|
|
|
.info-card { |
|
|
|
} |
|
|
|
|
|
|
|
.info-card { |
|
|
|
background: #fff; |
|
|
|
border-radius: 24rpx; |
|
|
|
padding: 0rpx 24rpx 0 24rpx; |
|
|
|
margin-bottom: 24rpx; |
|
|
|
box-shadow: 0 4rpx 16rpx 0 #e6f6fd; |
|
|
|
} |
|
|
|
::v-deep .u-form-item__body__left { |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .u-form-item__body__left { |
|
|
|
color: #6a7fa3 !important; |
|
|
|
font-size: 28rpx !important; |
|
|
|
font-weight: 500; |
|
|
|
} |
|
|
|
.u-form-item__body__left .u-form-item__body__left__required { |
|
|
|
} |
|
|
|
|
|
|
|
.u-form-item__body__left .u-form-item__body__left__required { |
|
|
|
color: #ff5a5a !important; |
|
|
|
margin-right: 4rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.u-form-item__body__right { |
|
|
|
.u-form-item__body__right { |
|
|
|
text-align: right; |
|
|
|
color: #222; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.u-form-item { |
|
|
|
.u-form-item { |
|
|
|
border-bottom: 1rpx solid #f2f4f8 !important; |
|
|
|
margin-bottom: 0 !important; |
|
|
|
padding-bottom: 0 !important; |
|
|
|
} |
|
|
|
.u-form-item:last-child { |
|
|
|
} |
|
|
|
|
|
|
|
.u-form-item:last-child { |
|
|
|
border-bottom: none !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.desc-card { |
|
|
|
.desc-card { |
|
|
|
background: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
padding: 24rpx 20rpx 24rpx 20rpx; |
|
|
|
margin-bottom: 24rpx; |
|
|
|
box-shadow: 0 2rpx 8rpx #f2f4f8; |
|
|
|
} |
|
|
|
.label-des { |
|
|
|
} |
|
|
|
|
|
|
|
.label-des { |
|
|
|
color: #68758b; |
|
|
|
font-size: 30rpx; |
|
|
|
margin: 20rpx 0; |
|
|
|
} |
|
|
|
.custom-desc-textarea { |
|
|
|
} |
|
|
|
|
|
|
|
.custom-desc-textarea { |
|
|
|
background: #f7f8fa !important; |
|
|
|
border-radius: 12rpx !important; |
|
|
|
padding: 24rpx !important; |
|
|
@ -354,8 +351,9 @@ export default { |
|
|
|
color: #222 !important; |
|
|
|
min-height: 500rpx !important; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
.custom-upload-btn { |
|
|
|
} |
|
|
|
|
|
|
|
.custom-upload-btn { |
|
|
|
width: 160rpx; |
|
|
|
height: 160rpx; |
|
|
|
background: #fafafa; |
|
|
@ -366,8 +364,9 @@ export default { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
margin: 20rpx 16rpx 0 0; |
|
|
|
} |
|
|
|
.icon-box { |
|
|
|
} |
|
|
|
|
|
|
|
.icon-box { |
|
|
|
width: 60rpx; |
|
|
|
height: 60rpx; |
|
|
|
background: #ceeced; |
|
|
@ -375,18 +374,21 @@ export default { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
.camera-icon { |
|
|
|
} |
|
|
|
|
|
|
|
.camera-icon { |
|
|
|
width: 36rpx; |
|
|
|
height: 36rpx; |
|
|
|
} |
|
|
|
.upload-tips { |
|
|
|
} |
|
|
|
|
|
|
|
.upload-tips { |
|
|
|
color: #bbb; |
|
|
|
font-size: 24rpx; |
|
|
|
margin-top: 8rpx; |
|
|
|
} |
|
|
|
/* u-upload自定义按钮样式(如需更改) */ |
|
|
|
.u-upload__wrap__button { |
|
|
|
} |
|
|
|
|
|
|
|
/* u-upload自定义按钮样式(如需更改) */ |
|
|
|
.u-upload__wrap__button { |
|
|
|
background: #f7f8fa !important; |
|
|
|
border-radius: 16rpx !important; |
|
|
|
width: 120rpx !important; |
|
|
@ -395,18 +397,21 @@ export default { |
|
|
|
flex-direction: column !important; |
|
|
|
align-items: center !important; |
|
|
|
justify-content: center !important; |
|
|
|
} |
|
|
|
.u-upload__wrap__button .u-icon { |
|
|
|
} |
|
|
|
|
|
|
|
.u-upload__wrap__button .u-icon { |
|
|
|
color: #2fd7e6 !important; |
|
|
|
font-size: 48rpx !important; |
|
|
|
} |
|
|
|
.u-upload__wrap__button .u-upload__wrap__button__text { |
|
|
|
} |
|
|
|
|
|
|
|
.u-upload__wrap__button .u-upload__wrap__button__text { |
|
|
|
color: #b0b0b0 !important; |
|
|
|
font-size: 24rpx !important; |
|
|
|
margin-top: 8rpx; |
|
|
|
} |
|
|
|
::v-deep .u-form-item__body__left__content__label span { |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .u-form-item__body__left__content__label span { |
|
|
|
color: #68758b; |
|
|
|
font-size: 30rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |