房屋详情待完善

This commit is contained in:
Zy
2026-05-14 17:57:09 +08:00
parent 0d3bb25e86
commit 9645412534
16 changed files with 562 additions and 185 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="AddBuildingBox">
<PageHeader :title="houseid ? '编辑房屋' : '添加房屋'"></PageHeader>
<PageHeader></PageHeader>
<div class="AddBuildingBody">
<div class="title">基本信息</div>
<div class="addBuildingFormBody">
@@ -11,7 +11,7 @@
</el-select>
</el-form-item>
<el-form-item label="单元" prop="unit">
<el-select v-model.number="form.unitNo" placeholder="请选择">
<el-select @change="changeUnitNo" v-model.number="form.unitNo" placeholder="请选择">
<el-option v-for="item in units" :key="item.no" :label="item.name" :value="item.no" />
</el-select>
</el-form-item>
@@ -43,24 +43,24 @@
</el-form-item>
<el-form-item label="房屋户型">
<div class="houseTypebox">
<el-input v-model="housetype[0]" placeholder="" />
<el-input v-model="housetype[0]" placeholder="房间" />
<span></span>
<el-input v-model="housetype[1]" placeholder="厅" />
<el-input v-model="housetype[1]" placeholder="厅" />
<span></span>
<el-input v-model="housetype[2]" placeholder="卫" />
<el-input v-model="housetype[2]" placeholder="卫生间" />
<span></span>
</div>
</el-form-item>
<!-- <el-form-item label="车位号" prop="buildingAddress">
<el-select v-model="form.ParkingSpaceNumber" class="m-2" placeholder="请选择车位号">
<el-option v-for="item in building" :key="item.id" :label="item.name" :value="item.id" />
<el-form-item label="车位号" prop="parkingId">
<el-select v-model="form.parkingId" class="m-2" placeholder="请选择车位号">
<el-option v-for="item in parkinglist" :key="item.id" :label="item.parkingName" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="储藏室" prop="buildingDescription">
<el-select v-model="form.storeroom" class="m-2" placeholder="请选择储藏室">
<el-option v-for="item in building" :key="item.id" :label="item.name" :value="item.id" />
<el-form-item label="储藏室" prop="storeroomId">
<el-select v-model="form.storeroomId" class="m-2" placeholder="请选择储藏室">
<el-option v-for="item in storeRoomlist" :key="item.id" :label="item.storeroomName" :value="item.id" />
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancelForm">取消</el-button>
@@ -77,6 +77,8 @@ import PageHeader from '@/components/Pageheader/index.vue';
import { useHouseStore } from '@/store/modules/house';
import { addHouseAPI, EditHouseApi, getBuildingOnly, getHouseApi, getHouselistAPI } from '@/api/system/house';
import { addHouseType } from '@/api/system/house/type';
import { GetVillageListParking, listParking } from '@/api/system/parking';
import { GetVillagelistStoreroom, listStoreroom } from '@/api/system/storeroom';
const router = useRouter();
const route = useRoute();
@@ -90,7 +92,9 @@ const form = ref<addHouseType>({
houseArea: '', //建筑面积
internalArea: '', //套内面积
shareArea: '', // 公摊面积
houseType: '' // 房屋户型
houseType: '', // 房屋户型
storeroomId: '', // 储藏室
parkingId: '' // 车位
});
const rules = ref({
buildingId: [{ required: true, message: '请输入楼栋', trigger: 'blur' }],
@@ -107,27 +111,60 @@ const units = ref([]);
const floors = ref([]);
const houseid = ref(null);
if (route.query.id) {
houseid.value = route.query.id;
getHouseApi(houseid.value).then((res) => {
form.value = {
...form.value,
buildingId: res.data.buildingId, // 楼栋id
houseId: res.data.houseId, // 房屋id
unitNo: res.data.unitNo,
floorNo: res.data.floorNo,
houseNo: res.data.houseNo, // 房间号
houseArea: res.data.houseArea, //建筑面积
internalArea: res.data.internalArea, //套内面积
shareArea: res.data.shareArea // 公摊面积
};
housetype.value = res.data.houseType.split('');
handlechangeBuild(form.value.buildingId);
});
}
// 车位列表
const parkinglist = ref([]);
// 储藏室列表
const storeRoomlist = ref([]);
const queryChangestore = ref({
// buildingId
buildingId: null,
// unitno,
unitNo: null
});
// TODO 回显 车位,储藏, 以为后端筛选完出没人的房屋
const villageid = localStorage.getItem('villageid');
async function init() {
const res = await GetVillageListParking(villageid);
parkinglist.value = res.data;
const res1 = await GetVillagelistStoreroom({
...queryChangestore.value,
villageid: villageid
});
storeRoomlist.value = res1.data;
nextTick(() => geteditinfo());
}
init();
function geteditinfo() {
if (route.query.id) {
houseid.value = route.query.id;
getHouseApi(houseid.value).then((res) => {
form.value = {
...form.value,
buildingId: res.data.buildingId, // 楼栋id
houseId: res.data.houseId, // 房屋id
unitNo: res.data.unitNo,
floorNo: res.data.floorNo,
houseNo: res.data.houseNo, // 房间号
houseArea: res.data.houseArea, //建筑面积
internalArea: res.data.internalArea, //套内面积
storeroomId: res.data.storeroomId, //储藏室
parkingId: res.data.parkingId, //车位
shareArea: res.data.shareArea // 公摊面积
};
housetype.value = res.data.houseType.split('');
// handlechangeBuild(form.value.buildingId);
console.log(housetype.value);
});
}
}
// 选择楼栋
function handlechangeBuild(id: string) {
queryChangestore.value.buildingId = id;
form.value.unitNo = '';
form.value.floorNo = '';
getBuildingOnly(id).then((res) => {
units.value = Array.from({ length: res.data.unitCount }).map((_, index) => {
return {
@@ -142,7 +179,28 @@ function handlechangeBuild(id: string) {
};
});
});
getStoreRoomlist();
}
// change unit
function changeUnitNo(id: number) {
queryChangestore.value.unitNo = id;
form.value.floorNo = '';
getStoreRoomlist();
}
// 查询储藏室列表
function getStoreRoomlist() {
GetVillagelistStoreroom({
...queryChangestore.value,
villageid: villageid
}).then((res) => {
form.value.storeroom = '';
storeRoomlist.value = [];
storeRoomlist.value = res.data;
});
}
const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
if (valid) {

View File

@@ -4,80 +4,81 @@
<div class="AddBuildingBody">
<div class="title">
<span>基本信息</span>
<el-button type="primary" text>编辑</el-button>
<el-button type="primary" text @click="editHouse">编辑</el-button>
</div>
<div class="addBuildingFormBody">
<div class="descriptionsbox">
<div class="label">房号:</div>
<div class="value">娜美</div>
<div class="value">{{ HouseInfo.house?.houseNo ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">所属小区:</div>
<div class="value">18100000000</div>
<div class="value">{{ HouseInfo.house?.villageName ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">楼栋:</div>
<div class="value">2</div>
<div class="value">{{ HouseInfo.house?.buildingName ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">单元:</div>
<div class="value">2单元</div>
<div class="value">{{ HouseInfo.house?.unitNo ?? '--' }} 单元</div>
</div>
<div class="descriptionsbox">
<div class="label">楼层:</div>
<div class="value">3</div>
<div class="value">{{ HouseInfo.house?.floorNo ?? '--' }} </div>
</div>
<div class="descriptionsbox">
<div class="label">建筑面积:</div>
<div class="value">112</div>
<div class="value">{{ HouseInfo.house?.houseArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">公摊面积:</div>
<div class="value">12</div>
<div class="value">{{ HouseInfo.house?.shareArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">户型:</div>
<div class="value">3室2厅2卫</div>
<div class="value">
{{ HouseInfo.house?.houseType ? HouseInfo.house?.houseType.split('')[0] : '--' }}
{{ HouseInfo.house?.houseType ? HouseInfo.house?.houseType.split('')[1] : '--' }}
{{ HouseInfo.house?.houseType ? HouseInfo.house?.houseType.split('')[2] : '--' }}
</div>
</div>
</div>
</div>
<!-- 储藏室信息 -->
<div class="AddBuildingBody">
<div class="title">
<span>储藏室信息 </span>
<el-button type="primary" text>编辑</el-button>
<el-button type="primary" text @click="editStoreRoom">编辑</el-button>
</div>
<div class="addBuildingFormBody">
<div class="descriptionsbox">
<div class="label">房号:</div>
<div class="value">娜美</div>
</div>
<div class="descriptionsbox">
<div class="label">所属小区:</div>
<div class="value">18100000000</div>
</div>
<div class="descriptionsbox">
<div class="label">楼栋:</div>
<div class="value">2</div>
<div class="value">{{ HouseInfo.storeroom?.buildingName ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">单元:</div>
<div class="value">2单元</div>
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} 单元</div>
</div>
<div class="descriptionsbox">
<div class="label">楼层:</div>
<div class="value">3</div>
<div class="label">储藏室号:</div>
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} </div>
</div>
<div class="descriptionsbox">
<div class="label">建筑面积:</div>
<div class="value">112</div>
<div class="value">{{ HouseInfo.storeroom?.houseArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">公摊面积:</div>
<div class="value">12</div>
<div class="value">{{ HouseInfo.storeroom?.shareArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">户型:</div>
<div class="value">3室2厅2卫</div>
<div class="label">实用面积:</div>
<div class="value">{{ HouseInfo.storeroom?.internalArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">备注:</div>
<div class="value"></div>
</div>
</div>
</div>
@@ -85,41 +86,52 @@
<div class="AddBuildingBody">
<div class="title">
<span>车位信息</span>
<el-button type="primary" text>编辑</el-button>
<el-button type="primary" text @click="handleEditParking" v-if="HouseInfo.parking">编辑</el-button>
</div>
<div class="addBuildingFormBody">
<div class="addBuildingFormBody" v-if="HouseInfo.parking">
<div class="descriptionsbox">
<div class="label">房号:</div>
<div class="value">娜美</div>
<div class="label">区域:</div>
<div class="value">{{ HouseInfo.storeroom?.shareArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">所属小区:</div>
<div class="label">车位编号:</div>
<div class="value">18100000000</div>
</div>
<div class="descriptionsbox">
<div class="label">楼栋:</div>
<div class="label">车位面积:</div>
<div class="value">2</div>
</div>
<div class="descriptionsbox">
<div class="label">单元:</div>
<div class="label">楼层:</div>
<div class="value">2单元</div>
</div>
<div class="descriptionsbox">
<div class="label">楼层:</div>
<div class="label">车位类型:</div>
<div class="value">3</div>
</div>
<div class="descriptionsbox">
<div class="label">建筑面积:</div>
<div class="label">车位状态:</div>
<div class="value">112</div>
</div>
<div class="descriptionsbox">
<div class="label">公摊面积:</div>
<div class="label">持有人:</div>
<div class="value">12</div>
</div>
<div class="descriptionsbox">
<div class="label">户型:</div>
<div class="label">添加时间:</div>
<div class="value">3室2厅2卫</div>
</div>
<div class="descriptionsbox">
<div class="label">添加人:</div>
<div class="value">3室2厅2卫</div>
</div>
<div class="descriptionsbox">
<div class="label">备注:</div>
<div class="value"></div>
</div>
</div>
<div v-else class="w-full h-full flex flex-center min-h-4rem">
<span style="color: #999; font-weight: 500; font-size: 1.1rem; letter-spacing: 10px">暂无信息</span>
</div>
</div>
<!-- 收费项目 -->
@@ -128,7 +140,7 @@
<span>收费项目</span>
</div>
<div>
<el-table :data="tableData" style="width: 100%">
<el-table :data="HouseInfo.chargeItemList" style="width: 100%">
<el-table-column prop="date" label="收费项目" />
<el-table-column prop="name" label="收费标准" />
<el-table-column prop="name" label="开始时间" />
@@ -144,13 +156,20 @@
<span>相关住户</span>
</div>
<div>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="date" label="姓名" />
<el-table-column prop="name" label="性别" />
<el-table-column prop="name" label="联系电话" />
<el-table-column prop="name" label="身份" />
<el-table :data="HouseInfo.residentList" style="width: 100%">
<el-table-column prop="residentName" label="姓名" />
<el-table-column prop="gender" label="性别">
<template #default="scope">
<DictTag :options="sys_user_sex" :value="scope.row.gender"></DictTag>
</template>
</el-table-column>
<el-table-column prop="phone" label="联系电话" />
<el-table-column prop="ownerRelationship" label="身份">
<template #default="scope">
<DictTag :options="com_resident_relationship" :value="scope.row.ownerRelationship"></DictTag>
</template>
</el-table-column>
<el-table-column prop="name" label="备注" />
<el-table-column prop="address" label="操作" />
</el-table>
</div>
</div>
@@ -160,13 +179,22 @@
<span>缴费账单</span>
</div>
<div>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="date" label="姓名" />
<el-table-column prop="name" label="性别" />
<el-table-column prop="name" label="联系电话" />
<el-table-column prop="name" label="身份" />
<el-table-column prop="name" label="备注" />
<el-table-column prop="address" label="操作" />
<el-table :data="HouseInfo.billResidentList" align="center" style="width: 100%">
<el-table-column prop="billCode" label="账单编号" />
<el-table-column prop="billName" label="账单名称" />
<el-table-column prop="chargeTypeName" label="账单项目" />
<el-table-column prop="money" label="金额">
<template #default="scope">
<span v-if="scope.row.chargeTypeName === '水费' || scope.row.chargeTypeName === '电费'">--</span>
<span v-else>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column prop="payStatus" label="支付状态">
<template #default="scope">
<span v-if="scope.row.chargeTypeName === '水费' || scope.row.chargeTypeName === '电费'">--</span>
<DictTag :options="com_pay_status" :value="scope.row.payStatus"></DictTag>
</template>
</el-table-column>
</el-table>
</div>
</div>
@@ -176,6 +204,12 @@
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { Data, getHouseMain } from '@/api/system/house';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_resident_relationship } = toRefs<any>(proxy?.useDict('com_resident_relationship'));
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
const { com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_status'));
const tableData = [
{
date: '2016-05-03',
@@ -198,6 +232,52 @@ const tableData = [
address: 'No. 189, Grove St, Los Angeles'
}
];
const route = useRoute();
const router = useRouter();
const routeid = ref('');
const HouseInfo = ref<Data>({
billResidentList: [],
chargeItemList: [],
house: null,
parking: null,
residentList: [],
storeroom: null
});
function editHouse() {
router.push({
path: '/house/editHouse',
query: {
id: HouseInfo.value.house.houseId
}
});
}
function editStoreRoom() {
router.push({
path: '/house/EditStoreRoom',
query: {
id: HouseInfo.value.storeroom.storeroomId
}
});
}
function handleEditParking() {
router.push({
path: '/house/editParking',
query: {
id: HouseInfo.value.parking.parkingId
}
});
}
function init() {
if (route.query.id) {
routeid.value = route.query.id as string;
getHouseMain(routeid.value).then((res) => {
console.log(res);
HouseInfo.value = res.data;
});
}
}
init();
</script>
<style scoped lang="scss">

View File

@@ -39,15 +39,15 @@ const menutlist = [
// { label: '详情', value: 'main' }
];
if (checkPermi(['system:house:remove'])) {
menutlist.push({ label: '删除', value: 'delete' });
}
if (checkPermi(['system:house:edit'])) {
menutlist.push({ label: '编辑', value: 'edit' });
}
if (checkPermi(['system:house:query'])) {
if (checkPermi(['system:house:ByIdList'])) {
menutlist.push({ label: '详情', value: 'main' });
}
if (checkPermi(['system:house:remove'])) {
menutlist.push({ label: '删除', value: 'delete' });
}
function handleChangeCheckhouses(val: string[]) {
houseStore.checkoutHousesFun([]);
houseStore.checkoutHousesFun(val);
@@ -76,7 +76,6 @@ function contextMenuFun(val: { type: string; value: string }) {
if (!checkPermi(['house:delete:house'])) {
break;
}
proxy?.$modal.confirm('该信息删除后无法恢复,确定要删除吗?').then(() => {
deleteHouseApi(val.value).then(() => {
houseStore.switchBuilding(houseStore.currentBuildingInfo.id);

View File

@@ -0,0 +1,57 @@
export interface Response {
code: number;
data: Data;
msg: string;
}
export interface Data {
billResidentList: BillResidentList[];
chargeItemList: string[];
house: House;
parking: null;
residentList: ResidentList[];
storeroom: Storeroom;
}
export interface BillResidentList {
billCode: string;
billName: string;
chargeItemId: string;
chargeTypeName: string;
money: string;
payStatus: string;
useCount: string;
}
export interface House {
buildingName: string;
floorNo: number;
houseArea: string;
houseId: number;
houseNo: string;
houseType: string;
internalArea: string;
shareArea: string;
unitNo: number;
villageName: string;
}
export interface ResidentList {
gender: string;
ownerRelationship: string;
phone: string;
residentId: string;
residentName: string;
residentStatus: string;
residentType: string;
}
export interface Storeroom {
buildingName: string;
houseArea: string;
internalArea: string;
shareArea: string;
storeroomId: number;
storeroomNo: string;
unitNo: number;
}

View File

@@ -70,15 +70,9 @@
</el-table-column>
<el-table-column fixed="right" label="操作" width="180">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button v-hasPermi="['system:menu:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)" />
</el-tooltip>
<el-tooltip content="新增" placement="top">
<el-button v-hasPermi="['system:menu:add']" link type="primary" icon="Plus" @click="handleAdd(scope.row)" />
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button v-hasPermi="['system:menu:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)" />
</el-tooltip>
<el-button v-hasPermi="['system:menu:edit']" link type="primary" @click="handleUpdate(scope.row)">修改</el-button>
<el-button v-hasPermi="['system:menu:add']" link type="primary" @click="handleAdd(scope.row)">新增</el-button>
<el-button v-hasPermi="['system:menu:remove']" link type="primary" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -63,8 +63,8 @@
<el-table-column label="车位面积" align="center" prop="parkingArea">
<template #default="scope"> {{ scope.row.parkingArea }} </template>
</el-table-column>
<el-table-column label="楼层" align="center" prop="parkingFloor" />
<el-table-column label="车位状态" align="center" prop="parkingStatus">
<el-table-column label="楼层" width="80" align="center" prop="parkingFloor" />
<el-table-column label="车位状态" width="80" align="center" prop="parkingStatus">
<template #default="scope">
<dict-tag :options="com_parking_status" :value="scope.row.parkingStatus" />
</template>
@@ -80,8 +80,8 @@
<dict-tag :options="com_review" :value="scope.row.checkStatus" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" v-if="scope.row.checkStatus === '0'" @click="handleMain(scope.row)" v-hasPermi="['parking:parking:query']"
>审核</el-button

View File

@@ -133,10 +133,14 @@
<div class="w-full h-full flex mt-2">
<div class="title">审批意见</div>
<div class="preivewBodybox flex-1 ml-5">
<el-input type="textarea" :rows="5"></el-input>
<el-input v-model="form.propertyReviewFeedback" type="textarea" :rows="5"></el-input>
<div class="actions mt-5">
<el-button type="primary">审核通过</el-button>
<el-button type="danger">审核通过</el-button>
<el-button :disabled="!Boolean(parkingReviewinfo.car && parkingReviewinfo.parking.id)" type="primary" @click="handlePreivew(1)"
>审核通过</el-button
>
<el-button :disabled="!Boolean(parkingReviewinfo.car && parkingReviewinfo.parking.id)" type="danger" @click="handlePreivew(0)"
>审核不通过</el-button
>
<el-button @click="handlBacK">返回</el-button>
</div>
</div>
@@ -177,7 +181,8 @@
</el-step>
<el-step>
<template #title>
<span>审核完成</span>
<span v-if="active <= 5">审核完成</span>
<span v-else>审核完成</span>
</template>
</el-step>
</el-steps>
@@ -191,7 +196,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getParkingReviewInfo } from '@/api/system/parking';
import { getParkingReview, getParkingReviewInfo } from '@/api/system/parking';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_parking_status } = toRefs<any>(proxy?.useDict('com_parking_status'));
@@ -222,7 +227,38 @@ const router = useRouter();
const route = useRoute();
const id = ref('');
const parkingReviewinfo = ref({
type parkingReviewType = {
parking: {
id: string;
areaId: string;
areaName: string;
villageId: string;
villageName: string;
parkingCode: string;
parkingArea: any;
parkingStatus: string;
type: string;
residentId: any;
residentName: any;
parkingFloor: string;
createName: string;
checkStatus: string;
remark: string;
createTime: string;
delFlag: any;
};
car: any;
parkingReviewProcess: {
submitStatus: null;
propertyStatus: null;
certificationStatus: null;
submitTime: string;
propertyTime: string;
certificationTime: string;
};
};
const parkingReviewinfo = ref<parkingReviewType>({
parking: {
'id': '',
'areaId': '',
@@ -253,6 +289,10 @@ const parkingReviewinfo = ref({
}
});
const form = ref({
propertyReviewFeedback: '',
propertyStatus: '0'
});
function getInfo() {
if (route.query.id) {
id.value = route.query.id as string;
@@ -270,6 +310,7 @@ function handleActivestaus(rews) {
active.value = 0;
return;
}
// 提交
if (rews.submitStatus === reviewStatus.unSubmit) {
activeStop.value = 0;
active.value = 0;
@@ -285,6 +326,7 @@ function handleActivestaus(rews) {
active.value = reviewStatus.ReviewPass;
activeStop.value = 2;
// 审核
if (rews.certificationStatus === 0) {
active.value = reviewStatus.uncertification;
} else if (rews.certificationStatus === 1) {
@@ -295,6 +337,17 @@ function handleActivestaus(rews) {
}
}
// 审核状态
// 物业审核状态 0 待审核 1审核通过 2审核未通过
function handlePreivew(status: number) {
getParkingReview({
...form.value,
propertyStatus: status,
id: id.value
}).then((res) => {
console.log(res);
});
}
function handlBacK() {
router.back();
}