Browse Source

强制清退搜索

wyx
wangyx 1 month ago
parent
commit
161fa0f5eb
  1. 228
      pagesA/force/index/index.vue
  2. BIN
      static/img/loginBac.png

228
pagesA/force/index/index.vue

@ -5,8 +5,14 @@
<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-input v-model="form.idCard" placeholder="请输入身份证号" border="none" input-align="left" <u-search
suffixIcon="search" suffixIconStyle="color: #909399" @confirm="handleQuery" /> placeholder="请输入身份证号"
v-model="form.idCard"
shape="round"
:showAction="false"
@search="handleQuery"
@clear="handleClear"
></u-search>
</u-form-item> </u-form-item>
</view> </view>
<view class="cont" v-if="showInfo"> <view class="cont" v-if="showInfo">
@ -47,7 +53,12 @@
/> --> /> -->
</u-form-item> </u-form-item>
<view style="border-bottom: 2rpx solid #e5e5e5; margin: 0"></view> <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> <text style="text-align: right">{{ baseInfo.checkOutTime }}</text>
<!-- <u--input <!-- <u--input
v-model="baseInfo.checkOutTime" v-model="baseInfo.checkOutTime"
@ -74,15 +85,33 @@
</view> </view>
<view class="desc-card"> <view class="desc-card">
<view class="label-des">说明</view> <view class="label-des">说明</view>
<u-textarea v-model="forceCheckoutDesc" ref="textarea" placeholder="请输入内容(不超过500字)" <u-textarea
maxlength="500" height="150" border="none" v-model="forceCheckoutDesc"
custom-style="background:#f7f7f7;border-radius:12rpx;padding:16rpx;"></u-textarea> 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> <view class="label-des">上传图片/视频</view>
<u-upload accept="all" :fileList="fileList" @afterRead="afterRead" @delete="deletePic" multiple <u-upload
:maxCount="10" uploadIconColor="#12c3c3" :previewImage="true"> accept="all"
:fileList="fileList"
@afterRead="afterRead"
@delete="deletePic"
multiple
:maxCount="10"
uploadIconColor="#12c3c3"
:previewImage="true"
>
<view class="custom-upload-btn"> <view class="custom-upload-btn">
<view class="icon-box"> <view class="icon-box">
<image class="camera-icon" src="/static/img/camera-icon.png" mode="aspectFill"> <image
class="camera-icon"
src="/static/img/camera-icon.png"
mode="aspectFill"
>
</image> </image>
</view> </view>
@ -91,30 +120,41 @@
</u-upload> </u-upload>
</view> </view>
<view class="submit-box"> <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>
</view> </view>
</u-form> </u-form>
<u-datetime-picker :show="showDate" v-model="form.pickerValue" mode="date" @confirm="onDateConfirm" <u-datetime-picker
@cancel="showDate = false" /> :show="showDate"
<u-picker :show="showProblemTypePicker" :columns="[problemTypeOptions]" @confirm="onProblemTypeConfirm" v-model="form.pickerValue"
@cancel="showProblemTypePicker = false" keyName="label" /> mode="date"
@confirm="onDateConfirm"
@cancel="showDate = false"
/>
<u-picker
:show="showProblemTypePicker"
:columns="[problemTypeOptions]"
@confirm="onProblemTypeConfirm"
@cancel="showProblemTypePicker = false"
keyName="label"
/>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import { uploadImage, getResidentInfo, forceRelease } from "../../../pages/api";
uploadImage, export default {
getResidentInfo,
forceRelease
} from "../../../pages/api";
export default {
data() { data() {
return { 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: { form: {
room: "", room: "",
name: "", name: "",
@ -136,23 +176,21 @@
showDate: false, showDate: false,
minDate: "2000-01-01", minDate: "2000-01-01",
maxDate: "2100-12-31", maxDate: "2100-12-31",
descStyle: "background:#f7f8fa;border-radius:12rpx;padding:24rpx;font-size:28rpx;color:#222;min-height:250rpx;box-sizing:border-box;", descStyle:
problemTypeOptions: [{ "background:#f7f8fa;border-radius:12rpx;padding:24rpx;font-size:28rpx;color:#222;min-height:250rpx;box-sizing:border-box;",
problemTypeOptions: [
{
label: "违法居住条款,故意破坏房间设施", label: "违法居住条款,故意破坏房间设施",
value: 1 value: 1,
}, ], },
],
showProblemTypePicker: false, // showProblemTypePicker: false, //
showInfo: true showInfo: true,
}; };
}, },
computed: { computed: {
roomAllPath() { roomAllPath() {
const { const { apartmentName, buildingName, unitName, roomTypeName } =
apartmentName,
buildingName,
unitName,
roomTypeName
} =
this.baseInfo; this.baseInfo;
return `${apartmentName || ""}${buildingName || ""}${unitName || ""}${ return `${apartmentName || ""}${buildingName || ""}${unitName || ""}${
roomTypeName || "" roomTypeName || ""
@ -161,30 +199,46 @@
}, },
methods: { methods: {
handleQuery() { handleQuery() {
console.log("查询参数:", this.form);
getResidentInfo({ getResidentInfo({
idCard: this.form.idCard idCard: this.form.idCard,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
console.log("查询结果:", res);
this.baseInfo = res.data; this.baseInfo = res.data;
if (this.baseInfo) { if (this.baseInfo) {
this.showInfo = true this.showInfo = true;
} }
this.baseInfo.roomId = res.data.roomId; this.baseInfo.roomId = res.data.roomId;
} else {
uni.showToast({
title: res.message,
icon: "none",
});
} }
}); });
}, },
handleClear() {
this.form = {
room: "",
name: "",
idCard: "",
phone: "",
leaveDate: "",
desc: "",
imageUrl: "",
pickerValue: "",
problemType: "",
};
},
// //
beforeRead(event) { beforeRead(event) {
// //
const { const { file } = event;
file
} = event;
if (file.size > 10 * 1024 * 1024) { if (file.size > 10 * 1024 * 1024) {
// 10MB // 10MB
uni.showToast({ uni.showToast({
title: "文件过大", title: "文件过大",
icon: "none" icon: "none",
}); });
return false; return false;
} }
@ -220,9 +274,9 @@
var arry = []; var arry = [];
this.fileList.filter((v, i) => { this.fileList.filter((v, i) => {
arry.push({ arry.push({
name: v.name || '', name: v.name || "",
format: v.type, format: v.type,
url: v.url url: v.url,
}); });
}); });
// this.img1 = arry; // this.img1 = arry;
@ -233,9 +287,9 @@
var arry = []; var arry = [];
this.fileList.filter((v, i) => { this.fileList.filter((v, i) => {
arry.push({ arry.push({
name: v.name || '', name: v.name || "",
format: v.type, format: v.type,
url: v.url url: v.url,
}); });
}); });
// this.img1 = arry; // this.img1 = arry;
@ -263,19 +317,19 @@
forceRelease(params).then((res) => { forceRelease(params).then((res) => {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: "success" icon: "success",
}); });
uni.switchTab({ uni.switchTab({
url: "/pages/tabBar/work/index" url: "/pages/tabBar/work/index",
}); });
}); });
}, },
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.top-bg { .top-bg {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -283,67 +337,67 @@
height: 260rpx; height: 260rpx;
background: linear-gradient(120deg, #c6e6f7 0%, #e3e5fc 100%); background: linear-gradient(120deg, #c6e6f7 0%, #e3e5fc 100%);
z-index: 0; z-index: 0;
} }
.container { .container {
position: relative; position: relative;
z-index: 1; z-index: 1;
padding: 32rpx 24rpx 0 24rpx; padding: 32rpx 24rpx 0 24rpx;
background: transparent; background: transparent;
min-height: 80vh; min-height: 80vh;
} }
.info-card { .info-card {
background: #fff; background: #fff;
border-radius: 24rpx; border-radius: 24rpx;
padding: 0rpx 24rpx 0 24rpx; padding: 0rpx 24rpx 0 24rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx 0 #e6f6fd; box-shadow: 0 4rpx 16rpx 0 #e6f6fd;
} }
::v-deep .u-form-item__body__left { ::v-deep .u-form-item__body__left {
color: #6a7fa3 !important; color: #6a7fa3 !important;
font-size: 28rpx !important; font-size: 28rpx !important;
font-weight: 500; 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; color: #ff5a5a !important;
margin-right: 4rpx; margin-right: 4rpx;
font-size: 28rpx; font-size: 28rpx;
} }
.u-form-item__body__right { .u-form-item__body__right {
text-align: right; text-align: right;
color: #222; color: #222;
font-size: 28rpx; font-size: 28rpx;
} }
.u-form-item { .u-form-item {
border-bottom: 1rpx solid #f2f4f8 !important; border-bottom: 1rpx solid #f2f4f8 !important;
margin-bottom: 0 !important; margin-bottom: 0 !important;
padding-bottom: 0 !important; padding-bottom: 0 !important;
} }
.u-form-item:last-child { .u-form-item:last-child {
border-bottom: none !important; border-bottom: none !important;
} }
.desc-card { .desc-card {
background: #fff; background: #fff;
border-radius: 20rpx; border-radius: 20rpx;
padding: 24rpx 20rpx 24rpx 20rpx; padding: 24rpx 20rpx 24rpx 20rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx #f2f4f8; box-shadow: 0 2rpx 8rpx #f2f4f8;
} }
.label-des { .label-des {
color: #68758b; color: #68758b;
font-size: 30rpx; font-size: 30rpx;
margin: 20rpx 0; margin: 20rpx 0;
} }
.custom-desc-textarea { .custom-desc-textarea {
background: #f7f8fa !important; background: #f7f8fa !important;
border-radius: 12rpx !important; border-radius: 12rpx !important;
padding: 24rpx !important; padding: 24rpx !important;
@ -351,9 +405,9 @@
color: #222 !important; color: #222 !important;
min-height: 500rpx !important; min-height: 500rpx !important;
box-sizing: border-box; box-sizing: border-box;
} }
.custom-upload-btn { .custom-upload-btn {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
background: #fafafa; background: #fafafa;
@ -364,9 +418,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 20rpx 16rpx 0 0; margin: 20rpx 16rpx 0 0;
} }
.icon-box { .icon-box {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
background: #ceeced; background: #ceeced;
@ -374,21 +428,21 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.camera-icon { .camera-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
} }
.upload-tips { .upload-tips {
color: #bbb; color: #bbb;
font-size: 24rpx; font-size: 24rpx;
margin-top: 8rpx; margin-top: 8rpx;
} }
/* u-upload自定义按钮样式(如需更改) */ /* u-upload自定义按钮样式(如需更改) */
.u-upload__wrap__button { .u-upload__wrap__button {
background: #f7f8fa !important; background: #f7f8fa !important;
border-radius: 16rpx !important; border-radius: 16rpx !important;
width: 120rpx !important; width: 120rpx !important;
@ -397,21 +451,21 @@
flex-direction: column !important; flex-direction: column !important;
align-items: center !important; align-items: center !important;
justify-content: center !important; justify-content: center !important;
} }
.u-upload__wrap__button .u-icon { .u-upload__wrap__button .u-icon {
color: #2fd7e6 !important; color: #2fd7e6 !important;
font-size: 48rpx !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; color: #b0b0b0 !important;
font-size: 24rpx !important; font-size: 24rpx !important;
margin-top: 8rpx; 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; color: #68758b;
font-size: 30rpx; font-size: 30rpx;
} }
</style> </style>

BIN
static/img/loginBac.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

Loading…
Cancel
Save