8/6 校验问题
This commit is contained in:
@@ -64,9 +64,7 @@ export const billEdit = (data: { 'detailsId': string[]; 'payType': string; 'payS
|
||||
url: '/cash/billEdit',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'isEncrypt': 'true'
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -74,11 +74,11 @@ interface uploadHouseImagetype {
|
||||
}[];
|
||||
'error': string[];
|
||||
}
|
||||
export const uploadHouseImage = (formdata: FormData): AxiosPromise<uploadHouseImagetype> => {
|
||||
export const uploadHouseImage = (formData: FormData): AxiosPromise<uploadHouseImagetype> => {
|
||||
return request({
|
||||
url: '/houseRental/uploadImages',
|
||||
method: 'POST',
|
||||
data: formdata
|
||||
data: formData
|
||||
});
|
||||
};
|
||||
export const getHouseOwnUser = (houseId: string): AxiosPromise<uploadHouseImagetype> => {
|
||||
@@ -88,7 +88,6 @@ export const getHouseOwnUser = (houseId: string): AxiosPromise<uploadHouseImaget
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 房屋租赁管理 改变状态 0:下架 1:上架
|
||||
* @param houseId
|
||||
@@ -96,7 +95,7 @@ export const getHouseOwnUser = (houseId: string): AxiosPromise<uploadHouseImaget
|
||||
export const changeHouseRedientStatus = (houseId: string): AxiosPromise<uploadHouseImagetype> => {
|
||||
return request({
|
||||
url: `/houseRental/changeStatus/${houseId}`,
|
||||
method: 'PUT',
|
||||
method: 'PUT'
|
||||
});
|
||||
};
|
||||
|
||||
@@ -111,3 +110,16 @@ export const HouseRedientSign = (data: HouseRentalForm): AxiosPromise<uploadHous
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 房屋租赁管理 签约上传
|
||||
* @param url
|
||||
* @param data
|
||||
*/
|
||||
export const HouseRedientSignUpload = (url: string, data: FormData) => {
|
||||
return request({
|
||||
url: url,
|
||||
method: 'POST',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -57,7 +57,7 @@ export interface HouseRentalVO {
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
phone: number;
|
||||
phone: string;
|
||||
|
||||
/**
|
||||
* 微信
|
||||
@@ -92,50 +92,25 @@ export interface HouseRentalVO {
|
||||
}
|
||||
|
||||
export interface HouseRentalForm extends BaseEntity {
|
||||
/**
|
||||
* 收费模式
|
||||
*/
|
||||
chargeMode: string;
|
||||
/**
|
||||
* 收费标准
|
||||
*/
|
||||
chargeStandard: string;
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
contractNo: string;
|
||||
/**
|
||||
* 合同状态
|
||||
*/
|
||||
contractStatus: string;
|
||||
/**
|
||||
* 房屋id
|
||||
*/
|
||||
houseId?: string;
|
||||
/**
|
||||
* 租赁结束时间
|
||||
*/
|
||||
leaseEndDate: string;
|
||||
/**
|
||||
* 租赁起始时间
|
||||
*/
|
||||
leaseStartDate: string;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 房屋租赁ID
|
||||
*/
|
||||
rentalId: string;
|
||||
/**
|
||||
* 承租方姓名
|
||||
*/
|
||||
tenantName: string;
|
||||
/**
|
||||
* 承租方联系电话
|
||||
*/
|
||||
tenantPhone: string;
|
||||
id: string;
|
||||
houseId: string;
|
||||
rentalName: string; // 租户姓名
|
||||
rent: string; // 租金
|
||||
houseFace: string; // 房屋朝向
|
||||
rentalType: string; // 整租合租
|
||||
phone: string; //手机号
|
||||
houseArea: number; // 房屋面积
|
||||
floorNo: number; //楼层号
|
||||
inTime: string; //入住时间
|
||||
facilities: string; //房屋设施
|
||||
houseImageUrl: string; //房屋图片
|
||||
supInfo: string; //补充租房信息
|
||||
vx: string; //微信
|
||||
houseUse: string; //房屋用途
|
||||
rentalStatus: number; //租赁状态
|
||||
buildingId: string; //楼栋id
|
||||
unitNoId: string; //单元id
|
||||
email: string; //邮箱
|
||||
/**
|
||||
* 小区id
|
||||
*/
|
||||
@@ -153,6 +128,7 @@ export interface HouseRentalSigningVO {
|
||||
'leaseStartDate': string;
|
||||
'leaseEndDate': string;
|
||||
'houseId': string;
|
||||
contractUrl: string;
|
||||
'villageId': string;
|
||||
'remark': string;
|
||||
'createTime': string;
|
||||
|
||||
1
src/assets/icons/svg/jifen.svg
Normal file
1
src/assets/icons/svg/jifen.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1785922870272" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5271" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M672 364.8 576 364.8l38.4-38.4c12.8-12.8 12.8-25.6 0-38.4-12.8-12.8-25.6-12.8-38.4 0L512 358.4 441.6 288c-12.8-12.8-25.6-12.8-38.4 0-12.8 12.8-12.8 25.6 0 38.4L448 364.8 358.4 364.8c-38.4 0-64 32-64 64 0 32 19.2 57.6 51.2 64l0 211.2c0 12.8 12.8 25.6 25.6 25.6l300.8 0c12.8 0 25.6-12.8 25.6-25.6L697.6 499.2c25.6-6.4 51.2-32 51.2-64C742.4 396.8 710.4 364.8 672 364.8L672 364.8zM358.4 448C345.6 448 339.2 441.6 339.2 435.2c0-6.4 6.4-19.2 19.2-19.2l134.4 0L492.8 448 358.4 448 358.4 448zM640 684.8 390.4 684.8 390.4 499.2l102.4 0 0 108.8c0 12.8 12.8 25.6 25.6 25.6 12.8 0 25.6-12.8 25.6-25.6L544 499.2 640 499.2 640 684.8 640 684.8zM672 448 544 448 544 416l134.4 0c6.4 0 19.2 6.4 19.2 19.2C691.2 441.6 684.8 448 672 448L672 448zM512 0C230.4 0 0 230.4 0 512s230.4 512 512 512c281.6 0 512-230.4 512-512S793.6 0 512 0L512 0zM505.6 985.6c-262.4 0-473.6-211.2-473.6-473.6 0-262.4 211.2-473.6 473.6-473.6 262.4 0 473.6 211.2 473.6 473.6C979.2 774.4 768 985.6 505.6 985.6L505.6 985.6zM505.6 985.6" fill="#272636" p-id="5272"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
src/assets/icons/svg/jifenfenlei.svg
Normal file
1
src/assets/icons/svg/jifenfenlei.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1785923003615" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7309" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M112.127 284.09a390.766 200.815 0 1 0 799.746 0 390.766 200.815 0 1 0-799.746 0z" p-id="7310"></path><path d="M512 551.409c-163.335 0-303.792-50.328-365.87-122.452-21.857 25.394-34.003 53.489-34.003 83.043 0 113.492 179.03 205.495 399.873 205.495S911.873 625.492 911.873 512c0-29.554-12.145-57.649-34.003-83.043C815.792 501.08 675.335 551.409 512 551.409z" p-id="7311"></path><path d="M512 784.985c-165.467 0-307.456-51.648-368.263-125.285-20.35 24.644-31.61 51.752-31.61 80.21 0 113.492 179.03 205.495 399.873 205.495s399.873-92.003 399.873-205.495c0-28.46-11.26-55.566-31.61-80.21C819.456 733.337 677.467 784.985 512 784.985z" p-id="7312"></path></svg>
|
||||
|
After Width: | Height: | Size: 987 B |
1
src/assets/icons/svg/jifenshangpin.svg
Normal file
1
src/assets/icons/svg/jifenshangpin.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1785922964475" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6299" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M862.208 5.12H161.8944C81.6128 5.3248 16.5888 71.9872 16.5888 154.2144v715.6736c0 82.1248 64.9216 148.8896 145.3056 148.992h700.2112c80.2816-0.2048 145.3056-66.8672 145.3056-148.992V154.2144C1007.4112 72.0896 942.3872 5.4272 862.208 5.12z m83.2512 864.768c0.1024 47.2064-37.1712 85.504-83.2512 85.7088H161.8944c-46.08-0.1024-83.456-38.5024-83.3536-85.7088V298.1888h866.9184v571.6992z m0-634.9824H78.5408v-80.6912c0-47.3088 37.376-85.7088 83.3536-85.7088h700.2112c45.9776 0 83.3536 38.5024 83.3536 85.7088v80.6912z m-724.992 242.7904h32.8704C268.8 609.8944 378.6752 712.3968 512 712.6016c133.3248-0.2048 243.2-102.7072 258.6624-234.9056h32.8704c17.1008 0 30.9248-14.2336 30.9248-31.6416 0-17.5104-13.824-31.6416-30.9248-31.6416H679.7312c-17.1008 0-30.9248 14.2336-30.9248 31.6416 0 17.5104 13.824 31.6416 30.9248 31.6416h28.5696C693.3504 574.7712 611.0208 649.216 512 649.216c-99.0208 0-181.3504-74.4448-196.1984-171.52h28.5696c17.1008 0 30.9248-14.2336 30.9248-31.6416 0-17.5104-13.824-31.6416-30.9248-31.6416h-123.904c-17.1008 0-30.9248 14.2336-30.9248 31.6416 0 17.5104 13.824 31.6416 30.9248 31.6416z" fill="#5D5D5D" p-id="6300"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -44,7 +44,9 @@ const whiteVillageId = [
|
||||
'/warehouse',
|
||||
'/notification/read', // 已读
|
||||
'/cash/billList',
|
||||
'/houseRental/changeStatus'
|
||||
'/houseRental/changeStatus', // 房屋租赁 - 上架/下架
|
||||
'/points/pointsProducts/list', // 积分商品列表
|
||||
'/points/*'
|
||||
// '/building/list'
|
||||
];
|
||||
|
||||
@@ -135,7 +137,7 @@ service.interceptors.request.use(
|
||||
const s_url = sessionObj.url; // 请求地址
|
||||
const s_data = sessionObj.data; // 请求数据
|
||||
const s_time = sessionObj.time; // 请求时间
|
||||
const interval = 200; // 间隔时间(ms),小于此时间视为重复提交
|
||||
const interval = 100; // 间隔时间(ms),小于此时间视为重复提交╬╬2╬╬
|
||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||
const message = '数据正在处理,请勿重复提交';
|
||||
console.warn(`[${s_url}]: ` + message);
|
||||
|
||||
@@ -79,7 +79,17 @@ const form = ref({
|
||||
|
||||
const rules = {
|
||||
houseId: [{ required: true, message: '请选择具体房屋', trigger: 'blur' }],
|
||||
applyName: [{ required: true, message: '请输入申请人', trigger: 'blur' }],
|
||||
applyName: [
|
||||
{ required: true, message: '请输入申请人', trigger: 'blur' },
|
||||
{
|
||||
validator: (_: any, value: string | number, callback: any) => {
|
||||
if (value === '' || value === undefined) {
|
||||
return callback(new Error('请输入申请人姓名'));
|
||||
}
|
||||
return !validator(value, 'fullFilterReg') ? callback() : callback(new Error('请输入正确的申请人姓名'));
|
||||
}
|
||||
}
|
||||
],
|
||||
decorationCompany: [
|
||||
{ required: true, message: '请输入装修公司名称', trigger: 'blur' },
|
||||
{
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form label-width="120px" ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form label-width="120px" ref="queryFormRef" :rules="rules" :model="queryParams" :inline="true">
|
||||
<el-form-item label="申请人姓名" prop="applyName">
|
||||
<el-input maxlength="20" v-model="queryParams.applyName" placeholder="请输入申请人姓名" clearable @keyup.enter="handleQuery" />
|
||||
<el-input maxlength="20" v-model.trim="queryParams.applyName" placeholder="请输入申请人姓名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="装修验收结果" prop="inspectionResult">
|
||||
<el-form-item label="装修验收结果">
|
||||
<el-select clearable @clear="handleClear" v-model="queryParams.inspectionResult" placeholder="请选择装修验收结果" style="width: 240px">
|
||||
<el-option v-for="item in com_decoration_status" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
@@ -108,7 +108,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收人" :prop="isEditComputed ? '' : 'inspectionName'">
|
||||
<el-input :disabled="isEditComputed" v-model="form.inspectionName" />
|
||||
<el-input :disabled="isEditComputed" placeholder="请输入验收人" v-model.trim="form.inspectionName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
@@ -136,6 +136,7 @@
|
||||
import { listDecoration, delDecoration, updateDecoration } from '@/api/system/Decoration';
|
||||
import { DecorationVO, DecorationQuery, DecorationForm } from '@/api/system/Decoration/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
import { validator } from '@/utils/Reg';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_decoration_status } = toRefs<any>(proxy?.useDict('com_decoration_status'));
|
||||
@@ -185,7 +186,28 @@ const data = reactive<PageData<DecorationForm, DecorationQuery>>({
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
inspectionName: [{ required: true, message: '验收人姓名不能为空', trigger: 'blur' }],
|
||||
inspectionName: [
|
||||
{ required: true, message: '验收人姓名不能为空', trigger: 'blur' },
|
||||
{
|
||||
validator: (_: any, value: string | number, callback: any) => {
|
||||
if (value === '' || value === '') {
|
||||
return callback(new Error('请输入验收人姓名'));
|
||||
}
|
||||
return validator(value, 'ChineseName') ? callback() : callback(new Error('请输入正确的验收人姓名'));
|
||||
}
|
||||
}
|
||||
],
|
||||
applyName: [
|
||||
{ required: false, message: '申请人姓名不能为空', trigger: 'blur' },
|
||||
{
|
||||
validator: (_: any, value: string | number, callback: any) => {
|
||||
if (value === '' || value === undefined) {
|
||||
return callback();
|
||||
}
|
||||
return !validator(value, 'fullFilterReg') ? callback() : callback(new Error('请输入正确的申请人姓名'));
|
||||
}
|
||||
}
|
||||
],
|
||||
inspectionResult: [{ required: true, message: '验收结果不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<el-form-item label="时间范围" prop="timeData">
|
||||
<el-date-picker
|
||||
v-model="timeData"
|
||||
style="min-width: 380px"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange"
|
||||
|
||||
@@ -80,6 +80,7 @@ import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { getChargeItem, updateChargeItem, addChargeItem } from '@/api/system/SdbChargeItem';
|
||||
import { listChargeType } from '@/api/system/ChargeType';
|
||||
import { validator } from '@/utils/Reg';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_charge_item_unit } = toRefs<any>(proxy?.useDict('com_charge_item_unit'));
|
||||
@@ -105,7 +106,17 @@ const form = ref({
|
||||
'formula': ''
|
||||
});
|
||||
const rules = ref({
|
||||
itemName: [{ required: true, message: '请输入 项目名称', trigger: 'blur' }],
|
||||
itemName: [
|
||||
{ required: true, message: '请输入 项目名称', trigger: 'blur' },
|
||||
{
|
||||
validator: (_: any, value: string | number, callback: (arg0?: Error) => any) => {
|
||||
if (value === '' || value === undefined) {
|
||||
return callback(new Error('请输入项目名称'));
|
||||
}
|
||||
return !validator(value, 'fullFilterReg') ? callback() : callback(new Error('请输入正确的项目名称'));
|
||||
}
|
||||
}
|
||||
],
|
||||
typeId: [{ required: true, message: '请选择 收费类型', trigger: 'blur' }],
|
||||
billingType: [{ required: true, message: '请输入 计费方式', trigger: 'blur' }],
|
||||
fixedPrice: [
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" @submit.prevent="handleQuery">
|
||||
<el-form ref="queryFormRef" :rules="rules" :model="queryParams" :inline="true" @submit.prevent="handleQuery">
|
||||
<el-form-item label="项目名称" prop="itemName">
|
||||
<el-input maxlength="20" v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter.prevent="handleQuery" />
|
||||
</el-form-item>
|
||||
@@ -99,6 +99,7 @@ import DictTag from '@/components/DictTag/index.vue';
|
||||
import { listChargeItem, delChargeItem, updateChargeItem } from '@/api/system/SdbChargeItem';
|
||||
import { ChargeItemVO, ChargeItemQuery, ChargeItemForm } from '@/api/system/SdbChargeItem/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
import { validator } from '@/utils/Reg';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_charge_item_method } = toRefs<any>(proxy?.useDict('com_charge_item_method'));
|
||||
@@ -128,10 +129,21 @@ const data = reactive<PageData<ChargeItemForm, ChargeItemQuery>>({
|
||||
pageSize: 10,
|
||||
itemName: undefined
|
||||
},
|
||||
rules: {}
|
||||
rules: {
|
||||
itemName: [
|
||||
{
|
||||
validator: (_: any, value: string | number, callback: (arg0?: Error) => any) => {
|
||||
if (value === '' || value === undefined) {
|
||||
return callback();
|
||||
}
|
||||
return !validator(value, 'fullFilterReg') ? callback() : callback(new Error('请输入正确的项目名称'));
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams } = toRefs(data);
|
||||
const { queryParams, rules } = toRefs(data);
|
||||
|
||||
/** 查询收费项目管理列表 */
|
||||
const getList = async () => {
|
||||
|
||||
@@ -48,14 +48,11 @@
|
||||
<span>{{ parseTime(scope.row.recordMonth, '{y}-{m}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始日期" align="center" prop="startTime" width="180">
|
||||
<el-table-column label="起止日期" width="250" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束日期" align="center" prop="endTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}/{m}/{d}') }}</span>
|
||||
<span> - </span>
|
||||
<span>{{ parseTime(scope.row.endTime, '{y}/{m}/{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="recordMonth" width="180">
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
</div>
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<el-table
|
||||
:default-sort="{ prop: 'residentName', order: 'descending' }"
|
||||
v-loading="loading"
|
||||
border
|
||||
:data="tableData"
|
||||
@@ -157,7 +156,7 @@
|
||||
<el-table-column label="优惠金额" width="100" align="center" prop="singleDiscountAmount" />
|
||||
<el-table-column label="实缴金额" width="100" align="center" prop="actualAccount" />
|
||||
<el-table-column label="缴费人" width="120" align="center" prop="residentName" />
|
||||
<el-table-column label="缴费时间" width="200" sortable align="center" prop="payTime" />
|
||||
<el-table-column label="缴费时间" width="200" align="center" prop="payTime" />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
@@ -557,6 +556,7 @@ function handleChargeItem(id: string) {
|
||||
// 选择楼栋
|
||||
function handleChangeBuilding(val: string): void {
|
||||
queryParams.value.unitNoId = undefined;
|
||||
queryParams.value.houseId = undefined;
|
||||
unitList.value = [];
|
||||
getHouselistAPI(val).then((res) => {
|
||||
unitList.value = res.data.units;
|
||||
|
||||
@@ -367,14 +367,20 @@ const handleAvatarSuccess: UploadProps['onSuccess'] = (response) => {
|
||||
}
|
||||
};
|
||||
|
||||
const blockedExts = ['.exe', '.bat', '.cmd', '.msi'];
|
||||
const blockedExits = ['.exe', '.bat', '.cmd', '.msi'];
|
||||
const allowExits = ['.bmp", ".gif", ".jpg", ".jpeg", ".png'];
|
||||
const handleChangeFile = (uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
||||
const ext = uploadFile.name.toLowerCase().slice(uploadFile.name.lastIndexOf('.'));
|
||||
if (blockedExts.includes(ext)) {
|
||||
if (blockedExits.includes(ext)) {
|
||||
ElMessage.warning(`禁止上传 ${ext} 文件`);
|
||||
uploadRef.value.handleRemove(uploadFile);
|
||||
return;
|
||||
}
|
||||
if (!allowExits.includes(ext)) {
|
||||
ElMessage.warning(`只允许上传jpg,jpeg,png等`);
|
||||
uploadRef.value.handleRemove(uploadFile);
|
||||
return;
|
||||
}
|
||||
fileList.value = uploadFiles;
|
||||
};
|
||||
const handleExceed = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="h-full p-2 flex flex-col">
|
||||
<Pageheader title="房屋租赁"></Pageheader>
|
||||
<pageHeader></pageHeader>
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card>
|
||||
@@ -90,11 +90,8 @@
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="680px" append-to-body>
|
||||
<el-form ref="houseRentalFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="合同编号" prop="contractNo">
|
||||
<el-input maxlength="20" show-word-limit v-model.trim="form.contractNo" placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="villageId">
|
||||
<el-input disabled maxlength="20" v-model.trim="form.villageName" placeholder="请输入区域" />
|
||||
</el-form-item>
|
||||
@@ -116,6 +113,9 @@
|
||||
<el-form-item label="收费标准" prop="chargeStandard">
|
||||
<el-input v-model.trim="form.chargeStandard" placeholder="请输入收费标准" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contractNo">
|
||||
<el-input maxlength="20" show-word-limit v-model.trim="form.contractNo" placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同状态" prop="contractStatus">
|
||||
<el-input v-model.trim="form.contractStatus" placeholder="请输入合同状态" />
|
||||
</el-form-item>
|
||||
@@ -139,6 +139,28 @@
|
||||
placeholder="请选择租赁终止日"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同附件">
|
||||
<el-upload
|
||||
accept=".png,.jpg,.jpeg, .pdf"
|
||||
class="upload-demo"
|
||||
ref="uploadRef"
|
||||
:show-file-list="true"
|
||||
v-model:file-list="showImgList"
|
||||
name="files"
|
||||
:onChange="handleChange"
|
||||
:onExceed="handleExceed"
|
||||
:multiple="true"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
:action="uploadApi"
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text"><em>点击</em>或者将文件<em>拖拽</em>到这里上传</div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">支持 .png, .jpg, .pdf</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -151,17 +173,20 @@
|
||||
</template>
|
||||
|
||||
<script setup name="HouseRental" lang="ts">
|
||||
import Pageheader from '@/components/Pageheader/index.vue';
|
||||
import { listHouseRental, delHouseRental, changeHouseRedientStatus, HouseRedientSign } from '@/api/system/houseRental/index';
|
||||
import { HouseRentalVO, HouseRentalQuery, HouseRentalForm } from '@/api/system/houseRental/type';
|
||||
import pageHeader from '@/components/Pageheader/index.vue';
|
||||
import { changeHouseRedientStatus, delHouseRental, HouseRedientSign, HouseRedientSignUpload, listHouseRental } from '@/api/system/houseRental';
|
||||
import { HouseRentalForm, HouseRentalQuery, HouseRentalVO } from '@/api/system/houseRental/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
import { listHouseUseType_add_house } from '@/api/system/houseUse';
|
||||
import { validator } from '@/utils/Reg';
|
||||
import { UploadFilled } from '@element-plus/icons-vue';
|
||||
import { ElMessage, UploadUserFile } from 'element-plus';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_rental_status } = toRefs<any>(proxy?.useDict('com_rental_status'));
|
||||
const { com_rental_method } = toRefs<any>(proxy?.useDict('com_rental_method'));
|
||||
|
||||
const uploadApi = '/houseRental/uploadImages';
|
||||
const router = useRouter();
|
||||
const houseRentalList = ref<HouseRentalVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
@@ -185,6 +210,7 @@ type HouseRentalFormType = HouseRentalForm & {
|
||||
villageName?: string;
|
||||
houseName?: string;
|
||||
houseArea?: number;
|
||||
contractUrl?: string;
|
||||
};
|
||||
|
||||
const initFormData: HouseRentalFormType = {
|
||||
@@ -199,6 +225,7 @@ const initFormData: HouseRentalFormType = {
|
||||
'leaseEndDate': undefined,
|
||||
'houseId': undefined,
|
||||
'villageId': undefined,
|
||||
'contractUrl': undefined,
|
||||
'remark': undefined
|
||||
};
|
||||
|
||||
@@ -235,9 +262,8 @@ const data = reactive<PageData<HouseRentalFormType, HouseRentalQuery>>({
|
||||
],
|
||||
tenantPhone: [
|
||||
{ required: true, message: '请输入承租方联系电话', trigger: 'blur' },
|
||||
{ min: 11, max: 11, message: '承租方联系电话长度必须为 11 个字符', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule: any, value: string, callback: any) => {
|
||||
validator: (_: any, value: string, callback: any) => {
|
||||
if (!validator(value, 'phone')) {
|
||||
callback(new Error('承租方联系电话格式错误'));
|
||||
} else {
|
||||
@@ -260,7 +286,7 @@ const data = reactive<PageData<HouseRentalFormType, HouseRentalQuery>>({
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询房屋租赁管理列表 */
|
||||
/** 查询房屋租赁管理列表╬₧2╬╬ */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
listHouseRental(queryParams.value)
|
||||
@@ -355,6 +381,7 @@ function handleHouseUse(houseUser: string) {
|
||||
|
||||
// 签约
|
||||
function sign(row: HouseRentalVO) {
|
||||
clearForm();
|
||||
form.value = {
|
||||
...row.signingList?.[0]
|
||||
};
|
||||
@@ -362,9 +389,22 @@ function sign(row: HouseRentalVO) {
|
||||
form.value.villageName = info.villageName;
|
||||
form.value.houseName = row.name;
|
||||
form.value.houseArea = row.houseArea;
|
||||
form.value.tenantPhone = row.phone;
|
||||
form.value.houseId = row.houseId;
|
||||
form.value.villageId = info.villageId;
|
||||
form.value.rentalId = row.id;
|
||||
if (row.signingList && row.signingList.length > 0) {
|
||||
showImgList.value = row.signingList[0].contractUrl.split(',').map((item, index) => {
|
||||
return {
|
||||
uid: index,
|
||||
name: item.split('.com/')[1].split('/')[3],
|
||||
url: item,
|
||||
isLink: true
|
||||
};
|
||||
});
|
||||
} else {
|
||||
showImgList.value = [];
|
||||
}
|
||||
dialog.visible = true;
|
||||
dialog.title = '签约';
|
||||
}
|
||||
@@ -375,17 +415,62 @@ function putOnSale(row: HouseRentalVO) {
|
||||
getList();
|
||||
});
|
||||
}
|
||||
const uploadRef = ref();
|
||||
const MAX_UPLOAD_FILES = 9;
|
||||
const showImgList = ref([]);
|
||||
// 超出总数量拦截,不再只限制单次选择
|
||||
const handleExceed = () => {
|
||||
ElMessage.warning(`最多只能上传 ${MAX_UPLOAD_FILES} 张轮播图`);
|
||||
};
|
||||
const handleChange = (file: UploadUserFile) => {
|
||||
// 实时判断当前已存在图片总数
|
||||
if (showImgList.value.length >= MAX_UPLOAD_FILES) {
|
||||
ElMessage.warning(`最多上传${MAX_UPLOAD_FILES}张,无法继续添加`);
|
||||
// 清除刚选中的文件,防止缓存残留
|
||||
uploadRef.value?.handleRemove(file);
|
||||
return;
|
||||
}
|
||||
};
|
||||
// 批量上传校验图片数量,前后端数量匹配校验
|
||||
const uploadAllCarousel = async () => {
|
||||
const filterArr = showImgList.value.filter((item) => {
|
||||
return !item.isLink && item.raw;
|
||||
});
|
||||
const oldArr = showImgList.value.filter((item) => item.isLink && !item.raw);
|
||||
if (filterArr.length > 0) {
|
||||
const formData = new FormData();
|
||||
filterArr.forEach((fileItem) => {
|
||||
formData.append('files', fileItem.raw!);
|
||||
});
|
||||
const res = await HouseRedientSignUpload(uploadApi, formData);
|
||||
// 校验后端返回图片数量和本地选中数量一致
|
||||
if (res.code !== 200 || !res.data?.success?.length) {
|
||||
ElMessage.warning(res.msg || '文件上传失败');
|
||||
throw new Error('上传失败');
|
||||
}
|
||||
return [...res.data.success.map((item: any) => item.url), ...oldArr.map((item) => item.url)];
|
||||
} else {
|
||||
return [...oldArr.map((item) => item.url)];
|
||||
}
|
||||
};
|
||||
function submitForm() {
|
||||
houseRentalFormRef.value.validate((valid: boolean) => {
|
||||
houseRentalFormRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
const arr = await uploadAllCarousel();
|
||||
// 拼接最终图片字符串
|
||||
form.value.contractUrl = arr.join(',');
|
||||
HouseRedientSign(form.value).then(() => {
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
dialog.visible = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function clearForm() {
|
||||
form.value = { ...initFormData };
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getHouseUseType();
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<el-option v-for="item in com_inspection_remind_tiime" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划路线">
|
||||
<el-form-item label="计划路线" prop="routeIds">
|
||||
<el-select @change="handleChangeMap" v-model="form.routeIds" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="item in playlist" :key="item.value" :label="item.routeName" :value="item.id" />
|
||||
</el-select>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<el-form-item label="巡检路线名称" prop="routeName">
|
||||
<el-input maxlength="20" v-model.trim="form.routeName" placeholder="请输入巡检路线名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="巡检点">
|
||||
<el-form-item label="巡检点" prop="routeName">
|
||||
<div class="itemBox">
|
||||
<div
|
||||
class="item"
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="绘制巡检路线">
|
||||
<el-form-item label="绘制巡检路线" prop="routeName">
|
||||
<MapWrapper :click-or-draw="false" ref="MapWrapperRef"></MapWrapper>
|
||||
<div class="tips flex flex-items-center justify-between">
|
||||
<div>点击地图,绘制巡检路线;再次点击可继续绘制下一条(但只能保留一条)</div>
|
||||
@@ -156,15 +156,19 @@ onMounted(async () => {
|
||||
|
||||
// !== 提交 =============================================================================
|
||||
const submitForm = () => {
|
||||
form.value.totalPoints = checkoutPointList.value.join(',');
|
||||
if (form.value.routeName.trim() === '') {
|
||||
ElMessage.warning('请输入巡检路线名称');
|
||||
return;
|
||||
}
|
||||
if (checkoutPointList.value.length <= 0) {
|
||||
ElMessage.warning('请选择巡检点');
|
||||
return;
|
||||
}
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
// 获取路线经纬度
|
||||
const path = MapWrapperRef.value.getAllDrawLines() as LngLat[];
|
||||
console.log(path);
|
||||
if (path.length === 0) {
|
||||
ElMessage.warning('请绘制巡检路线');
|
||||
return;
|
||||
@@ -179,7 +183,7 @@ const submitForm = () => {
|
||||
form.value.endLat = `${end_lat}`;
|
||||
|
||||
form.value.pathPoints = JSON.stringify(path);
|
||||
form.value.totalPoints = checkoutPointList.value.join(',');
|
||||
|
||||
if (routeId.value) {
|
||||
updateRoute(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
<el-option v-for="item in com_inspection_remind_tiime" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联计划" props="planId">
|
||||
<el-form-item label="关联计划" prop="planId">
|
||||
<el-select @change="handleChangeMap" v-model="form.planId" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="item in planList" :key="item.id" :label="item.planName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划路线" props="planId">
|
||||
<el-form-item label="计划路线" prop="planId">
|
||||
<MapWrapper v-loading="mapLoading" :disabled="true" ref="MapWrapperRef"></MapWrapper>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容">
|
||||
<editor v-model="form.noticeContent" :min-height="192" />
|
||||
<editor v-model.trim="form.noticeContent" :min-height="192" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -168,9 +168,6 @@ const rules = ref({
|
||||
if (Number.isNaN(val)) {
|
||||
return callback(new Error('请输入数字'));
|
||||
}
|
||||
if (val <= 0) {
|
||||
return callback(new Error('请输入大于0的数字'));
|
||||
}
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
@@ -199,7 +196,7 @@ const rules = ref({
|
||||
if (Number.isNaN(val)) {
|
||||
return callback(new Error('请输入数字'));
|
||||
}
|
||||
if (val <= 0) {
|
||||
if (val < 0) {
|
||||
return callback(new Error('请输入大于0的数字'));
|
||||
}
|
||||
return callback();
|
||||
|
||||
@@ -52,26 +52,26 @@
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="revenueNoticeFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="公告标题" prop="noticeTitle">
|
||||
<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
|
||||
<el-input v-model.trim="form.noticeTitle" placeholder="请输入公告标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公告内容">
|
||||
<editor v-model="form.noticeContent" :min-height="192" />
|
||||
<editor v-model.trim="form.noticeContent" :min-height="192" />
|
||||
</el-form-item>
|
||||
<el-form-item label="作者" prop="author">
|
||||
<el-input v-model="form.author" placeholder="请输入作者" />
|
||||
<el-input v-model.trim="form.author" placeholder="请输入作者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急程度 0=普通 1=紧急 2=非常紧急" prop="urgencyLevel">
|
||||
<el-input v-model="form.urgencyLevel" placeholder="请输入紧急程度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布人" prop="publishBy">
|
||||
<el-input v-model="form.publishBy" placeholder="请输入发布人" />
|
||||
<el-input v-model.trim="form.publishBy" placeholder="请输入发布人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期" prop="publishTime">
|
||||
<el-date-picker clearable v-model="form.publishTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择发布日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属小区id" prop="villageId">
|
||||
<el-input v-model="form.villageId" placeholder="请输入所属小区id" />
|
||||
<el-input v-model.trim="form.villageId" placeholder="请输入所属小区id" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
||||
Reference in New Issue
Block a user