Browse Source

强制清退搜索

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

740
pagesA/force/index/index.vue

@ -1,63 +1,74 @@
<template> <template>
<view> <view>
<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-input v-model="form.idCard" placeholder="请输入身份证号" border="none" input-align="left" <u-search
suffixIcon="search" suffixIconStyle="color: #909399" @confirm="handleQuery" /> placeholder="请输入身份证号"
</u-form-item> v-model="form.idCard"
</view> shape="round"
<view class="cont" v-if="showInfo"> :showAction="false"
<view class="info-card"> @search="handleQuery"
<u-form-item label="姓名" prop="name" required> @clear="handleClear"
<text style="text-align: right">{{ baseInfo.graduateName }}</text> ></u-search>
</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>
<!-- <u-input <!-- <u-input
v-model="baseInfo.graduateName" 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>
<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="room" required> <u-form-item label="房间" prop="room" required>
<text style="text-align: right">{{ roomAllPath }}</text> <text style="text-align: right">{{ roomAllPath }}</text>
<!-- <u-input <!-- <u-input
v-model="roomAllPath" 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>
<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="phone" required> <u-form-item label="手机号" prop="phone" required>
<text style="text-align: right">{{ baseInfo.telephone }}</text> <text style="text-align: right">{{ baseInfo.telephone }}</text>
<!-- <u-input <!-- <u-input
v-model="baseInfo.telephone" v-model="baseInfo.telephone"
placeholder="请输入手机号" placeholder="请输入手机号"
border="none" border="none"
input-align="right" input-align="right"
:disabled="true" :disabled="true"
/> --> /> -->
</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
<text style="text-align: right">{{ baseInfo.checkOutTime }}</text> label="退房日期"
<!-- <u--input prop="leaveDate"
required
@click="showDate = false"
>
<text style="text-align: right">{{ baseInfo.checkOutTime }}</text>
<!-- <u--input
v-model="baseInfo.checkOutTime" v-model="baseInfo.checkOutTime"
placeholder="请选择退房日期" placeholder="请选择退房日期"
border="none" border="none"
readonly readonly
input-align="right" input-align="right"
></u--input> --> ></u--input> -->
</u-form-item> </u-form-item>
<!-- <u-form-item <!-- <u-form-item
label="问题类型" label="问题类型"
prop="problemType" prop="problemType"
required required
@ -71,347 +82,390 @@
readonly readonly
/> />
</u-form-item> --> </u-form-item> -->
</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"
<view class="label-des">上传图片/视频</view> placeholder="请输入内容(不超过500字)"
<u-upload accept="all" :fileList="fileList" @afterRead="afterRead" @delete="deletePic" multiple maxlength="500"
:maxCount="10" uploadIconColor="#12c3c3" :previewImage="true"> height="150"
<view class="custom-upload-btn"> border="none"
<view class="icon-box"> custom-style="background:#f7f7f7;border-radius:12rpx;padding:16rpx;"
<image class="camera-icon" src="/static/img/camera-icon.png" mode="aspectFill"> ></u-textarea>
</image> <view class="label-des">上传图片/视频</view>
</view> <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>
</view>
<view class="upload-tips">点击上传</view> <view class="upload-tips">点击上传</view>
</view> </view>
</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
</view> type="primary"
shape="circle"
</view> @click="submit"
:custom-style="btnStyle"
</u-form> >提交</u-button
<u-datetime-picker :show="showDate" v-model="form.pickerValue" mode="date" @confirm="onDateConfirm" >
@cancel="showDate = false" /> </view>
<u-picker :show="showProblemTypePicker" :columns="[problemTypeOptions]" @confirm="onProblemTypeConfirm" </view>
@cancel="showProblemTypePicker = false" keyName="label" /> </u-form>
</view> <u-datetime-picker
</view> :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> </template>
<script> <script>
import { import { uploadImage, getResidentInfo, forceRelease } from "../../../pages/api";
uploadImage, export default {
getResidentInfo, data() {
forceRelease return {
} from "../../../pages/api"; btnStyle:
export default { "background:linear-gradient(90deg,#0DC6C6 0%,#13C2C2 100%);font-size:36rpx;border-radius:48rpx;width:60vw;height:80rpx; margin-bottom:60rpx;",
data() { form: {
return { room: "",
btnStyle: "background:linear-gradient(90deg,#0DC6C6 0%,#13C2C2 100%);font-size:36rpx;border-radius:48rpx;width:60vw;height:80rpx; margin-bottom:60rpx;", name: "",
form: { idCard: "",
room: "", phone: "",
name: "", leaveDate: "",
idCard: "", desc: "",
phone: "", imageUrl: "",
leaveDate: "", pickerValue: "",
desc: "", problemType: "",
imageUrl: "", },
pickerValue: "", forceCheckoutDesc: "",
problemType: "", baseInfo: {
}, roomId: "",
forceCheckoutDesc: "", },
baseInfo: { descRemark: "",
roomId: "", fileList: [],
}, img1: [],
descRemark: "", showDate: false,
fileList: [], minDate: "2000-01-01",
img1: [], maxDate: "2100-12-31",
showDate: false, descStyle:
minDate: "2000-01-01", "background:#f7f8fa;border-radius:12rpx;padding:24rpx;font-size:28rpx;color:#222;min-height:250rpx;box-sizing:border-box;",
maxDate: "2100-12-31", problemTypeOptions: [
descStyle: "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, this.baseInfo;
buildingName, return `${apartmentName || ""}${buildingName || ""}${unitName || ""}${
unitName,
roomTypeName
} =
this.baseInfo;
return `${apartmentName || ""}${buildingName || ""}${unitName || ""}${
roomTypeName || "" roomTypeName || ""
}`; }`;
}, },
}, },
methods: { methods: {
handleQuery() { handleQuery() {
getResidentInfo({ console.log("查询参数:", this.form);
idCard: this.form.idCard getResidentInfo({
}).then((res) => { idCard: this.form.idCard,
if (res.code === 200) { }).then((res) => {
console.log("查询结果:", res); if (res.code === 200) {
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 {
});
},
//
beforeRead(event) {
//
const {
file
} = event;
if (file.size > 10 * 1024 * 1024) {
// 10MB
uni.showToast({ uni.showToast({
title: "文件过大", title: res.message,
icon: "none" icon: "none",
}); });
return false;
} }
return true; });
}, },
handleClear() {
this.form = {
room: "",
name: "",
idCard: "",
phone: "",
leaveDate: "",
desc: "",
imageUrl: "",
pickerValue: "",
problemType: "",
};
},
//
beforeRead(event) {
//
const { file } = event;
if (file.size > 10 * 1024 * 1024) {
// 10MB
uni.showToast({
title: "文件过大",
icon: "none",
});
return false;
}
return true;
},
// //
async afterRead(event) { async afterRead(event) {
let lists = [].concat(event.file); let lists = [].concat(event.file);
let fileListLen = this[`fileList${event.name}`].length; let fileListLen = this[`fileList${event.name}`].length;
lists.map((item) => { lists.map((item) => {
this[`fileList${event.name}`].push({ this[`fileList${event.name}`].push({
...item, ...item,
status: "uploading", status: "uploading",
message: "上传中", message: "上传中",
}); });
}); });
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await uploadImage(lists[i].url); const result = await uploadImage(lists[i].url);
let item = this[`fileList${event.name}`][fileListLen]; let item = this[`fileList${event.name}`][fileListLen];
this[`fileList${event.name}`].splice( this[`fileList${event.name}`].splice(
fileListLen, fileListLen,
1, 1,
Object.assign(item, { Object.assign(item, {
status: "success", status: "success",
message: "", message: "",
url: result.url, url: result.url,
}) })
); );
fileListLen++; fileListLen++;
} }
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;
}, },
// //
deletePic(event) { deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1); this[`fileList${event.name}`].splice(event.index, 1);
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;
}, },
onProblemTypeConfirm(e) { onProblemTypeConfirm(e) {
const selectedItem = e.value[0]; const selectedItem = e.value[0];
this.form.problemType = selectedItem.label; // this.form.problemType = selectedItem.label; //
this.form.problemTypeValue = selectedItem.value; // this.form.problemTypeValue = selectedItem.value; //
this.showProblemTypePicker = false; this.showProblemTypePicker = false;
}, },
submit() { submit() {
const params = { const params = {
// idCard: this.baseInfo.idCard, // idCard: this.baseInfo.idCard,
chooseRoomRecId: this.baseInfo.chooseRecId, chooseRoomRecId: this.baseInfo.chooseRecId,
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, //退 imageList: this.fileList, //退
}; };
console.log(params, "params"); console.log(params, "params");
this.handleTempSave(params); this.handleTempSave(params);
}, },
handleTempSave(params) { handleTempSave(params) {
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;
width: 100vw; width: 100vw;
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;
font-size: 28rpx !important; font-size: 28rpx !important;
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;
border: 2rpx solid #f0f0f0; border: 2rpx solid #f0f0f0;
border-radius: 16rpx; border-radius: 16rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
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;
border-radius: 50%; border-radius: 50%;
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;
height: 120rpx !important; height: 120rpx !important;
display: flex !important; display: flex !important;
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