Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 8s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 8s
This commit is contained in:
@@ -29,7 +29,7 @@ export interface OrderMaintainVO {
|
|||||||
/**
|
/**
|
||||||
* 服务类型
|
* 服务类型
|
||||||
*/
|
*/
|
||||||
serveType: number;
|
serveType: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 养护周期类型
|
* 养护周期类型
|
||||||
@@ -59,7 +59,7 @@ export interface OrderMaintainVO {
|
|||||||
/**
|
/**
|
||||||
* 巡检结果
|
* 巡检结果
|
||||||
*/
|
*/
|
||||||
inspectResult: number;
|
inspectResult: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理措施
|
* 处理措施
|
||||||
@@ -79,7 +79,7 @@ export interface OrderMaintainVO {
|
|||||||
/**
|
/**
|
||||||
* 处理状态
|
* 处理状态
|
||||||
*/
|
*/
|
||||||
state: number;
|
state: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OrderMaintainForm extends BaseEntity {
|
export interface OrderMaintainForm extends BaseEntity {
|
||||||
@@ -111,7 +111,7 @@ export interface OrderMaintainForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 服务类型
|
* 服务类型
|
||||||
*/
|
*/
|
||||||
serveType?: number;
|
serveType?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 养护周期类型
|
* 养护周期类型
|
||||||
@@ -141,7 +141,7 @@ export interface OrderMaintainForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 巡检结果
|
* 巡检结果
|
||||||
*/
|
*/
|
||||||
inspectResult?: number;
|
inspectResult?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理措施
|
* 处理措施
|
||||||
@@ -161,7 +161,7 @@ export interface OrderMaintainForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 处理状态
|
* 处理状态
|
||||||
*/
|
*/
|
||||||
state?: number;
|
state?: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OrderMaintainQuery extends PageQuery {
|
export interface OrderMaintainQuery extends PageQuery {
|
||||||
@@ -188,7 +188,7 @@ export interface OrderMaintainQuery extends PageQuery {
|
|||||||
/**
|
/**
|
||||||
* 服务类型
|
* 服务类型
|
||||||
*/
|
*/
|
||||||
serveType?: number;
|
serveType?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 养护周期类型
|
* 养护周期类型
|
||||||
@@ -218,7 +218,7 @@ export interface OrderMaintainQuery extends PageQuery {
|
|||||||
/**
|
/**
|
||||||
* 巡检结果
|
* 巡检结果
|
||||||
*/
|
*/
|
||||||
inspectResult?: number;
|
inspectResult?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理措施
|
* 处理措施
|
||||||
@@ -238,10 +238,92 @@ export interface OrderMaintainQuery extends PageQuery {
|
|||||||
/**
|
/**
|
||||||
* 处理状态
|
* 处理状态
|
||||||
*/
|
*/
|
||||||
state?: number;
|
state?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期范围参数
|
* 日期范围参数
|
||||||
*/
|
*/
|
||||||
params?: any;
|
params?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface conservationManagement extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 养护名称
|
||||||
|
*/
|
||||||
|
maintainName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区id
|
||||||
|
*/
|
||||||
|
communityId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建筑id
|
||||||
|
*/
|
||||||
|
buildingId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层id
|
||||||
|
*/
|
||||||
|
floorId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务类型
|
||||||
|
*/
|
||||||
|
serveType: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 养护周期类型
|
||||||
|
*/
|
||||||
|
periodType: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 养护周期频次
|
||||||
|
*/
|
||||||
|
periodFrequency: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单id
|
||||||
|
*/
|
||||||
|
orderId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划执行时间
|
||||||
|
*/
|
||||||
|
startTime: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
endTime: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检结果
|
||||||
|
*/
|
||||||
|
inspectResult: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理措施
|
||||||
|
*/
|
||||||
|
measure: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户评分
|
||||||
|
*/
|
||||||
|
customerScore: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户反馈
|
||||||
|
*/
|
||||||
|
customerAdvice: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理状态
|
||||||
|
*/
|
||||||
|
state: string | number;
|
||||||
|
}
|
||||||
|
@@ -77,6 +77,11 @@ export interface RentalPlanForm extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
remarks?: string;
|
remarks?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方案下绿植产品
|
||||||
|
*/
|
||||||
|
productList:any[];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RentalPlanQuery extends PageQuery {
|
export interface RentalPlanQuery extends PageQuery {
|
||||||
|
@@ -29,7 +29,7 @@ export interface Resident_unitVO {
|
|||||||
/**
|
/**
|
||||||
* 联系电话
|
* 联系电话
|
||||||
*/
|
*/
|
||||||
phone: number;
|
phone: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入驻位置
|
* 入驻位置
|
||||||
@@ -87,7 +87,7 @@ export interface Resident_unitForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 联系电话
|
* 联系电话
|
||||||
*/
|
*/
|
||||||
phone?: number;
|
phone?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入驻位置
|
* 入驻位置
|
||||||
@@ -140,7 +140,7 @@ export interface Resident_unitQuery extends PageQuery {
|
|||||||
/**
|
/**
|
||||||
* 联系电话
|
* 联系电话
|
||||||
*/
|
*/
|
||||||
phone?: number;
|
phone?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入驻位置
|
* 入驻位置
|
||||||
@@ -197,13 +197,15 @@ export interface Unit extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 联系电话
|
* 联系电话
|
||||||
*/
|
*/
|
||||||
phone?: number;
|
phone?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入驻位置
|
* 入驻位置
|
||||||
*/
|
*/
|
||||||
location?: string;
|
location?: string;
|
||||||
|
|
||||||
|
locationDetail?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入驻时间
|
* 入驻时间
|
||||||
*/
|
*/
|
||||||
|
@@ -40,7 +40,6 @@ export interface AttachVO {
|
|||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
createTime: string;
|
createTime: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AttachForm extends BaseEntity {
|
export interface AttachForm extends BaseEntity {
|
||||||
@@ -117,3 +116,45 @@ export interface AttachQuery extends PageQuery {
|
|||||||
*/
|
*/
|
||||||
params?: any;
|
params?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface conferenceAddServices extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室id
|
||||||
|
*/
|
||||||
|
meetId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
projectName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
price: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
unit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
type: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
state: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
createTime: string;
|
||||||
|
}
|
@@ -0,0 +1,61 @@
|
|||||||
|
import type { BookingVO, BookingForm, BookingQuery } from './model';
|
||||||
|
|
||||||
|
import type { ID, IDS } from '#/api/common';
|
||||||
|
import type { PageResult } from '#/api/common';
|
||||||
|
|
||||||
|
import { commonExport } from '#/api/helper';
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询booking列表
|
||||||
|
* @param params
|
||||||
|
* @returns booking列表
|
||||||
|
*/
|
||||||
|
export function bookingList(params?: BookingQuery) {
|
||||||
|
return requestClient.get<PageResult<BookingVO>>('/system/booking/list', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出booking列表
|
||||||
|
* @param params
|
||||||
|
* @returns booking列表
|
||||||
|
*/
|
||||||
|
export function bookingExport(params?: BookingQuery) {
|
||||||
|
return commonExport('/system/booking/export', params ?? {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询booking详情
|
||||||
|
* @param id id
|
||||||
|
* @returns booking详情
|
||||||
|
*/
|
||||||
|
export function bookingInfo(id: ID) {
|
||||||
|
return requestClient.get<BookingVO>(`/system/booking/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增booking
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function bookingAdd(data: BookingForm) {
|
||||||
|
return requestClient.postWithMsg<void>('/system/booking', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新booking
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function bookingUpdate(data: BookingForm) {
|
||||||
|
return requestClient.putWithMsg<void>('/system/booking', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除booking
|
||||||
|
* @param id id
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function bookingRemove(id: ID | IDS) {
|
||||||
|
return requestClient.deleteWithMsg<void>(`/system/booking/${id}`);
|
||||||
|
}
|
264
apps/web-antd/src/api/property/roomBooking/conferenceReservationRecords/model.d.ts
vendored
Normal file
264
apps/web-antd/src/api/property/roomBooking/conferenceReservationRecords/model.d.ts
vendored
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||||
|
|
||||||
|
export interface BookingVO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室id
|
||||||
|
*/
|
||||||
|
meetId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室地址
|
||||||
|
*/
|
||||||
|
meetLocation: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属单位
|
||||||
|
*/
|
||||||
|
unit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定人
|
||||||
|
*/
|
||||||
|
person: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
phone: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定开始时间
|
||||||
|
*/
|
||||||
|
scheduledStarttime: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定结束时间
|
||||||
|
*/
|
||||||
|
scheduledEndtime: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参会人数
|
||||||
|
*/
|
||||||
|
personSum: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用
|
||||||
|
*/
|
||||||
|
price: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否包含增值服务
|
||||||
|
*/
|
||||||
|
attach: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态
|
||||||
|
*/
|
||||||
|
payState: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
state: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
createById: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
updateById: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
searchValue: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BookingForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室id
|
||||||
|
*/
|
||||||
|
meetId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室地址
|
||||||
|
*/
|
||||||
|
meetLocation?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属单位
|
||||||
|
*/
|
||||||
|
unit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定人
|
||||||
|
*/
|
||||||
|
person?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
phone?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定开始时间
|
||||||
|
*/
|
||||||
|
scheduledStarttime?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定结束时间
|
||||||
|
*/
|
||||||
|
scheduledEndtime?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参会人数
|
||||||
|
*/
|
||||||
|
personSum?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用
|
||||||
|
*/
|
||||||
|
price?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否包含增值服务
|
||||||
|
*/
|
||||||
|
attach?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态
|
||||||
|
*/
|
||||||
|
payState?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
state?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
createById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
updateById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
searchValue?: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BookingQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室id
|
||||||
|
*/
|
||||||
|
meetId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室地址
|
||||||
|
*/
|
||||||
|
meetLocation?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属单位
|
||||||
|
*/
|
||||||
|
unit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定人
|
||||||
|
*/
|
||||||
|
person?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
phone?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定开始时间
|
||||||
|
*/
|
||||||
|
scheduledStarttime?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定结束时间
|
||||||
|
*/
|
||||||
|
scheduledEndtime?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参会人数
|
||||||
|
*/
|
||||||
|
personSum?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用
|
||||||
|
*/
|
||||||
|
price?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否包含增值服务
|
||||||
|
*/
|
||||||
|
attach?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态
|
||||||
|
*/
|
||||||
|
payState?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
state?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
createById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
updateById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
searchValue?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
@@ -0,0 +1,61 @@
|
|||||||
|
import type { MeetVO, MeetForm, MeetQuery } from './model';
|
||||||
|
|
||||||
|
import type { ID, IDS } from '#/api/common';
|
||||||
|
import type { PageResult } from '#/api/common';
|
||||||
|
|
||||||
|
import { commonExport } from '#/api/helper';
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室设置列表
|
||||||
|
* @param params
|
||||||
|
* @returns 会议室设置列表
|
||||||
|
*/
|
||||||
|
export function meetList(params?: MeetQuery) {
|
||||||
|
return requestClient.get<PageResult<MeetVO>>('/system/meet/list', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出会议室设置列表
|
||||||
|
* @param params
|
||||||
|
* @returns 会议室设置列表
|
||||||
|
*/
|
||||||
|
export function meetExport(params?: MeetQuery) {
|
||||||
|
return commonExport('/system/meet/export', params ?? {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室设置详情
|
||||||
|
* @param id id
|
||||||
|
* @returns 会议室设置详情
|
||||||
|
*/
|
||||||
|
export function meetInfo(id: ID) {
|
||||||
|
return requestClient.get<MeetVO>(`/system/meet/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增会议室设置
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function meetAdd(data: MeetForm) {
|
||||||
|
return requestClient.postWithMsg<void>('/system/meet', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新会议室设置
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function meetUpdate(data: MeetForm) {
|
||||||
|
return requestClient.putWithMsg<void>('/system/meet', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室设置
|
||||||
|
* @param id id
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function meetRemove(id: ID | IDS) {
|
||||||
|
return requestClient.deleteWithMsg<void>(`/system/meet/${id}`);
|
||||||
|
}
|
159
apps/web-antd/src/api/property/roomBooking/conferenceSettings/model.d.ts
vendored
Normal file
159
apps/web-antd/src/api/property/roomBooking/conferenceSettings/model.d.ts
vendored
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||||
|
|
||||||
|
export interface MeetVO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
location: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容纳人数
|
||||||
|
*/
|
||||||
|
personNumber: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础服务
|
||||||
|
*/
|
||||||
|
baseServiceId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础价格
|
||||||
|
*/
|
||||||
|
basePrice: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增值服务是否启用
|
||||||
|
*/
|
||||||
|
attach: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
createById: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
updateById: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
searchValue: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MeetForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
location?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容纳人数
|
||||||
|
*/
|
||||||
|
personNumber?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础服务
|
||||||
|
*/
|
||||||
|
baseServiceId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础价格
|
||||||
|
*/
|
||||||
|
basePrice?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增值服务是否启用
|
||||||
|
*/
|
||||||
|
attach?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
createById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
updateById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
searchValue?: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MeetQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
location?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容纳人数
|
||||||
|
*/
|
||||||
|
personNumber?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础服务
|
||||||
|
*/
|
||||||
|
baseServiceId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础价格
|
||||||
|
*/
|
||||||
|
basePrice?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增值服务是否启用
|
||||||
|
*/
|
||||||
|
attach?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
createById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
updateById?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
searchValue?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
@@ -1,182 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { Recordable } from '@vben/types';
|
|
||||||
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
|
|
||||||
import {
|
|
||||||
useVbenVxeGrid,
|
|
||||||
vxeCheckboxChecked,
|
|
||||||
type VxeGridProps
|
|
||||||
} from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
import {
|
|
||||||
attachExport,
|
|
||||||
attachList,
|
|
||||||
attachRemove,
|
|
||||||
} from '#/api/property/attach';
|
|
||||||
import type { AttachForm } from '#/api/property/attach/model';
|
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
|
||||||
|
|
||||||
import attachModal from './attach-modal.vue';
|
|
||||||
import { columns, querySchema } from './data';
|
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
|
||||||
commonConfig: {
|
|
||||||
labelWidth: 80,
|
|
||||||
componentProps: {
|
|
||||||
allowClear: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
schema: querySchema(),
|
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
|
||||||
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
|
|
||||||
// 不需要直接删除
|
|
||||||
// fieldMappingTime: [
|
|
||||||
// [
|
|
||||||
// 'createTime',
|
|
||||||
// ['params[beginTime]', 'params[endTime]'],
|
|
||||||
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
|
|
||||||
// ],
|
|
||||||
// ],
|
|
||||||
};
|
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
|
||||||
checkboxConfig: {
|
|
||||||
// 高亮
|
|
||||||
highlight: true,
|
|
||||||
// 翻页时保留选中状态
|
|
||||||
reserve: true,
|
|
||||||
// 点击行选中
|
|
||||||
// trigger: 'row',
|
|
||||||
},
|
|
||||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
||||||
// columns: columns(),
|
|
||||||
columns,
|
|
||||||
height: 'auto',
|
|
||||||
keepSource: true,
|
|
||||||
pagerConfig: {},
|
|
||||||
proxyConfig: {
|
|
||||||
ajax: {
|
|
||||||
query: async ({ page }, formValues = {}) => {
|
|
||||||
return await attachList({
|
|
||||||
pageNum: page.currentPage,
|
|
||||||
pageSize: page.pageSize,
|
|
||||||
...formValues,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rowConfig: {
|
|
||||||
keyField: 'id',
|
|
||||||
},
|
|
||||||
// 表格全局唯一表示 保存列配置需要用到
|
|
||||||
id: 'property-attach-index'
|
|
||||||
};
|
|
||||||
|
|
||||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
|
||||||
formOptions,
|
|
||||||
gridOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
const [AttachModal, modalApi] = useVbenModal({
|
|
||||||
connectedComponent: attachModal,
|
|
||||||
});
|
|
||||||
|
|
||||||
function handleAdd() {
|
|
||||||
modalApi.setData({});
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleEdit(row: Required<AttachForm>) {
|
|
||||||
modalApi.setData({ id: row.id });
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleDelete(row: Required<AttachForm>) {
|
|
||||||
await attachRemove(row.id);
|
|
||||||
await tableApi.query();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleMultiDelete() {
|
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
|
||||||
const ids = rows.map((row: Required<AttachForm>) => row.id);
|
|
||||||
Modal.confirm({
|
|
||||||
title: '提示',
|
|
||||||
okType: 'danger',
|
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
|
||||||
onOk: async () => {
|
|
||||||
await attachRemove(ids);
|
|
||||||
await tableApi.query();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleDownloadExcel() {
|
|
||||||
commonDownloadExcel(attachExport, '会议室增值服务数据', tableApi.formApi.form.values, {
|
|
||||||
fieldMappingTime: formOptions.fieldMappingTime,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page :auto-content-height="true">
|
|
||||||
<BasicTable table-title="会议室增值服务列表">
|
|
||||||
<template #toolbar-tools>
|
|
||||||
<Space>
|
|
||||||
<a-button
|
|
||||||
v-access:code="['property:attach:export']"
|
|
||||||
@click="handleDownloadExcel"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.export') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
|
||||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
|
||||||
danger
|
|
||||||
type="primary"
|
|
||||||
v-access:code="['property:attach:remove']"
|
|
||||||
@click="handleMultiDelete">
|
|
||||||
{{ $t('pages.common.delete') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
v-access:code="['property:attach:add']"
|
|
||||||
@click="handleAdd"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.add') }}
|
|
||||||
</a-button>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
<template #action="{ row }">
|
|
||||||
<Space>
|
|
||||||
<ghost-button
|
|
||||||
v-access:code="['property:attach:edit']"
|
|
||||||
@click.stop="handleEdit(row)"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.edit') }}
|
|
||||||
</ghost-button>
|
|
||||||
<Popconfirm
|
|
||||||
:get-popup-container="getVxePopupContainer"
|
|
||||||
placement="left"
|
|
||||||
title="确认删除?"
|
|
||||||
@confirm="handleDelete(row)"
|
|
||||||
>
|
|
||||||
<ghost-button
|
|
||||||
danger
|
|
||||||
v-access:code="['property:attach:remove']"
|
|
||||||
@click.stop=""
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.delete') }}
|
|
||||||
</ghost-button>
|
|
||||||
</Popconfirm>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<AttachModal @reload="tableApi.query()" />
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
考勤组设置
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
节假日
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
班次设置
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
打卡记录
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
每日统计
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
假期类型
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
排班管理
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -2,7 +2,7 @@ import type { FormSchemaGetter } from '#/adapter/form';
|
|||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
import { getDictOptions } from '#/utils/dict';
|
import { getDictOptions } from '#/utils/dict';
|
||||||
import { renderDict } from '#/utils/render';
|
import { renderDict } from '#/utils/render';
|
||||||
import {orderChargeList} from "#/api/property/chargeManagement";
|
import {rentalOrderList} from "#/api/property/rentalOrder";
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
@@ -64,38 +64,47 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
return (rowIndex + 1).toString();
|
return (rowIndex + 1).toString();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单号',
|
title: '订单号',
|
||||||
field: 'orderId',
|
field: 'orderId',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '租赁合同编号',
|
title: '租赁合同编号',
|
||||||
field: 'userId',
|
field: 'userId',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '租赁人',
|
title: '租赁人',
|
||||||
field: 'userName',
|
field: 'userName',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '租金',
|
title: '租金',
|
||||||
field: 'rent',
|
field: 'rent',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '押金',
|
title: '押金',
|
||||||
field: 'deposit',
|
field: 'deposit',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '违约金',
|
title: '违约金',
|
||||||
field: 'penalty',
|
field: 'penalty',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '总金额',
|
title: '总金额',
|
||||||
field: 'totalAmount',
|
field: 'totalAmount',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收费日期',
|
title: '收费日期',
|
||||||
field: 'chargeDate',
|
field: 'chargeDate',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '支付方式',
|
title: '支付方式',
|
||||||
@@ -105,6 +114,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
return renderDict(row.paymentMethod, 'pro_payment_method');
|
return renderDict(row.paymentMethod, 'pro_payment_method');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '开票状态',
|
title: '开票状态',
|
||||||
@@ -114,10 +124,12 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
return renderDict(row.invoiceStatus, 'pro_invoice_status');
|
return renderDict(row.invoiceStatus, 'pro_invoice_status');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '发票类型',
|
title: '发票类型',
|
||||||
field: 'invoiceType',
|
field: 'invoiceType',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收费状态',
|
title: '收费状态',
|
||||||
@@ -127,10 +139,12 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
return renderDict(row.chargeStatus, 'pro_charging_status');
|
return renderDict(row.chargeStatus, 'pro_charging_status');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
@@ -151,28 +165,35 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
triggerFields: [''],
|
triggerFields: [''],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// label: '订单号',
|
|
||||||
// fieldName: 'orderId',
|
|
||||||
// component: 'Input',
|
|
||||||
// rules: 'required',
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
label: '订单号',
|
label: '订单号',
|
||||||
fieldName: 'orderId',
|
fieldName: 'orderId',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: orderChargeList,
|
api: rentalOrderList,
|
||||||
resultField: 'rows',
|
resultField: 'rows',
|
||||||
valueField: 'orderId',
|
labelField: 'orderNo',
|
||||||
|
valueField: 'id',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// label: '租赁人ID',
|
||||||
|
// fieldName: 'userId',
|
||||||
|
// component: 'ApiSelect',
|
||||||
|
// componentProps: {
|
||||||
|
// api: rentalOrderList,
|
||||||
|
// resultField: 'rows',
|
||||||
|
// labelField: 'customerName',
|
||||||
|
// valueField: 'id',
|
||||||
|
// },
|
||||||
|
// rules: 'required',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
label: '租赁人',
|
label: '租赁人',
|
||||||
fieldName: 'userName',
|
fieldName: 'userName',
|
||||||
component: 'Input',
|
component: "Select",
|
||||||
rules: 'required',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '租金',
|
label: '租金',
|
||||||
@@ -192,6 +213,12 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '总金额',
|
||||||
|
fieldName: 'totalAmount',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '开票状态',
|
label: '开票状态',
|
||||||
fieldName: 'invoiceStatus',
|
fieldName: 'invoiceStatus',
|
||||||
@@ -204,8 +231,11 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
label: '发票类型',
|
label: '发票类型',
|
||||||
fieldName: 'invoiceType',
|
fieldName: 'invoiceType',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
rules: 'required',
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_invoice_type'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '收费状态',
|
label: '收费状态',
|
||||||
@@ -216,4 +246,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '支付方式',
|
||||||
|
fieldName: 'paymentMethod',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_payment_method'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '收费日期',
|
||||||
|
fieldName: 'chargeDate',
|
||||||
|
component: 'DatePicker',
|
||||||
|
componentProps: {
|
||||||
|
showTime: true,
|
||||||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
},
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
import { $t } from '@vben/locales';
|
||||||
import {
|
import {
|
||||||
useVbenVxeGrid,
|
useVbenVxeGrid,
|
||||||
vxeCheckboxChecked,
|
vxeCheckboxChecked,
|
||||||
|
@@ -72,11 +72,11 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<DescriptionsItem label="购买植物">
|
<DescriptionsItem label="购买植物">
|
||||||
{{ orderChargeDetail.createTime }}
|
{{ orderChargeDetail.createTime }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="价格">
|
<DescriptionsItem label="总金额">
|
||||||
{{ orderChargeDetail.createTime }}
|
{{ orderChargeDetail.totalAmount }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="产品图片">
|
<DescriptionsItem label="产品图片">
|
||||||
<img :src="orderChargeDetail.imgPath" alt="">
|
<img :src="orderChargeDetail.createTime" alt="">
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue';
|
import {computed, reactive, ref} from 'vue';
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
@@ -7,6 +7,7 @@ import { useVbenForm } from '#/adapter/form';
|
|||||||
import { orderChargeAdd, orderChargeInfo, orderChargeUpdate } from '#/api/property/chargeManagement';
|
import { orderChargeAdd, orderChargeInfo, orderChargeUpdate } from '#/api/property/chargeManagement';
|
||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
|
import QueryUserList from "#/views/property/greenPlantRentalManagement/chargeManagement/query-user-list.vue";
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
@@ -65,6 +66,10 @@ async function handleConfirm() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
|
if (userInfo) {
|
||||||
|
data.userId = userInfo.userId
|
||||||
|
data.userName = userInfo.userName
|
||||||
|
}
|
||||||
await (isUpdate.value ? orderChargeUpdate(data) : orderChargeAdd(data));
|
await (isUpdate.value ? orderChargeUpdate(data) : orderChargeAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
@@ -75,7 +80,14 @@ async function handleConfirm() {
|
|||||||
modalApi.lock(false);
|
modalApi.lock(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let userInfo = reactive({
|
||||||
|
userId: '',
|
||||||
|
userName: '',
|
||||||
|
});
|
||||||
|
const userName = ref<number | string>('');
|
||||||
|
function getUserInfo(user: any) {
|
||||||
|
userInfo = user;
|
||||||
|
}
|
||||||
async function handleClosed() {
|
async function handleClosed() {
|
||||||
await formApi.resetForm();
|
await formApi.resetForm();
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
@@ -84,7 +96,11 @@ async function handleClosed() {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<BasicModal :title="title">
|
<BasicModal :title="title">
|
||||||
<BasicForm />
|
<BasicForm>
|
||||||
|
<template #userName="slotProps">
|
||||||
|
<QueryUserList @update:userInfo="getUserInfo" v-bind="slotProps" :isUpdate="isUpdate" :userName="userName"/>
|
||||||
|
</template>
|
||||||
|
</BasicForm>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@@ -0,0 +1,81 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import {ref, watch} from 'vue';
|
||||||
|
import {Select} from 'ant-design-vue';
|
||||||
|
import {personInfo, personList} from "#/api/property/resident/person";
|
||||||
|
|
||||||
|
defineOptions({name: 'QueryUserList'});
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
isUpdate?: boolean;
|
||||||
|
userName?: string;
|
||||||
|
}>(), {
|
||||||
|
isUpdate: false,
|
||||||
|
userName: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(() => props.userName,
|
||||||
|
(newX) => {
|
||||||
|
if (props.isUpdate) {
|
||||||
|
getUserInfo(newX)
|
||||||
|
}
|
||||||
|
}, {immediate: true})
|
||||||
|
|
||||||
|
async function queryUser(value: string, callback: any) {
|
||||||
|
const queryData = {
|
||||||
|
customerName: value,
|
||||||
|
pageSize: 100,
|
||||||
|
pageNum: 1,
|
||||||
|
}
|
||||||
|
const res = await personList(queryData);
|
||||||
|
const options = res.rows.map((user) => ({
|
||||||
|
label: user.userName,
|
||||||
|
value: user.userName,
|
||||||
|
userId: user.userId,
|
||||||
|
userName: user.userName,
|
||||||
|
}));
|
||||||
|
callback(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = ref<any[]>([]);
|
||||||
|
const value = ref('');
|
||||||
|
|
||||||
|
const handleSearch = (val: string) => {
|
||||||
|
queryUser(val, (d: any[]) => (data.value = d));
|
||||||
|
};
|
||||||
|
const emit = defineEmits(['update:userInfo']);
|
||||||
|
const handleChange = (val: string) => {
|
||||||
|
value.value = val;
|
||||||
|
const userInfo = data.value.find(option => option.value === val);
|
||||||
|
queryUser(val, (d: any[]) => (data.value = d));
|
||||||
|
emit('update:userInfo', userInfo);
|
||||||
|
};
|
||||||
|
|
||||||
|
async function getUserInfo(val:number|string) {
|
||||||
|
if (!val) return;
|
||||||
|
const user = await personInfo(val)
|
||||||
|
if (user) {
|
||||||
|
data.value = [{
|
||||||
|
userId: user.userId,
|
||||||
|
userName: user.userName,
|
||||||
|
}]
|
||||||
|
emit('update:userInfo', data.value[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Select
|
||||||
|
v-model="value"
|
||||||
|
show-search
|
||||||
|
placeholder="可根据租赁人名称进行搜索..."
|
||||||
|
style="width: 100%"
|
||||||
|
:default-active-first-option="false"
|
||||||
|
:show-arrow="false"
|
||||||
|
:filter-option="false"
|
||||||
|
:not-found-content="null"
|
||||||
|
:options="data"
|
||||||
|
@search="handleSearch"
|
||||||
|
@change="handleChange"
|
||||||
|
></Select>
|
||||||
|
</template>
|
||||||
|
|
@@ -14,6 +14,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_processing_status'),
|
||||||
},
|
},
|
||||||
fieldName: 'state',
|
fieldName: 'state',
|
||||||
label: '处理状态',
|
label: '处理状态',
|
||||||
@@ -22,59 +23,80 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
field: 'id',
|
||||||
|
slots: {
|
||||||
|
default: ({ rowIndex }) => {
|
||||||
|
return (rowIndex + 1).toString();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
minWidth: '120'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '养护名称',
|
title: '养护名称',
|
||||||
field: 'maintainName',
|
field: 'maintainName',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '小区id',
|
title: '服务地点(房间id)',
|
||||||
field: 'communityId',
|
field: 'roomId',
|
||||||
},
|
minWidth: '120'
|
||||||
{
|
|
||||||
title: '建筑id',
|
|
||||||
field: 'buildingId',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '楼层id',
|
|
||||||
field: 'floorId',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '服务类型',
|
title: '服务类型',
|
||||||
field: 'serveType',
|
field: 'serveType',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.serveType, 'pro_service_type');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '养护周期类型',
|
title: '养护周期类型',
|
||||||
field: 'periodType',
|
field: 'periodType',
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_TIME_UNIT 便于维护
|
|
||||||
return renderDict(row.periodType, 'wy_time_unit');
|
return renderDict(row.periodType, 'wy_time_unit');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '养护周期频次',
|
title: '养护周期频次',
|
||||||
field: 'periodFrequency',
|
field: 'periodFrequency',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单id',
|
title: '关联订单',
|
||||||
field: 'orderId',
|
field: 'orderId',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '计划执行时间',
|
title: '计划执行时间',
|
||||||
field: 'startTime',
|
field: 'startTime',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '计划完成时间',
|
title: '计划完成时间',
|
||||||
field: 'endTime',
|
field: 'endTime',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '巡检结果',
|
title: '巡检结果',
|
||||||
field: 'inspectResult',
|
field: 'inspectResult',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.inspectResult, 'pro_inspection_results');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '处理措施',
|
title: '处理措施',
|
||||||
field: 'measure',
|
field: 'measure',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '客户评分',
|
title: '客户评分',
|
||||||
@@ -87,15 +109,22 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
width:200
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '客户反馈',
|
title: '客户反馈',
|
||||||
field: 'customerAdvice',
|
field: 'customerAdvice',
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '处理状态',
|
title: '处理状态',
|
||||||
field: 'state',
|
field: 'state',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.state, 'pro_processing_status');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
minWidth: '120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
@@ -121,32 +150,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
fieldName: 'maintainName',
|
fieldName: 'maintainName',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '小区id',
|
label: '服务地点',
|
||||||
fieldName: 'communityId',
|
fieldName: 'communityId',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
labelWidth:100
|
||||||
{
|
|
||||||
label: '建筑id',
|
|
||||||
fieldName: 'buildingId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '楼层id',
|
|
||||||
fieldName: 'floorId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '服务类型',
|
label: '服务类型',
|
||||||
fieldName: 'serveType',
|
fieldName: 'serveType',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_service_type'),
|
||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '养护周期类型',
|
label: '养护周期类型',
|
||||||
@@ -157,18 +178,21 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
options: getDictOptions('wy_time_unit'),
|
options: getDictOptions('wy_time_unit'),
|
||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '养护周期频次',
|
label: '养护周期频次',
|
||||||
fieldName: 'periodFrequency',
|
fieldName: 'periodFrequency',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '订单id',
|
label: '关联订单',
|
||||||
fieldName: 'orderId',
|
fieldName: 'orderId',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '计划执行时间',
|
label: '计划执行时间',
|
||||||
@@ -180,6 +204,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '计划完成时间',
|
label: '计划完成时间',
|
||||||
@@ -191,16 +216,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '巡检结果',
|
label: '巡检结果',
|
||||||
fieldName: 'inspectResult',
|
fieldName: 'inspectResult',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_inspection_results'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '处理措施',
|
label: '处理措施',
|
||||||
fieldName: 'measure',
|
fieldName: 'measure',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '客户评分',
|
label: '客户评分',
|
||||||
@@ -213,17 +246,22 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
defaultValue: 0
|
defaultValue: 0
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '客户反馈',
|
label: '客户反馈',
|
||||||
fieldName: 'customerAdvice',
|
fieldName: 'customerAdvice',
|
||||||
component: 'Textarea',
|
component: 'Textarea',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '处理状态',
|
label: '处理状态',
|
||||||
fieldName: 'state',
|
fieldName: 'state',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_processing_status'),
|
||||||
},
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
|
labelWidth:100
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
import { $t } from '@vben/locales';
|
||||||
import {
|
import {
|
||||||
useVbenVxeGrid,
|
useVbenVxeGrid,
|
||||||
vxeCheckboxChecked,
|
vxeCheckboxChecked,
|
||||||
@@ -14,6 +15,7 @@ import {
|
|||||||
import type { OrderMaintainForm } from '#/api/property/conservationManagement/model';
|
import type { OrderMaintainForm } from '#/api/property/conservationManagement/model';
|
||||||
import orderMaintainModal from './orderMaintain-modal.vue';
|
import orderMaintainModal from './orderMaintain-modal.vue';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
import orderMaintainDetail from "#/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-detail.vue";
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
@@ -61,6 +63,15 @@ const [OrderMaintainModal, modalApi] = useVbenModal({
|
|||||||
connectedComponent: orderMaintainModal,
|
connectedComponent: orderMaintainModal,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const [orderMaintainDetailModal, orderMaintainDetailApi] = useVbenModal({
|
||||||
|
connectedComponent: orderMaintainDetail,
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleInfo(row: Required<OrderMaintainForm>) {
|
||||||
|
orderMaintainDetailApi.setData({ id: row.id });
|
||||||
|
orderMaintainDetailApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
modalApi.setData({});
|
modalApi.setData({});
|
||||||
modalApi.open();
|
modalApi.open();
|
||||||
@@ -115,6 +126,11 @@ function handleMultiDelete() {
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
|
<ghost-button
|
||||||
|
@click.stop="handleInfo(row)"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.info') }}
|
||||||
|
</ghost-button>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
v-access:code="['property:orderMaintain:edit']"
|
v-access:code="['property:orderMaintain:edit']"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
@@ -139,5 +155,6 @@ function handleMultiDelete() {
|
|||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<OrderMaintainModal @reload="tableApi.query()" />
|
<OrderMaintainModal @reload="tableApi.query()" />
|
||||||
|
<orderMaintainDetailModal/>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -0,0 +1,77 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import type {conservationManagement} from '#/api/property/conservationManagement/model';
|
||||||
|
import {shallowRef} from 'vue';
|
||||||
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
|
import {Descriptions, DescriptionsItem, Rate} from 'ant-design-vue';
|
||||||
|
import {orderMaintainInfo} from '#/api/property/conservationManagement';
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
|
onOpenChange: handleOpenChange,
|
||||||
|
onClosed() {
|
||||||
|
conservationManagementDetail.value = null;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const conservationManagementDetail = shallowRef<null | conservationManagement>(null);
|
||||||
|
|
||||||
|
async function handleOpenChange(open: boolean) {
|
||||||
|
if (!open) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
modalApi.modalLoading(true);
|
||||||
|
const {id} = modalApi.getData() as { id: number | string };
|
||||||
|
const response = await orderMaintainInfo(id);
|
||||||
|
conservationManagementDetail.value = response;
|
||||||
|
modalApi.modalLoading(false);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BasicModal :footer="false" :fullscreen-button="false" title="养护管理信息" class="w-[70%]">
|
||||||
|
<Descriptions v-if="conservationManagementDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||||
|
<DescriptionsItem label="养护名称">
|
||||||
|
{{ conservationManagementDetail.maintainName }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="服务地点">
|
||||||
|
{{ conservationManagementDetail.roomId }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="服务类型" v-if="conservationManagementDetail.serveType!=null">
|
||||||
|
<component
|
||||||
|
:is="renderDict(conservationManagementDetail.serveType,'pro_service_type')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="养护周期">
|
||||||
|
{{ conservationManagementDetail.orderId }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="关联订单">
|
||||||
|
{{ conservationManagementDetail.orderId }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="计划执行时间">
|
||||||
|
{{ conservationManagementDetail.startTime }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="计划完成时间">
|
||||||
|
{{ conservationManagementDetail.endTime }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="巡检结果" v-if="conservationManagementDetail.inspectResult!=null">
|
||||||
|
<component
|
||||||
|
:is="renderDict(conservationManagementDetail.inspectResult,'pro_inspection_results')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="处理措施">
|
||||||
|
{{ conservationManagementDetail.measure }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="客户评分">
|
||||||
|
<Rate :value="conservationManagementDetail.customerScore" disabled />
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="客户反馈">
|
||||||
|
{{ conservationManagementDetail.customerAdvice }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="处理状态" v-if="conservationManagementDetail.state!=null">
|
||||||
|
<component
|
||||||
|
:is="renderDict(conservationManagementDetail.state,'pro_processing_status')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
</Descriptions>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
@@ -17,7 +17,7 @@ const title = computed(() => {
|
|||||||
|
|
||||||
const [BasicForm, formApi] = useVbenForm({
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-1',
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
@@ -36,7 +36,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
class: 'w-[550px]',
|
class: 'w-[60%]',
|
||||||
fullscreenButton: false,
|
fullscreenButton: false,
|
||||||
onBeforeClose,
|
onBeforeClose,
|
||||||
onClosed: handleClosed,
|
onClosed: handleClosed,
|
||||||
@@ -52,6 +52,9 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
|
|
||||||
if (isUpdate.value && id) {
|
if (isUpdate.value && id) {
|
||||||
const record = await orderMaintainInfo(id);
|
const record = await orderMaintainInfo(id);
|
||||||
|
record.serveType = record.serveType?.toString();
|
||||||
|
record.state = record.state?.toString();
|
||||||
|
record.inspectResult = record.inspectResult?.toString();
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
}
|
}
|
||||||
await markInitialized();
|
await markInitialized();
|
||||||
|
@@ -69,7 +69,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'rentalPeriod',
|
field: 'rentalPeriod',
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return renderDict(row.rentalPeriod, 'wy_sjdw');
|
return renderDict(row.rentalPeriod, 'wy_time_unit');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
width: 100
|
width: 100
|
||||||
@@ -149,170 +149,29 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const modalSchema: FormSchemaGetter = () => [
|
export const planInfoColumns: VxeGridProps['columns'] = [
|
||||||
{
|
{
|
||||||
label: '主键',
|
title: '序号',
|
||||||
fieldName: 'id',
|
field: 'id',
|
||||||
component: 'Input',
|
width: 100,
|
||||||
dependencies: {
|
align: 'center'
|
||||||
show: () => false,
|
|
||||||
triggerFields: [''],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '客户名称',
|
title: '产品名称',
|
||||||
fieldName: 'customerName',
|
field: 'plantName',
|
||||||
component: 'Input',
|
minWidth: 100,
|
||||||
rules: 'required',
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '客户类型',
|
title: '产品租金',
|
||||||
fieldName: 'customerType',
|
field: 'rent',
|
||||||
component: 'Select',
|
minWidth: 100,
|
||||||
componentProps: {
|
align: 'center'
|
||||||
options: getDictOptions('wy_khlx')
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '租赁周期',
|
title: '产品数量',
|
||||||
fieldName: 'rentalPeriod',
|
field: 'inventory',
|
||||||
component: 'Select',
|
minWidth: 100,
|
||||||
componentProps: {
|
align: 'center'
|
||||||
options: getDictOptions('wy_time_unit')
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
},
|
},
|
||||||
{
|
]
|
||||||
label: '租赁时间',
|
|
||||||
fieldName: 'rentalTime',
|
|
||||||
component: 'RangePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '租赁方式',
|
|
||||||
fieldName: 'rentalType',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: getDictOptions('wy_zlfs')
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
formItemClass: 'col-span-2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '租赁方案',
|
|
||||||
fieldName: 'planId',
|
|
||||||
component: 'Select',
|
|
||||||
dependencies: {
|
|
||||||
// 仅当 租赁方式 为 2(套餐) 时显示
|
|
||||||
show: (formValues) => formValues.rentalType === '2',
|
|
||||||
triggerFields: ['rentalType'],
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
formItemClass: 'col-span-2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '方案详情',
|
|
||||||
fieldName: 'planInfo',
|
|
||||||
component: 'Input',
|
|
||||||
dependencies: {
|
|
||||||
// 仅当 租赁方式 为 2(套餐) 时显示
|
|
||||||
show: (formValues) => formValues.rentalType === '2' && formValues.planId != null,
|
|
||||||
triggerFields: ['rentalType'],
|
|
||||||
},
|
|
||||||
formItemClass: 'col-span-2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '绿植产品',
|
|
||||||
fieldName: 'productId',
|
|
||||||
component: 'Select',
|
|
||||||
dependencies: {
|
|
||||||
// 仅当 租赁方式 为 1(单点) 时显示
|
|
||||||
show: (formValues) => formValues.rentalType === '1',
|
|
||||||
triggerFields: ['rentalType'],
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
formItemClass: 'col-span-2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '租赁数量',
|
|
||||||
fieldName: 'productNum',
|
|
||||||
component: 'InputNumber',
|
|
||||||
componentProps: {
|
|
||||||
min: 1,
|
|
||||||
precision: 0,
|
|
||||||
step: 1,
|
|
||||||
placeholder:'租赁数量不可超出绿植产品库存数量'
|
|
||||||
},
|
|
||||||
dependencies: {
|
|
||||||
// 仅当 租赁方式 为 1(单点) 时显示
|
|
||||||
show: (formValues) => formValues.rentalType === '1',
|
|
||||||
triggerFields: ['rentalType', 'productId'],
|
|
||||||
},
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '应付总额',
|
|
||||||
// fieldName: 'totalAmount',
|
|
||||||
// component: 'Input',
|
|
||||||
// rules: 'required',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '支付状态',
|
|
||||||
// fieldName: 'paymentStatus',
|
|
||||||
// component: 'Select',
|
|
||||||
// componentProps: {
|
|
||||||
// options: getDictOptions('pro_charging_status'),
|
|
||||||
// },
|
|
||||||
// rules: 'selectRequired',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '是否续租',
|
|
||||||
// fieldName: 'isRelet',
|
|
||||||
// component: 'RadioGroup',
|
|
||||||
// componentProps: {
|
|
||||||
// buttonStyle: 'solid',
|
|
||||||
// optionType: 'button',
|
|
||||||
// options: getDictOptions('wy_sf'),
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '合同状态',
|
|
||||||
fieldName: 'contractStatus',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: getDictOptions('wy_htzt'),
|
|
||||||
},
|
|
||||||
rules: 'selectRequired'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '合同编号',
|
|
||||||
fieldName: 'contractCode',
|
|
||||||
component: 'Input',
|
|
||||||
dependencies: {
|
|
||||||
show: (formValues) => formValues.contractStatus != null && formValues.contractStatus != 1,
|
|
||||||
triggerFields: ['contractStatus'],
|
|
||||||
},
|
|
||||||
rules: 'required'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '签署时间',
|
|
||||||
fieldName: 'signTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
},
|
|
||||||
dependencies: {
|
|
||||||
show: (formValues) => formValues.contractStatus != null && formValues.contractStatus != 1,
|
|
||||||
triggerFields: ['contractStatus'],
|
|
||||||
},
|
|
||||||
rules: 'required'
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
@@ -89,10 +89,10 @@ function handleAdd() {
|
|||||||
modalApi.open();
|
modalApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleEdit(row: Required<RentalOrderForm>) {
|
// async function handleEdit(row: Required<RentalOrderForm>) {
|
||||||
modalApi.setData({ id: row.id });
|
// modalApi.setData({ id: row.id });
|
||||||
modalApi.open();
|
// modalApi.open();
|
||||||
}
|
// }
|
||||||
|
|
||||||
async function handleDelete(row: Required<RentalOrderForm>) {
|
async function handleDelete(row: Required<RentalOrderForm>) {
|
||||||
await rentalOrderRemove(row.id);
|
await rentalOrderRemove(row.id);
|
||||||
@@ -150,12 +150,12 @@ function handleDownloadExcel() {
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
<ghost-button
|
<!-- <ghost-button-->
|
||||||
v-access:code="['property:rentalOrder:edit']"
|
<!-- v-access:code="['property:rentalOrder:edit']"-->
|
||||||
@click.stop="handleEdit(row)"
|
<!-- @click.stop="handleEdit(row)"-->
|
||||||
>
|
<!-- >-->
|
||||||
{{ $t('pages.common.edit') }}
|
<!-- {{ $t('pages.common.edit') }}-->
|
||||||
</ghost-button>
|
<!-- </ghost-button>-->
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
:get-popup-container="getVxePopupContainer"
|
:get-popup-container="getVxePopupContainer"
|
||||||
placement="left"
|
placement="left"
|
||||||
|
@@ -14,15 +14,22 @@ import {
|
|||||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||||
|
|
||||||
import {plantsProductList} from "#/api/property/productManagement";
|
import {plantsProductList} from "#/api/property/productManagement";
|
||||||
import {rentalPlanList} from "#/api/property/rentalPlan";
|
import {rentalPlanInfo, rentalPlanList} from "#/api/property/rentalPlan";
|
||||||
import {getDictOptions} from "#/utils/dict";
|
import {getDictOptions} from "#/utils/dict";
|
||||||
import type {PropertyVO} from "#/api/property/productManagement/model";
|
import type {PropertyVO} from "#/api/property/productManagement/model";
|
||||||
import type {RentalPlanVO} from "#/api/property/rentalPlan/model";
|
import type {RentalPlanVO} from "#/api/property/rentalPlan/model";
|
||||||
|
import {planInfoColumns} from './data';
|
||||||
|
import {Table} from "ant-design-vue";
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
const planList = ref<RentalPlanVO[]>([]);
|
const planList = ref<RentalPlanVO[]>([]);
|
||||||
const plantsList = ref<PropertyVO[]>([]);
|
const plantsList = ref<PropertyVO[]>([]);
|
||||||
|
const planProducts = ref<any[]>([]);
|
||||||
|
const totalAmount = ref(0);
|
||||||
|
const singleAmount = ref(0);
|
||||||
|
const plantInfo = ref<PropertyVO>();
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||||
});
|
});
|
||||||
@@ -84,27 +91,42 @@ const modalSchema = [
|
|||||||
{
|
{
|
||||||
label: '租赁方案',
|
label: '租赁方案',
|
||||||
fieldName: 'planId',
|
fieldName: 'planId',
|
||||||
component: 'Select',
|
component: 'ApiSelect',
|
||||||
dependencies: {
|
dependencies: {
|
||||||
// 仅当 租赁方式 为 2(套餐) 时显示
|
// 仅当 租赁方式 为 2(套餐) 时显示
|
||||||
show: (formValues: any) => formValues.rentalType === '2',
|
show: (formValues: any) => formValues.rentalType === '2',
|
||||||
triggerFields: ['rentalType'],
|
triggerFields: ['rentalType'],
|
||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
formItemClass: 'col-span-2'
|
formItemClass: 'col-span-2',
|
||||||
|
componentProps: {
|
||||||
|
api: async () => {
|
||||||
|
const res = await rentalPlanList({pageNum: 1, pageSize: 1000, state: 1});
|
||||||
|
planList.value = res.rows || [];
|
||||||
|
return planList.value.map(item => ({
|
||||||
|
label: item.planName,
|
||||||
|
value: item.id,
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
onChange: async (value: string) => {
|
||||||
|
await getPlanProducts(value)
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
filterOption: (input: any, option: any) =>
|
||||||
|
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '方案详情',
|
label: '方案详情',
|
||||||
fieldName: 'planInfo',
|
fieldName: 'planInfo',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
slots: {default: 'planInfo'},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
// 仅当 租赁方式 为 2(套餐) 时显示
|
// 仅当 租赁方式 为 2(套餐) 时显示
|
||||||
show: (formValues: any) => formValues.rentalType === '2' && formValues.planId != null,
|
show: (formValues: any) => formValues.rentalType === '2' && formValues.planId != null,
|
||||||
triggerFields: ['rentalType'],
|
triggerFields: ['planId', 'rentalType'],
|
||||||
},
|
},
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-2',
|
||||||
componentProps: {}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '绿植产品',
|
label: '绿植产品',
|
||||||
@@ -127,16 +149,12 @@ const modalSchema = [
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
onChange: async (value: string) => {
|
onChange: async (value: string) => {
|
||||||
const plants = plantsList.value.find(item => item.id === value);
|
plantInfo.value = plantsList.value.find(item => item.id === value);
|
||||||
if (plants) {
|
if (plantInfo.value) {
|
||||||
formApi.updateSchema([{
|
const formValues = await formApi.getValues();
|
||||||
componentProps: () => ({
|
if (formValues.productNum) {
|
||||||
min: 1,
|
singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2);
|
||||||
max: plants.inventory,
|
}
|
||||||
precision: 0,
|
|
||||||
}),
|
|
||||||
fieldName: 'productNum',
|
|
||||||
}])
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
@@ -152,7 +170,12 @@ const modalSchema = [
|
|||||||
min: 1,
|
min: 1,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
step: 1,
|
step: 1,
|
||||||
placeholder: '租赁数量不可超出绿植产品库存数量'
|
placeholder: '租赁数量不可超出绿植产品库存数量',
|
||||||
|
onChange: async (value: number) => {
|
||||||
|
if (plantInfo.value) {
|
||||||
|
singleAmount.value = (plantInfo.value.rent * value).toFixed(2);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
// 仅当 租赁方式 为 1(单点) 时显示
|
// 仅当 租赁方式 为 1(单点) 时显示
|
||||||
@@ -162,34 +185,29 @@ const modalSchema = [
|
|||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '应付总额',
|
label: '总金额(元)',
|
||||||
fieldName: 'totalAmount',
|
fieldName: 'totalAmount',
|
||||||
component: 'span',
|
component: 'InputNumber',
|
||||||
|
slots: {default: 'totalAmount'},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
// 仅当 租赁方式 为 1(单点) 时显示
|
// 仅当 租赁方式 为 1(单点) 时显示
|
||||||
show: (formValues: any) => formValues.totalAmount,
|
show: (formValues: any) => formValues.productNum&&formValues.productId&&formValues.rentalType === '1',
|
||||||
triggerFields: ['totalAmount'],
|
triggerFields: ['productNum','rentalType'],
|
||||||
|
disabled: true,
|
||||||
},
|
},
|
||||||
|
labelWidth: 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否续租',
|
||||||
|
fieldName: 'isRelet',
|
||||||
|
component: 'RadioGroup',
|
||||||
|
componentProps: {
|
||||||
|
buttonStyle: 'solid',
|
||||||
|
optionType: 'button',
|
||||||
|
options: getDictOptions('wy_sf'),
|
||||||
|
},
|
||||||
|
rules: 'required'
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// label: '支付状态',
|
|
||||||
// fieldName: 'paymentStatus',
|
|
||||||
// component: 'Select',
|
|
||||||
// componentProps: {
|
|
||||||
// options: getDictOptions('pro_charging_status'),
|
|
||||||
// },
|
|
||||||
// rules: 'selectRequired',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '是否续租',
|
|
||||||
// fieldName: 'isRelet',
|
|
||||||
// component: 'RadioGroup',
|
|
||||||
// componentProps: {
|
|
||||||
// buttonStyle: 'solid',
|
|
||||||
// optionType: 'button',
|
|
||||||
// options: getDictOptions('wy_sf'),
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
label: '合同状态',
|
label: '合同状态',
|
||||||
fieldName: 'contractStatus',
|
fieldName: 'contractStatus',
|
||||||
@@ -263,8 +281,6 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
modalApi.modalLoading(true);
|
modalApi.modalLoading(true);
|
||||||
const {id} = modalApi.getData() as { id?: number | string };
|
const {id} = modalApi.getData() as { id?: number | string };
|
||||||
isUpdate.value = !!id;
|
isUpdate.value = !!id;
|
||||||
await getPlanList()
|
|
||||||
// await getPlantsList()
|
|
||||||
if (isUpdate.value && id) {
|
if (isUpdate.value && id) {
|
||||||
const record = await rentalOrderInfo(id);
|
const record = await rentalOrderInfo(id);
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
@@ -286,10 +302,18 @@ async function handleConfirm() {
|
|||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
if (data.rentalType == 1) {
|
if (data.rentalType == 1) {
|
||||||
data.planId = undefined;
|
data.planId = undefined;
|
||||||
|
data.totalAmount = singleAmount.value
|
||||||
} else {
|
} else {
|
||||||
data.productId = undefined;
|
data.productId = undefined;
|
||||||
data.productNum = undefined;
|
data.productNum = undefined;
|
||||||
|
data.productList = plantsList.value
|
||||||
|
data.totalAmount = totalAmount.value
|
||||||
}
|
}
|
||||||
|
if (data.rentalTime) {
|
||||||
|
data.startTime = data.rentalTime[0];
|
||||||
|
data.endTime = data.rentalTime[1];
|
||||||
|
}
|
||||||
|
|
||||||
await (isUpdate.value ? rentalOrderUpdate(data) : rentalOrderAdd(data));
|
await (isUpdate.value ? rentalOrderUpdate(data) : rentalOrderAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
@@ -302,57 +326,21 @@ async function handleConfirm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取有库存的绿植
|
//获取有库存的绿植
|
||||||
async function getPlantsList() {
|
async function getPlanProducts(id: string) {
|
||||||
let params = {
|
const res = await rentalPlanInfo(id)
|
||||||
pageNum: 1,
|
plantsList.value=res.productList;
|
||||||
pageSize: 1000,
|
// planProducts.value = [{
|
||||||
inventory: 0
|
// plantName: '发财树',
|
||||||
}
|
// inventory: 3,
|
||||||
const res = await plantsProductList(params)
|
// rent: 10,
|
||||||
plantsList.value = res.rows
|
// }, {
|
||||||
// formApi.updateSchema([
|
// plantName: '绿萝',
|
||||||
// {
|
// inventory: 5,
|
||||||
// componentProps: () => ({
|
// rent: 3,
|
||||||
// class: 'w-full',
|
// }
|
||||||
// options: res.rows.map(item => ({
|
// ]
|
||||||
// label: item.plantName + '-' + item.plantCode + '\xa0\xa0租金(元):' + item.rent + '\xa0\xa0库存数量:' + item.inventory,
|
totalAmount.value = planProducts.value?.reduce((sum, item: any) => sum + (item.rent * item.inventory), 0).toFixed(2)
|
||||||
// value: item.id,
|
|
||||||
// })),
|
|
||||||
// placeholder: '请选择绿植',
|
|
||||||
// showSearch: true,
|
|
||||||
// filterOption: (input: any, option: any) =>
|
|
||||||
// option.label.toLowerCase().includes(input.toLowerCase()),
|
|
||||||
// }),
|
|
||||||
// fieldName: 'productId',
|
|
||||||
// },
|
|
||||||
// ]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取绿植租赁方案
|
|
||||||
async function getPlanList() {
|
|
||||||
let params = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 1000,
|
|
||||||
state: 0,
|
|
||||||
}
|
|
||||||
const res = await rentalPlanList(params)
|
|
||||||
planList.value = res.rows
|
|
||||||
formApi.updateSchema([
|
|
||||||
{
|
|
||||||
componentProps: () => ({
|
|
||||||
class: 'w-full',
|
|
||||||
options: res.rows.map(item => ({
|
|
||||||
label: item.planName,
|
|
||||||
value: item.id,
|
|
||||||
})),
|
|
||||||
placeholder: '请选择绿植',
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: (input: any, option: any) =>
|
|
||||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
|
||||||
}),
|
|
||||||
fieldName: 'planId',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleClosed() {
|
async function handleClosed() {
|
||||||
@@ -364,7 +352,32 @@ async function handleClosed() {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<BasicModal :title="title">
|
<BasicModal :title="title">
|
||||||
<BasicForm/>
|
<BasicForm>
|
||||||
|
<template #planInfo="slotProps">
|
||||||
|
<div v-if="planProducts.length" style="width: 100%">
|
||||||
|
<Table :dataSource="planProducts" :columns="planInfoColumns" :pagination="false"
|
||||||
|
bordered size="small">
|
||||||
|
<template #bodyCell="{ column, record, index }">
|
||||||
|
<template v-if="column.field === 'id'">
|
||||||
|
{{ index + 1 }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ record[column.field] }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<div style="text-align: right;margin-right: 20px">
|
||||||
|
<b>总金额(元):</b>
|
||||||
|
{{ totalAmount }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #totalAmount="slotProps">
|
||||||
|
<div>{{ singleAmount }}</div>
|
||||||
|
</template>
|
||||||
|
</BasicForm>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@@ -26,15 +26,6 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
field: 'id',
|
|
||||||
slots: {
|
|
||||||
default: ({ rowIndex }) => {
|
|
||||||
return (rowIndex + 1).toString();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '产品编号',
|
title: '产品编号',
|
||||||
field: 'plantCode',
|
field: 'plantCode',
|
||||||
@@ -104,12 +95,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
triggerFields: [''],
|
triggerFields: [''],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '产品编号',
|
|
||||||
fieldName: 'plantCode',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '产品名称',
|
label: '产品名称',
|
||||||
fieldName: 'plantName',
|
fieldName: 'plantName',
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
import type {plantsProduct} from '#/api/property/productManagement/model';
|
import type {plantsProduct} from '#/api/property/productManagement/model';
|
||||||
import {shallowRef} from 'vue';
|
import {shallowRef} from 'vue';
|
||||||
import {useVbenModal} from '@vben/common-ui';
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
import {Descriptions, DescriptionsItem, Rate} from 'ant-design-vue';
|
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||||
import {plantsProductInfo} from '#/api/property/productManagement';
|
import {plantsProductInfo} from '#/api/property/productManagement';
|
||||||
import {renderDict} from "#/utils/render";
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
|
@@ -39,15 +39,15 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
// {
|
||||||
title: '序号',
|
// title: '序号',
|
||||||
field: 'id',
|
// field: 'id',
|
||||||
slots: {
|
// slots: {
|
||||||
default: ({ rowIndex }) => {
|
// default: ({ rowIndex }) => {
|
||||||
return (rowIndex + 1).toString();
|
// return (rowIndex + 1).toString();
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '员工编号',
|
title: '员工编号',
|
||||||
field: 'userId',
|
field: 'userId',
|
||||||
|
@@ -1,14 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {computed, reactive, ref} from 'vue';
|
import {computed, reactive, ref} from 'vue';
|
||||||
|
|
||||||
import {useVbenModal} from '@vben/common-ui';
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
import {$t} from '@vben/locales';
|
import {$t} from '@vben/locales';
|
||||||
import {cloneDeep} from '@vben/utils';
|
import {cloneDeep} from '@vben/utils';
|
||||||
|
|
||||||
import {useVbenForm} from '#/adapter/form';
|
import {useVbenForm} from '#/adapter/form';
|
||||||
import {personAdd, personInfo, personUpdate} from '#/api/property/resident/person';
|
import {personAdd, personInfo, personUpdate} from '#/api/property/resident/person';
|
||||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||||
|
|
||||||
import {modalSchema} from './data';
|
import {modalSchema} from './data';
|
||||||
import QueryUserList from './query-user-list.vue'
|
import QueryUserList from './query-user-list.vue'
|
||||||
import QueryUnitList from './query-unit-list.vue'
|
import QueryUnitList from './query-unit-list.vue'
|
||||||
|
@@ -34,7 +34,7 @@ async function queryUser(value: string, callback: any) {
|
|||||||
const options = res.rows.map((user) => ({
|
const options = res.rows.map((user) => ({
|
||||||
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex') + '-' + user.phonenumber,
|
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex') + '-' + user.phonenumber,
|
||||||
value: user.userId,
|
value: user.userId,
|
||||||
userName: user.userName,
|
userName: user.nickName,
|
||||||
gender: user.sex,
|
gender: user.sex,
|
||||||
phone: user.phonenumber,
|
phone: user.phonenumber,
|
||||||
}));
|
}));
|
||||||
@@ -62,10 +62,9 @@ async function getUserInfo(val:number|string) {
|
|||||||
const user = res.user
|
const user = res.user
|
||||||
if (user) {
|
if (user) {
|
||||||
data.value = [{
|
data.value = [{
|
||||||
// label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex') + '-' + user.phonenumber,
|
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex') + '-' + user.phonenumber,
|
||||||
label: user.nickName + '-' + user.phonenumber,
|
|
||||||
value: user.userId,
|
value: user.userId,
|
||||||
userName: user.userName,
|
userName: user.nickName,
|
||||||
gender: user.sex,
|
gender: user.sex,
|
||||||
phone: user.phonenumber,
|
phone: user.phonenumber,
|
||||||
}]
|
}]
|
||||||
|
@@ -27,16 +27,16 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{type: 'checkbox', width: 60},
|
{type: 'checkbox', width: 60},
|
||||||
{
|
// {
|
||||||
title: '序号',
|
// title: '序号',
|
||||||
field: 'id',
|
// field: 'id',
|
||||||
slots: {
|
// slots: {
|
||||||
default: ({ rowIndex }) => {
|
// default: ({ rowIndex }) => {
|
||||||
return (rowIndex + 1).toString();
|
// return (rowIndex + 1).toString();
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
width: 60
|
// width: 60
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '单位编号',
|
title: '单位编号',
|
||||||
field: 'unitNumber',
|
field: 'unitNumber',
|
||||||
@@ -71,11 +71,11 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'phone',
|
field: 'phone',
|
||||||
width: 100
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '入驻位置',
|
// title: '入驻位置',
|
||||||
field: 'location',
|
// field: 'location',
|
||||||
width: 100,
|
// width: 100,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '入驻时间',
|
title: '入驻时间',
|
||||||
field: 'time',
|
field: 'time',
|
||||||
@@ -87,11 +87,11 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
slots: {default: 'state'},
|
slots: {default: 'state'},
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '员工数量',
|
// title: '员工数量',
|
||||||
field: 'number',
|
// field: 'number',
|
||||||
width: 100,
|
// width: 100,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '备注',
|
title: '备注',
|
||||||
field: 'remark',
|
field: 'remark',
|
||||||
|
@@ -60,7 +60,7 @@ async function handleOpenChange(open: boolean) {
|
|||||||
{{ unitDetail.contactPerson +'-'+unitDetail.phone}}
|
{{ unitDetail.contactPerson +'-'+unitDetail.phone}}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="入驻位置" :span="2">
|
<DescriptionsItem label="入驻位置" :span="2">
|
||||||
{{ unitDetail.location }}
|
{{ unitDetail.locationDetail }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="入驻时间">
|
<DescriptionsItem label="入驻时间">
|
||||||
{{ unitDetail.time }}
|
{{ unitDetail.time }}
|
||||||
|
@@ -0,0 +1,59 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import type {conferenceAddServices} from '#/api/property/roomBooking/conferenceAddServices/model';
|
||||||
|
import {shallowRef} from 'vue';
|
||||||
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
|
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import duration from 'dayjs/plugin/duration';
|
||||||
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||||
|
import {attachInfo} from '#/api/property/roomBooking/conferenceAddServices';
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
dayjs.extend(duration);
|
||||||
|
dayjs.extend(relativeTime);
|
||||||
|
|
||||||
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
|
onOpenChange: handleOpenChange,
|
||||||
|
onClosed() {
|
||||||
|
conferenceAddServicesDetail.value = null;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const conferenceAddServicesDetail = shallowRef<null | conferenceAddServices>(null);
|
||||||
|
|
||||||
|
async function handleOpenChange(open: boolean) {
|
||||||
|
if (!open) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
modalApi.modalLoading(true);
|
||||||
|
const {id} = modalApi.getData() as { id: number | string };
|
||||||
|
const response = await attachInfo(id);
|
||||||
|
conferenceAddServicesDetail.value = response;
|
||||||
|
modalApi.modalLoading(false);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BasicModal :footer="false" :fullscreen-button="false" title="访客管理信息" class="w-[70%]">
|
||||||
|
<Descriptions v-if="conferenceAddServicesDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||||
|
<DescriptionsItem label="产品名称">
|
||||||
|
{{ conferenceAddServicesDetail.projectName}}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="单价(元)">
|
||||||
|
{{ conferenceAddServicesDetail.price }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="单位">
|
||||||
|
{{ conferenceAddServicesDetail.unit }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="类型" v-if="conferenceAddServicesDetail.type!=null">
|
||||||
|
<component
|
||||||
|
:is="renderDict(conferenceAddServicesDetail.type,'wy_parking_spot')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="状态" v-if="conferenceAddServicesDetail.state!=null">
|
||||||
|
<component
|
||||||
|
:is="renderDict(conferenceAddServicesDetail.state,'wy_appointment_tatus')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
</Descriptions>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
@@ -6,7 +6,7 @@ import { $t } from '@vben/locales';
|
|||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { attachAdd, attachInfo, attachUpdate } from '#/api/property/attach';
|
import { attachAdd, attachInfo, attachUpdate } from '#/api/property/roomBooking/conferenceAddServices';
|
||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
@@ -15,13 +15,13 @@ const emit = defineEmits<{ reload: [] }>();
|
|||||||
|
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
return isUpdate.value ? $t('pages.common.edit') : $t('新增产品');
|
||||||
});
|
});
|
||||||
|
|
||||||
const [BasicForm, formApi] = useVbenForm({
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
// 默认占满两列
|
// 默认占满两列
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-1',
|
||||||
// 默认label宽度 px
|
// 默认label宽度 px
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
// 通用配置项 会影响到所有表单项
|
// 通用配置项 会影响到所有表单项
|
||||||
@@ -43,7 +43,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
|||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
// 在这里更改宽度
|
// 在这里更改宽度
|
||||||
class: 'w-[550px]',
|
class: 'w-[60%]',
|
||||||
fullscreenButton: false,
|
fullscreenButton: false,
|
||||||
onBeforeClose,
|
onBeforeClose,
|
||||||
onClosed: handleClosed,
|
onClosed: handleClosed,
|
@@ -1,60 +1,40 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
import {getDictOptions} from "#/utils/dict";
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
fieldName: 'meetId',
|
|
||||||
label: '会议室id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Textarea',
|
|
||||||
fieldName: 'projectName',
|
fieldName: 'projectName',
|
||||||
label: '产品名称',
|
label: '产品名称',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'price',
|
|
||||||
label: '单价',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'unit',
|
|
||||||
label: '单位',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('value_added_type'),
|
||||||
},
|
},
|
||||||
fieldName: 'type',
|
fieldName: 'type',
|
||||||
label: '类型',
|
label: '类型',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('product_management_status'),
|
||||||
|
},
|
||||||
fieldName: 'state',
|
fieldName: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
||||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
|
||||||
title: '主键',
|
|
||||||
field: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '会议室id',
|
|
||||||
field: 'meetId',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '产品名称',
|
title: '产品名称',
|
||||||
field: 'projectName',
|
field: 'projectName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '单价',
|
title: '单价(元)',
|
||||||
field: 'price',
|
field: 'price',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -64,14 +44,20 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
title: '类型',
|
title: '类型',
|
||||||
field: 'type',
|
field: 'type',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.type, 'value_added_type');
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
field: 'state',
|
field: 'state',
|
||||||
},
|
slots: {
|
||||||
{
|
default: ({ row }) => {
|
||||||
title: '创建时间',
|
return renderDict(row.state, 'product_management_status');
|
||||||
field: 'createTime',
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
@@ -92,16 +78,10 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
triggerFields: [''],
|
triggerFields: [''],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '会议室id',
|
|
||||||
fieldName: 'meetId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '产品名称',
|
label: '产品名称',
|
||||||
fieldName: 'projectName',
|
fieldName: 'projectName',
|
||||||
component: 'Textarea',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -121,13 +101,17 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
fieldName: 'type',
|
fieldName: 'type',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('value_added_type'),
|
||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
fieldName: 'state',
|
fieldName: 'state',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
rules: 'required',
|
componentProps: {
|
||||||
|
options: getDictOptions('product_management_status'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
];
|
];
|
@@ -1,5 +1,166 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
import {
|
||||||
|
useVbenVxeGrid,
|
||||||
|
vxeCheckboxChecked,
|
||||||
|
type VxeGridProps
|
||||||
|
} from '#/adapter/vxe-table';
|
||||||
|
|
||||||
|
import {
|
||||||
|
attachList,
|
||||||
|
attachRemove,
|
||||||
|
} from '#/api/property/roomBooking/conferenceAddServices';
|
||||||
|
import type { AttachForm } from '#/api/property/roomBooking/conferenceAddServices/model';
|
||||||
|
|
||||||
|
import conferenceAddServicesModal from './conferenceAddServices-modal.vue';
|
||||||
|
import { columns, querySchema } from './data';
|
||||||
|
import conferenceAddServicesDetail from "#/views/property/roomBooking/conferenceAddServices/conferenceAddServices-detail.vue";
|
||||||
|
|
||||||
|
const formOptions: VbenFormProps = {
|
||||||
|
commonConfig: {
|
||||||
|
labelWidth: 80,
|
||||||
|
componentProps: {
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
schema: querySchema(),
|
||||||
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
|
};
|
||||||
|
|
||||||
|
const gridOptions: VxeGridProps = {
|
||||||
|
checkboxConfig: {
|
||||||
|
// 高亮
|
||||||
|
highlight: true,
|
||||||
|
// 翻页时保留选中状态
|
||||||
|
reserve: true,
|
||||||
|
// 点击行选中
|
||||||
|
// trigger: 'row',
|
||||||
|
},
|
||||||
|
columns,
|
||||||
|
height: 'auto',
|
||||||
|
keepSource: true,
|
||||||
|
pagerConfig: {},
|
||||||
|
proxyConfig: {
|
||||||
|
ajax: {
|
||||||
|
query: async ({ page }, formValues = {}) => {
|
||||||
|
return await attachList({
|
||||||
|
pageNum: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
...formValues,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rowConfig: {
|
||||||
|
keyField: 'id',
|
||||||
|
},
|
||||||
|
// 表格全局唯一表示 保存列配置需要用到
|
||||||
|
id: 'property-conferenceAddServices-index'
|
||||||
|
};
|
||||||
|
|
||||||
|
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||||
|
formOptions,
|
||||||
|
gridOptions,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [ConferenceAddServicesModal, modalApi] = useVbenModal({
|
||||||
|
connectedComponent: conferenceAddServicesModal,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [conferenceAddServicesDetailModal, conferenceAddServicesDetailApi] = useVbenModal({
|
||||||
|
connectedComponent: conferenceAddServicesDetail,
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleInfo(row: Required<AttachForm>) {
|
||||||
|
conferenceAddServicesDetailApi.setData({ id: row.id });
|
||||||
|
conferenceAddServicesDetailApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAdd() {
|
||||||
|
modalApi.setData({});
|
||||||
|
modalApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleEdit(row: Required<AttachForm>) {
|
||||||
|
modalApi.setData({ id: row.id });
|
||||||
|
modalApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleDelete(row: Required<AttachForm>) {
|
||||||
|
await attachRemove(row.id);
|
||||||
|
await tableApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMultiDelete() {
|
||||||
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
|
const ids = rows.map((row: Required<AttachForm>) => row.id);
|
||||||
|
Modal.confirm({
|
||||||
|
title: '提示',
|
||||||
|
okType: 'danger',
|
||||||
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
onOk: async () => {
|
||||||
|
await attachRemove(ids);
|
||||||
|
await tableApi.query();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>会议室增值服务</div>
|
<Page :auto-content-height="true">
|
||||||
|
<BasicTable table-title="会议室增值服务列表">
|
||||||
|
<template #toolbar-tools>
|
||||||
|
<Space>
|
||||||
|
<a-button
|
||||||
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
|
danger
|
||||||
|
type="primary"
|
||||||
|
v-access:code="['property:conferenceAddServices:remove']"
|
||||||
|
@click="handleMultiDelete">
|
||||||
|
{{ $t('pages.common.delete') }}
|
||||||
|
</a-button>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
v-access:code="['property:conferenceAddServices:add']"
|
||||||
|
@click="handleAdd"
|
||||||
|
>
|
||||||
|
{{ '新增产品' }}
|
||||||
|
</a-button>
|
||||||
|
</Space>
|
||||||
|
</template>
|
||||||
|
<template #action="{ row }">
|
||||||
|
<Space>
|
||||||
|
<ghost-button
|
||||||
|
@click.stop="handleInfo(row)"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.info') }}
|
||||||
|
</ghost-button>
|
||||||
|
<ghost-button
|
||||||
|
v-access:code="['property:conferenceAddServices:edit']"
|
||||||
|
@click.stop="handleEdit(row)"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.edit') }}
|
||||||
|
</ghost-button>
|
||||||
|
<Popconfirm
|
||||||
|
:get-popup-container="getVxePopupContainer"
|
||||||
|
placement="left"
|
||||||
|
title="确认删除?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<ghost-button
|
||||||
|
danger
|
||||||
|
v-access:code="['property:conferenceAddServices:remove']"
|
||||||
|
@click.stop=""
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.delete') }}
|
||||||
|
</ghost-button>
|
||||||
|
</Popconfirm>
|
||||||
|
</Space>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<ConferenceAddServicesModal @reload="tableApi.query()" />
|
||||||
|
<conferenceAddServicesDetailModal/>
|
||||||
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
<script></script>
|
|
||||||
<style lang="scss"></style>
|
|
@@ -6,7 +6,7 @@ import { $t } from '@vben/locales';
|
|||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { roomBookingAdd, roomBookingInfo, roomBookingUpdate } from '#/api/property/roomBooking';
|
import { bookingAdd, bookingInfo, bookingUpdate } from '#/api/property/roomBooking/conferenceReservationRecords';
|
||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
@@ -58,7 +58,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
isUpdate.value = !!id;
|
isUpdate.value = !!id;
|
||||||
|
|
||||||
if (isUpdate.value && id) {
|
if (isUpdate.value && id) {
|
||||||
const record = await roomBookingInfo(id);
|
const record = await bookingInfo(id);
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
}
|
}
|
||||||
await markInitialized();
|
await markInitialized();
|
||||||
@@ -76,7 +76,7 @@ async function handleConfirm() {
|
|||||||
}
|
}
|
||||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
await (isUpdate.value ? roomBookingUpdate(data) : roomBookingAdd(data));
|
await (isUpdate.value ? bookingUpdate(data) : bookingAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
modalApi.close();
|
modalApi.close();
|
@@ -1,117 +1,113 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { getDictOptions } from '#/utils/dict';
|
import { getDictOptions } from '#/utils/dict';
|
||||||
import { renderDict } from '#/utils/render';
|
import { renderDict } from '#/utils/render';
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
fieldName: 'roomName',
|
fieldName: 'name',
|
||||||
label: '会议室名称',
|
label: '会议室名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
fieldName: 'bookingName',
|
fieldName: 'person',
|
||||||
label: '会议预订人',
|
label: '预定人',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_charging_status'),
|
||||||
|
},
|
||||||
|
fieldName: 'payState',
|
||||||
|
label: '支付状态',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
|
||||||
options: getDictOptions('wy_yyzt'),
|
options: getDictOptions('wy_yyzt'),
|
||||||
},
|
},
|
||||||
fieldName: 'bookingStatus',
|
fieldName: 'state',
|
||||||
label: '预约状态',
|
label: '预约状态',
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
||||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
{
|
||||||
title: '会议室id',
|
title: '会议室名称',
|
||||||
field: 'tbConferenceId',
|
field: 'name',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预约状态',
|
title: '会议室地址',
|
||||||
field: 'bookingStatus',
|
field: 'meetLocation',
|
||||||
slots: {
|
minWidth:'120'
|
||||||
default: ({ row }) => {
|
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
|
||||||
return renderDict(row.bookingStatus, 'wy_yyzt');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '审核状态',
|
title: '所属单位',
|
||||||
field: 'reviewStatus',
|
field: 'unit',
|
||||||
slots: {
|
minWidth:'120'
|
||||||
default: ({ row }) => {
|
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护
|
|
||||||
return renderDict(row.reviewStatus, 'wy_shzt');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '会议预订人',
|
title: '预定人',
|
||||||
field: 'bookingName',
|
field: 'person',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '使用单位',
|
title: '联系方式',
|
||||||
field: 'userUnit',
|
field: 'phone',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '会议主题',
|
title: '预定开始时间',
|
||||||
field: 'conferenceTheme',
|
field: 'scheduledStarttime',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预约日期',
|
title: '预定结束时间',
|
||||||
field: 'appointmentDate',
|
field: 'scheduledEndtime',
|
||||||
},
|
minWidth:'120'
|
||||||
{
|
|
||||||
title: '预约开始时段',
|
|
||||||
field: 'appointmentBeginTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '预约结束时段',
|
|
||||||
field: 'appointmentEndTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '参会人员',
|
|
||||||
field: 'attendeesName',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '参会人数',
|
title: '参会人数',
|
||||||
field: 'approverCount',
|
field: 'personSum',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '签到开始时间',
|
title: '费用',
|
||||||
field: 'checkInStartTime',
|
field: 'price',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '签到结束时间',
|
title: '是否有增值服务',
|
||||||
field: 'checkInEndTime',
|
field: 'attach',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '评价',
|
title: '支付状态',
|
||||||
field: 'evaluate',
|
field: 'payState',
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '备注',
|
|
||||||
field: 'remark',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '是否需要增值服务',
|
|
||||||
field: 'addServices',
|
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
|
return renderDict(row.payState, 'pro_charging_status');
|
||||||
return renderDict(row.addServices, 'wy_sf');
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
minWidth:'120'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '预约状态',
|
||||||
|
field: 'state',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.state, 'wy_yyzt');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
minWidth:'120'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '提交时间',
|
||||||
|
field: 'updateTime',
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
@@ -124,7 +120,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
|
|
||||||
export const modalSchema: FormSchemaGetter = () => [
|
export const modalSchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
label: 'id',
|
label: '主键',
|
||||||
fieldName: 'id',
|
fieldName: 'id',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
dependencies: {
|
dependencies: {
|
||||||
@@ -133,14 +129,94 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '会议室id',
|
label: '会议室名称',
|
||||||
fieldName: 'tbConferenceId',
|
fieldName: 'name',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '预约状态',
|
label: '会议室id',
|
||||||
fieldName: 'bookingStatus',
|
fieldName: 'meetId',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '会议室地址',
|
||||||
|
fieldName: 'meetLocation',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属单位',
|
||||||
|
fieldName: 'unit',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '预定人',
|
||||||
|
fieldName: 'person',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '联系方式',
|
||||||
|
fieldName: 'phone',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '预定开始时间',
|
||||||
|
fieldName: 'scheduledStarttime',
|
||||||
|
component: 'DatePicker',
|
||||||
|
componentProps: {
|
||||||
|
showTime: true,
|
||||||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
},
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '预定结束时间',
|
||||||
|
fieldName: 'scheduledEndtime',
|
||||||
|
component: 'DatePicker',
|
||||||
|
componentProps: {
|
||||||
|
showTime: true,
|
||||||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
},
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '参会人数',
|
||||||
|
fieldName: 'personSum',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '费用',
|
||||||
|
fieldName: 'price',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否包含增值服务',
|
||||||
|
fieldName: 'attach',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '支付状态',
|
||||||
|
fieldName: 'payState',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
// 可选从DictEnum中获取 DictEnum.PRO_CHARGING_STATUS 便于维护
|
||||||
|
options: getDictOptions('pro_charging_status'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '状态',
|
||||||
|
fieldName: 'state',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
||||||
@@ -149,122 +225,18 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '审核状态',
|
label: '创建人id',
|
||||||
fieldName: 'reviewStatus',
|
fieldName: 'createById',
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护
|
|
||||||
options: getDictOptions('wy_shzt'),
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '会议预订人',
|
|
||||||
fieldName: 'bookingName',
|
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '使用单位',
|
label: '更新人id',
|
||||||
fieldName: 'userUnit',
|
fieldName: 'updateById',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '会议主题',
|
label: '搜索值',
|
||||||
fieldName: 'conferenceTheme',
|
fieldName: 'searchValue',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '预约日期',
|
|
||||||
fieldName: 'appointmentDate',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '预约开始时段',
|
|
||||||
fieldName: 'appointmentBeginTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '预约结束时段',
|
|
||||||
fieldName: 'appointmentEndTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '参会人员',
|
|
||||||
fieldName: 'attendeesName',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '参会人数',
|
|
||||||
fieldName: 'approverCount',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '签到开始时间',
|
|
||||||
fieldName: 'checkInStartTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '签到结束时间',
|
|
||||||
fieldName: 'checkInEndTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '评价',
|
|
||||||
fieldName: 'evaluate',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '备注',
|
|
||||||
fieldName: 'remark',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '是否需要增值服务',
|
|
||||||
fieldName: 'addServices',
|
|
||||||
component: 'RadioGroup',
|
|
||||||
componentProps: {
|
|
||||||
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
|
|
||||||
options: getDictOptions('wy_sf'),
|
|
||||||
buttonStyle: 'solid',
|
|
||||||
optionType: 'button',
|
|
||||||
},
|
|
||||||
rules: 'selectRequired',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -1,29 +1,20 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Recordable } from '@vben/types';
|
|
||||||
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
import dayjs from 'dayjs';
|
import {
|
||||||
|
|
||||||
import {
|
|
||||||
useVbenVxeGrid,
|
useVbenVxeGrid,
|
||||||
vxeCheckboxChecked,
|
vxeCheckboxChecked,
|
||||||
type VxeGridProps
|
type VxeGridProps
|
||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
roomBookingExport,
|
bookingList,
|
||||||
roomBookingList,
|
bookingRemove,
|
||||||
roomBookingRemove,
|
} from '#/api/property/roomBooking/conferenceReservationRecords';
|
||||||
} from '#/api/property/roomBooking';
|
import type { BookingForm } from '#/api/property/roomBooking/conferenceReservationRecords/model';
|
||||||
import type { RoomBookingForm } from '#/api/property/roomBooking/model';
|
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
|
||||||
|
|
||||||
import roomBookingModal from './roomBooking-modal.vue';
|
import ConferenceReservationRecordsModal from './conferenceReservationRecords-modal.vue';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
@@ -35,15 +26,6 @@ const formOptions: VbenFormProps = {
|
|||||||
},
|
},
|
||||||
schema: querySchema(),
|
schema: querySchema(),
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
|
|
||||||
// 不需要直接删除
|
|
||||||
// fieldMappingTime: [
|
|
||||||
// [
|
|
||||||
// 'createTime',
|
|
||||||
// ['params[beginTime]', 'params[endTime]'],
|
|
||||||
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
|
|
||||||
// ],
|
|
||||||
// ],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
const gridOptions: VxeGridProps = {
|
||||||
@@ -52,11 +34,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
highlight: true,
|
highlight: true,
|
||||||
// 翻页时保留选中状态
|
// 翻页时保留选中状态
|
||||||
reserve: true,
|
reserve: true,
|
||||||
// 点击行选中
|
|
||||||
// trigger: 'row',
|
|
||||||
},
|
},
|
||||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
||||||
// columns: columns(),
|
|
||||||
columns,
|
columns,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
keepSource: true,
|
keepSource: true,
|
||||||
@@ -64,7 +42,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues = {}) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
return await roomBookingList({
|
return await bookingList({
|
||||||
pageNum: page.currentPage,
|
pageNum: page.currentPage,
|
||||||
pageSize: page.pageSize,
|
pageSize: page.pageSize,
|
||||||
...formValues,
|
...formValues,
|
||||||
@@ -75,8 +53,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
},
|
},
|
||||||
// 表格全局唯一表示 保存列配置需要用到
|
id: 'system-booking-index'
|
||||||
id: 'property-roomBooking-index'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||||
@@ -84,8 +61,8 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
|||||||
gridOptions,
|
gridOptions,
|
||||||
});
|
});
|
||||||
|
|
||||||
const [RoomBookingModal, modalApi] = useVbenModal({
|
const [BookingModal, modalApi] = useVbenModal({
|
||||||
connectedComponent: roomBookingModal,
|
connectedComponent: ConferenceReservationRecordsModal,
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
@@ -93,59 +70,47 @@ function handleAdd() {
|
|||||||
modalApi.open();
|
modalApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleEdit(row: Required<RoomBookingForm>) {
|
async function handleEdit(row: Required<BookingForm>) {
|
||||||
modalApi.setData({ id: row.id });
|
modalApi.setData({ id: row.id });
|
||||||
modalApi.open();
|
modalApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(row: Required<RoomBookingForm>) {
|
async function handleDelete(row: Required<BookingForm>) {
|
||||||
await roomBookingRemove(row.id);
|
await bookingRemove(row.id);
|
||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Required<RoomBookingForm>) => row.id);
|
const ids = rows.map((row: Required<BookingForm>) => row.id);
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await roomBookingRemove(ids);
|
await bookingRemove(ids);
|
||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDownloadExcel() {
|
|
||||||
commonDownloadExcel(roomBookingExport, '会议管理数据', tableApi.formApi.form.values, {
|
|
||||||
fieldMappingTime: formOptions.fieldMappingTime,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Page :auto-content-height="true">
|
<Page :auto-content-height="true">
|
||||||
<BasicTable table-title="会议管理列表">
|
<BasicTable table-title="会议室预约记录列表">
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<Space>
|
<Space>
|
||||||
<a-button
|
|
||||||
v-access:code="['property:roomBooking:export']"
|
|
||||||
@click="handleDownloadExcel"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.export') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
<a-button
|
||||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
danger
|
danger
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['property:roomBooking:remove']"
|
v-access:code="['system:booking:remove']"
|
||||||
@click="handleMultiDelete">
|
@click="handleMultiDelete">
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['property:roomBooking:add']"
|
v-access:code="['system:booking:add']"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.add') }}
|
{{ $t('pages.common.add') }}
|
||||||
@@ -155,7 +120,7 @@ function handleDownloadExcel() {
|
|||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
v-access:code="['property:roomBooking:edit']"
|
v-access:code="['system:booking:edit']"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.edit') }}
|
{{ $t('pages.common.edit') }}
|
||||||
@@ -168,7 +133,7 @@ function handleDownloadExcel() {
|
|||||||
>
|
>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
danger
|
danger
|
||||||
v-access:code="['property:roomBooking:remove']"
|
v-access:code="['system:booking:remove']"
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
@@ -177,6 +142,6 @@ function handleDownloadExcel() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<RoomBookingModal @reload="tableApi.query()" />
|
<ConferenceReservationRecordsModal @reload="tableApi.query()" />
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -0,0 +1,142 @@
|
|||||||
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
import {getDictOptions} from "#/utils/dict";
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
|
|
||||||
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
|
{
|
||||||
|
component: 'Input',
|
||||||
|
fieldName: 'name',
|
||||||
|
label: '会议室名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('meeting_room_status'),
|
||||||
|
},
|
||||||
|
fieldName: 'attach',
|
||||||
|
label: '状态',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
component: 'Input',
|
||||||
|
fieldName: 'createById',
|
||||||
|
label: '创建人id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
component: 'Input',
|
||||||
|
fieldName: 'updateById',
|
||||||
|
label: '更新人id',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const columns: VxeGridProps['columns'] = [
|
||||||
|
{ type: 'checkbox', width: 60 },
|
||||||
|
{
|
||||||
|
title: '会议室名称',
|
||||||
|
field: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '会议室地址',
|
||||||
|
field: 'location',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '可容纳人数',
|
||||||
|
field: 'personNumber',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '基础服务',
|
||||||
|
field: 'baseServiceId',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '基础价格',
|
||||||
|
field: 'basePrice',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
field: 'attach',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.attach, 'meeting_room_status');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建人id',
|
||||||
|
field: 'createById',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '更新人id',
|
||||||
|
field: 'updateById',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'action',
|
||||||
|
fixed: 'right',
|
||||||
|
slots: { default: 'action' },
|
||||||
|
title: '操作',
|
||||||
|
width: 180,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const modalSchema: FormSchemaGetter = () => [
|
||||||
|
{
|
||||||
|
label: '主键',
|
||||||
|
fieldName: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
show: () => false,
|
||||||
|
triggerFields: [''],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '会议室名称',
|
||||||
|
fieldName: 'name',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '会议室地址',
|
||||||
|
fieldName: 'location',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '可容纳人数',
|
||||||
|
fieldName: 'personNumber',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '基础服务',
|
||||||
|
fieldName: 'baseServiceId',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '基础价格',
|
||||||
|
fieldName: 'basePrice',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '状态',
|
||||||
|
fieldName: 'attach',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('meeting_room_status'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建人id',
|
||||||
|
fieldName: 'createById',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '更新人id',
|
||||||
|
fieldName: 'updateById',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
];
|
@@ -1,7 +1,147 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
import {
|
||||||
|
useVbenVxeGrid,
|
||||||
|
vxeCheckboxChecked,
|
||||||
|
type VxeGridProps
|
||||||
|
} from '#/adapter/vxe-table';
|
||||||
|
|
||||||
|
import {
|
||||||
|
meetList,
|
||||||
|
meetRemove,
|
||||||
|
} from '#/api/property/roomBooking/conferenceSettings';
|
||||||
|
import type { MeetForm } from '#/api/property/roomBooking/conferenceSettings/model';
|
||||||
|
import meetModal from './meet-modal.vue';
|
||||||
|
import { columns, querySchema } from './data';
|
||||||
|
|
||||||
|
const formOptions: VbenFormProps = {
|
||||||
|
commonConfig: {
|
||||||
|
labelWidth: 80,
|
||||||
|
componentProps: {
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
schema: querySchema(),
|
||||||
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
|
};
|
||||||
|
|
||||||
|
const gridOptions: VxeGridProps = {
|
||||||
|
checkboxConfig: {
|
||||||
|
// 高亮
|
||||||
|
highlight: true,
|
||||||
|
// 翻页时保留选中状态
|
||||||
|
reserve: true,
|
||||||
|
},
|
||||||
|
columns,
|
||||||
|
height: 'auto',
|
||||||
|
keepSource: true,
|
||||||
|
pagerConfig: {},
|
||||||
|
proxyConfig: {
|
||||||
|
ajax: {
|
||||||
|
query: async ({ page }, formValues = {}) => {
|
||||||
|
return await meetList({
|
||||||
|
pageNum: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
...formValues,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rowConfig: {
|
||||||
|
keyField: 'id',
|
||||||
|
},
|
||||||
|
// 表格全局唯一表示 保存列配置需要用到
|
||||||
|
id: 'system-meet-index'
|
||||||
|
};
|
||||||
|
|
||||||
|
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||||
|
formOptions,
|
||||||
|
gridOptions,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [MeetModal, modalApi] = useVbenModal({
|
||||||
|
connectedComponent: meetModal,
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleAdd() {
|
||||||
|
modalApi.setData({});
|
||||||
|
modalApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleEdit(row: Required<MeetForm>) {
|
||||||
|
modalApi.setData({ id: row.id });
|
||||||
|
modalApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleDelete(row: Required<MeetForm>) {
|
||||||
|
await meetRemove(row.id);
|
||||||
|
await tableApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMultiDelete() {
|
||||||
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
|
const ids = rows.map((row: Required<MeetForm>) => row.id);
|
||||||
|
Modal.confirm({
|
||||||
|
title: '提示',
|
||||||
|
okType: 'danger',
|
||||||
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
onOk: async () => {
|
||||||
|
await meetRemove(ids);
|
||||||
|
await tableApi.query();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>会议室设置
|
<Page :auto-content-height="true">
|
||||||
|
<BasicTable table-title="会议室设置列表">
|
||||||
</div>
|
<template #toolbar-tools>
|
||||||
|
<Space>
|
||||||
|
<a-button
|
||||||
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
|
danger
|
||||||
|
type="primary"
|
||||||
|
v-access:code="['system:meet:remove']"
|
||||||
|
@click="handleMultiDelete">
|
||||||
|
{{ $t('pages.common.delete') }}
|
||||||
|
</a-button>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
v-access:code="['system:meet:add']"
|
||||||
|
@click="handleAdd"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.add') }}
|
||||||
|
</a-button>
|
||||||
|
</Space>
|
||||||
|
</template>
|
||||||
|
<template #action="{ row }">
|
||||||
|
<Space>
|
||||||
|
<ghost-button
|
||||||
|
v-access:code="['system:meet:edit']"
|
||||||
|
@click.stop="handleEdit(row)"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.edit') }}
|
||||||
|
</ghost-button>
|
||||||
|
<Popconfirm
|
||||||
|
:get-popup-container="getVxePopupContainer"
|
||||||
|
placement="left"
|
||||||
|
title="确认删除?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<ghost-button
|
||||||
|
danger
|
||||||
|
v-access:code="['system:meet:remove']"
|
||||||
|
@click.stop=""
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.delete') }}
|
||||||
|
</ghost-button>
|
||||||
|
</Popconfirm>
|
||||||
|
</Space>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<MeetModal @reload="tableApi.query()" />
|
||||||
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
<script></script>
|
|
||||||
<style lang="scss"></style>
|
|
@@ -0,0 +1,101 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { $t } from '@vben/locales';
|
||||||
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
import { meetAdd, meetInfo, meetUpdate } from '#/api/property/roomBooking/conferenceSettings';
|
||||||
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
|
||||||
|
import { modalSchema } from './data';
|
||||||
|
|
||||||
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
|
const isUpdate = ref(false);
|
||||||
|
const title = computed(() => {
|
||||||
|
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||||
|
});
|
||||||
|
|
||||||
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
|
commonConfig: {
|
||||||
|
// 默认占满两列
|
||||||
|
formItemClass: 'col-span-1',
|
||||||
|
// 默认label宽度 px
|
||||||
|
labelWidth: 80,
|
||||||
|
// 通用配置项 会影响到所有表单项
|
||||||
|
componentProps: {
|
||||||
|
class: 'w-full',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
schema: modalSchema(),
|
||||||
|
showDefaultActions: false,
|
||||||
|
wrapperClass: 'grid-cols-2',
|
||||||
|
});
|
||||||
|
|
||||||
|
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||||
|
{
|
||||||
|
initializedGetter: defaultFormValueGetter(formApi),
|
||||||
|
currentGetter: defaultFormValueGetter(formApi),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
|
// 在这里更改宽度
|
||||||
|
class: 'w-[60%]',
|
||||||
|
fullscreenButton: false,
|
||||||
|
onBeforeClose,
|
||||||
|
onClosed: handleClosed,
|
||||||
|
onConfirm: handleConfirm,
|
||||||
|
onOpenChange: async (isOpen) => {
|
||||||
|
if (!isOpen) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
modalApi.modalLoading(true);
|
||||||
|
|
||||||
|
const { id } = modalApi.getData() as { id?: number | string };
|
||||||
|
isUpdate.value = !!id;
|
||||||
|
|
||||||
|
if (isUpdate.value && id) {
|
||||||
|
const record = await meetInfo(id);
|
||||||
|
await formApi.setValues(record);
|
||||||
|
}
|
||||||
|
await markInitialized();
|
||||||
|
|
||||||
|
modalApi.modalLoading(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleConfirm() {
|
||||||
|
try {
|
||||||
|
modalApi.lock(true);
|
||||||
|
const { valid } = await formApi.validate();
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
|
const data = cloneDeep(await formApi.getValues());
|
||||||
|
await (isUpdate.value ? meetUpdate(data) : meetAdd(data));
|
||||||
|
resetInitialized();
|
||||||
|
emit('reload');
|
||||||
|
modalApi.close();
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
} finally {
|
||||||
|
modalApi.lock(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleClosed() {
|
||||||
|
await formApi.resetForm();
|
||||||
|
resetInitialized();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BasicModal :title="title">
|
||||||
|
<BasicForm />
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
@@ -27,9 +27,8 @@ export default defineConfig(async () => {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
// target: 'http://by.missmoc.top:3010/',
|
target: 'http://192.168.0.106:8080',
|
||||||
// target: 'http://192.168.0.103:8080',
|
// target: 'http://47.109.37.87:3010',
|
||||||
target: 'http://47.109.37.87:3010',
|
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user