Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import type { WorkOrdersVO, WorkOrdersForm, WorkOrdersQuery } 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 workOrdersList(params?: WorkOrdersQuery) {
|
||||
return requestClient.get<PageResult<WorkOrdersVO>>('/property/workOrders/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工单处理列表
|
||||
* @param params
|
||||
* @returns 工单处理列表
|
||||
*/
|
||||
export function workOrdersExport(params?: WorkOrdersQuery) {
|
||||
return commonExport('/property/workOrders/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单处理详情
|
||||
* @param id id
|
||||
* @returns 工单处理详情
|
||||
*/
|
||||
export function workOrdersInfo(id: ID) {
|
||||
return requestClient.get<WorkOrdersVO>(`/property/workOrders/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单处理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function workOrdersAdd(data: WorkOrdersForm) {
|
||||
return requestClient.postWithMsg<void>('/property/workOrders', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新工单处理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function workOrdersUpdate(data: WorkOrdersForm) {
|
||||
return requestClient.putWithMsg<void>('/property/workOrders', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单处理
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function workOrdersRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/workOrders/${id}`);
|
||||
}
|
219
apps/web-antd/src/api/property/businessManagement/workOrders/model.d.ts
vendored
Normal file
219
apps/web-antd/src/api/property/businessManagement/workOrders/model.d.ts
vendored
Normal file
@@ -0,0 +1,219 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface WorkOrdersVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
orderNo: string;
|
||||
|
||||
/**
|
||||
* 工单名称
|
||||
*/
|
||||
orderName: string;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
type: number;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
dispatchTime: string;
|
||||
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
initiatorName: string;
|
||||
|
||||
/**
|
||||
* 发起人手机号
|
||||
*/
|
||||
initiatorPhone: string;
|
||||
|
||||
/**
|
||||
* 处理人姓名
|
||||
*/
|
||||
handler: string;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
location: string;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
planCompleTime: string;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
compleTime: string;
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
serviceEvalua: string;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
isTimeOut: number;
|
||||
|
||||
}
|
||||
|
||||
export interface WorkOrdersForm extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
orderNo?: string;
|
||||
|
||||
/**
|
||||
* 工单名称
|
||||
*/
|
||||
orderName?: string;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
type?: number;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
dispatchTime?: string;
|
||||
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
initiatorName?: string;
|
||||
|
||||
/**
|
||||
* 发起人手机号
|
||||
*/
|
||||
initiatorPhone?: string;
|
||||
|
||||
/**
|
||||
* 处理人姓名
|
||||
*/
|
||||
handler?: string;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
location?: string;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
planCompleTime?: string;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
compleTime?: string;
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
serviceEvalua?: string;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
isTimeOut?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface WorkOrdersQuery extends PageQuery {
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
orderNo?: string;
|
||||
|
||||
/**
|
||||
* 工单名称
|
||||
*/
|
||||
orderName?: string;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
type?: number;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
dispatchTime?: string;
|
||||
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
initiatorName?: string;
|
||||
|
||||
/**
|
||||
* 发起人手机号
|
||||
*/
|
||||
initiatorPhone?: string;
|
||||
|
||||
/**
|
||||
* 处理人姓名
|
||||
*/
|
||||
handler?: string;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
location?: string;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
planCompleTime?: string;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
compleTime?: string;
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
serviceEvalua?: string;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
isTimeOut?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
import type { WorkOrdersTypeVO, WorkOrdersTypeForm, WorkOrdersTypeQuery } 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 workOrdersTypeList(params?: WorkOrdersTypeQuery) {
|
||||
return requestClient.get<PageResult<WorkOrdersTypeVO>>('/property/workOrdersType/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工单类型管理列表
|
||||
* @param params
|
||||
* @returns 工单类型管理列表
|
||||
*/
|
||||
export function workOrdersTypeExport(params?: WorkOrdersTypeQuery) {
|
||||
return commonExport('/property/workOrdersType/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单类型管理详情
|
||||
* @param id id
|
||||
* @returns 工单类型管理详情
|
||||
*/
|
||||
export function workOrdersTypeInfo(id: ID) {
|
||||
return requestClient.get<WorkOrdersTypeVO>(`/property/workOrdersType/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单类型管理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function workOrdersTypeAdd(data: WorkOrdersTypeForm) {
|
||||
return requestClient.postWithMsg<void>('/property/workOrdersType', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新工单类型管理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function workOrdersTypeUpdate(data: WorkOrdersTypeForm) {
|
||||
return requestClient.putWithMsg<void>('/property/workOrdersType', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单类型管理
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function workOrdersTypeRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/workOrdersType/${id}`);
|
||||
}
|
112
apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts
vendored
Normal file
112
apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface WorkOrdersTypeVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 工单类型编号
|
||||
*/
|
||||
orderTypeNo: string;
|
||||
|
||||
/**
|
||||
* 工单类型名称
|
||||
*/
|
||||
orderTypeName: string;
|
||||
|
||||
/**
|
||||
* 运作模式
|
||||
*/
|
||||
operationMode: string;
|
||||
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
sort: number;
|
||||
|
||||
/**
|
||||
* 累计工单数量
|
||||
*/
|
||||
number: number;
|
||||
|
||||
/**
|
||||
* 是否支持转单(0支持,1不支持)
|
||||
*/
|
||||
isTransfers: number;
|
||||
}
|
||||
|
||||
export interface WorkOrdersTypeForm extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 工单类型编号
|
||||
*/
|
||||
orderTypeNo?: string;
|
||||
|
||||
/**
|
||||
* 工单类型名称
|
||||
*/
|
||||
orderTypeName?: string;
|
||||
|
||||
/**
|
||||
* 运作模式
|
||||
*/
|
||||
operationMode?: string;
|
||||
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
sort?: number;
|
||||
|
||||
/**
|
||||
* 累计工单数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 是否支持转单(0支持,1不支持)
|
||||
*/
|
||||
isTransfers?: number;
|
||||
}
|
||||
|
||||
export interface WorkOrdersTypeQuery extends PageQuery {
|
||||
/**
|
||||
* 工单类型编号
|
||||
*/
|
||||
orderTypeNo?: string;
|
||||
|
||||
/**
|
||||
* 工单类型名称
|
||||
*/
|
||||
orderTypeName?: string;
|
||||
|
||||
/**
|
||||
* 运作模式
|
||||
*/
|
||||
operationMode?: string;
|
||||
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
sort?: number;
|
||||
|
||||
/**
|
||||
* 累计工单数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 是否支持转单(0支持,1不支持)
|
||||
*/
|
||||
isTransfers?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
@@ -14,6 +14,9 @@ import { requestClient } from '#/api/request';
|
||||
export function attachList(params?: AttachQuery) {
|
||||
return requestClient.get<PageResult<AttachVO>>('/property/attach/list', { params });
|
||||
}
|
||||
export function attachListAll() {
|
||||
return requestClient.get<AttachVO[]>('/property/attach/attachList', );
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会议室增值服务列表
|
||||
|
@@ -1,8 +1,6 @@
|
||||
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';
|
||||
|
||||
@@ -12,7 +10,7 @@ import { requestClient } from '#/api/request';
|
||||
* @returns booking列表
|
||||
*/
|
||||
export function bookingList(params?: BookingQuery) {
|
||||
return requestClient.get<PageResult<BookingVO>>('/system/booking/list', { params });
|
||||
return requestClient.get<PageResult<BookingVO>>('/property/meetbooking/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,7 +28,7 @@ export function bookingExport(params?: BookingQuery) {
|
||||
* @returns booking详情
|
||||
*/
|
||||
export function bookingInfo(id: ID) {
|
||||
return requestClient.get<BookingVO>(`/system/booking/${id}`);
|
||||
return requestClient.get<BookingVO>(`/property/meetbooking/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +46,7 @@ export function bookingAdd(data: BookingForm) {
|
||||
* @returns void
|
||||
*/
|
||||
export function bookingUpdate(data: BookingForm) {
|
||||
return requestClient.putWithMsg<void>('/system/booking', data);
|
||||
return requestClient.putWithMsg<void>('/property/meetbooking', data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -85,7 +85,6 @@ export interface BookingVO {
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue: string;
|
||||
|
||||
}
|
||||
|
||||
export interface BookingForm extends BaseEntity {
|
||||
@@ -173,7 +172,6 @@ export interface BookingForm extends BaseEntity {
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface BookingQuery extends PageQuery {
|
||||
|
@@ -0,0 +1,12 @@
|
||||
import type { ReservationForm} from './model';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 新增会议管理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function reservationAdd(data: ReservationForm) {
|
||||
return requestClient.postWithMsg<void>('/property/meetbooking', data);
|
||||
}
|
59
apps/web-antd/src/api/property/roomBooking/conferenceReservations/model.d.ts
vendored
Normal file
59
apps/web-antd/src/api/property/roomBooking/conferenceReservations/model.d.ts
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { BaseEntity } from '#/api/common';
|
||||
|
||||
export interface ReservationForm extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 会议室id
|
||||
*/
|
||||
meetId?: string | number;
|
||||
|
||||
/**
|
||||
* 预约人
|
||||
*/
|
||||
person?: string;
|
||||
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
unit?: string;
|
||||
|
||||
/**
|
||||
* 参会人数
|
||||
*/
|
||||
personSum?: string;
|
||||
|
||||
/**
|
||||
* 会议主题
|
||||
*/
|
||||
conferenceTheme?: string;
|
||||
|
||||
/**
|
||||
* 预约日期
|
||||
*/
|
||||
appointmentDate?: string;
|
||||
|
||||
/**
|
||||
* 预约开始时段
|
||||
*/
|
||||
appointmentBeginTime?: string;
|
||||
|
||||
/**
|
||||
* 预约结束时段
|
||||
*/
|
||||
appointmentEndTime?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 是否需要增值服务(0:需要,1:不需要)
|
||||
*/
|
||||
attach?: number;
|
||||
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
import type { MeetVO, MeetForm, MeetQuery } from './model';
|
||||
import type {MeetVO, MeetForm, MeetQuery, MeetBo} from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
@@ -12,7 +12,7 @@ import { requestClient } from '#/api/request';
|
||||
* @returns 会议室设置列表
|
||||
*/
|
||||
export function meetList(params?: MeetQuery) {
|
||||
return requestClient.get<PageResult<MeetVO>>('/system/meet/list', { params });
|
||||
return requestClient.get<PageResult<MeetVO>>('/property/meet/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,7 @@ export function meetList(params?: MeetQuery) {
|
||||
* @returns 会议室设置列表
|
||||
*/
|
||||
export function meetExport(params?: MeetQuery) {
|
||||
return commonExport('/system/meet/export', params ?? {});
|
||||
return commonExport('/property/meet/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,7 @@ export function meetExport(params?: MeetQuery) {
|
||||
* @returns 会议室设置详情
|
||||
*/
|
||||
export function meetInfo(id: ID) {
|
||||
return requestClient.get<MeetVO>(`/system/meet/${id}`);
|
||||
return requestClient.get<MeetVO>(`/property/meet/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ export function meetInfo(id: ID) {
|
||||
* @returns void
|
||||
*/
|
||||
export function meetAdd(data: MeetForm) {
|
||||
return requestClient.postWithMsg<void>('/system/meet', data);
|
||||
return requestClient.postWithMsg<void>('/property/meet', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ export function meetAdd(data: MeetForm) {
|
||||
* @returns void
|
||||
*/
|
||||
export function meetUpdate(data: MeetForm) {
|
||||
return requestClient.putWithMsg<void>('/system/meet', data);
|
||||
return requestClient.putWithMsg<void>('/property/meet', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,5 +57,9 @@ export function meetUpdate(data: MeetForm) {
|
||||
* @returns void
|
||||
*/
|
||||
export function meetRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/system/meet/${id}`);
|
||||
return requestClient.deleteWithMsg<void>(`/property/meet/${id}`);
|
||||
}
|
||||
|
||||
export function notlist(params?: MeetBo) {
|
||||
return requestClient.get<PageResult<MeetVO>>('/property/meet/notlist', { params });
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ export interface MeetVO {
|
||||
/**
|
||||
* 基础服务
|
||||
*/
|
||||
baseServiceId: string | number;
|
||||
baseService: string;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
@@ -35,21 +35,38 @@ export interface MeetVO {
|
||||
* 增值服务是否启用
|
||||
*/
|
||||
attach: number;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
* 负责人
|
||||
*/
|
||||
createById: string | number;
|
||||
|
||||
principals: string;
|
||||
/**
|
||||
* 更新人id
|
||||
* 描述
|
||||
*/
|
||||
updateById: string | number;
|
||||
|
||||
descs: string;
|
||||
/**
|
||||
* 搜索值
|
||||
* 联系电话
|
||||
*/
|
||||
searchValue: string;
|
||||
phoneNo: string;
|
||||
/**
|
||||
* 是否审核
|
||||
*/
|
||||
isCheck: string;
|
||||
/**
|
||||
* 开放时间
|
||||
*/
|
||||
openHours: string;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status: string;
|
||||
/**
|
||||
*费用模式
|
||||
*/
|
||||
expenseType: string;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
picture: string;
|
||||
}
|
||||
|
||||
export interface MeetForm extends BaseEntity {
|
||||
@@ -103,6 +120,39 @@ export interface MeetForm extends BaseEntity {
|
||||
*/
|
||||
searchValue?: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principals: string;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
descs: string;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
phoneNo: string;
|
||||
/**
|
||||
* 是否审核
|
||||
*/
|
||||
isCheck: string;
|
||||
/**
|
||||
* 开放时间
|
||||
*/
|
||||
openHours: string;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status: string;
|
||||
/**
|
||||
*费用模式
|
||||
*/
|
||||
expenseType: string;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
picture: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MeetQuery extends PageQuery {
|
||||
@@ -155,6 +205,39 @@ export interface MeetQuery extends PageQuery {
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principals: string;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
descs: string;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
phoneNo: string;
|
||||
/**
|
||||
* 是否审核
|
||||
*/
|
||||
isCheck: string;
|
||||
/**
|
||||
* 开放时间
|
||||
*/
|
||||
openHours: string;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status: string;
|
||||
/**
|
||||
*费用模式
|
||||
*/
|
||||
expenseType: string;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
picture: string;
|
||||
}
|
||||
|
||||
export interface conferenceSettingsDetail extends BaseEntity {
|
||||
@@ -173,6 +256,8 @@ export interface conferenceSettingsDetail extends BaseEntity {
|
||||
*/
|
||||
location: string;
|
||||
|
||||
locationName: string;
|
||||
|
||||
/**
|
||||
* 容纳人数
|
||||
*/
|
||||
@@ -183,6 +268,8 @@ export interface conferenceSettingsDetail extends BaseEntity {
|
||||
*/
|
||||
baseServiceId: string | number;
|
||||
|
||||
baseService: string;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
*/
|
||||
@@ -207,4 +294,96 @@ export interface conferenceSettingsDetail extends BaseEntity {
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue: string;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
principals: string;
|
||||
|
||||
principalsName: string;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
descs: string;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
phoneNo: string;
|
||||
/**
|
||||
* 是否审核
|
||||
*/
|
||||
isCheck: string;
|
||||
/**
|
||||
* 开放时间
|
||||
*/
|
||||
openHours: string;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status: string;
|
||||
/**
|
||||
*费用模式
|
||||
*/
|
||||
expenseType: string;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
picture: string;
|
||||
}
|
||||
|
||||
export interface MeetBo{
|
||||
/**
|
||||
* 会议室名称
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 开放时间
|
||||
*/
|
||||
openHours?: string;
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { initPreferences } from '@vben/preferences';
|
||||
import { unmountGlobalLoading } from '@vben/utils';
|
||||
|
||||
import { overridesPreferences } from './preferences';
|
||||
|
||||
/**
|
||||
@@ -27,5 +26,4 @@ async function initApplication() {
|
||||
// 移除并销毁loading
|
||||
unmountGlobalLoading();
|
||||
}
|
||||
|
||||
initApplication();
|
||||
|
@@ -0,0 +1,210 @@
|
||||
import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {h} from "vue";
|
||||
import {Rate} from "ant-design-vue";
|
||||
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'orderNo',
|
||||
label: '工单编号',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'orderName',
|
||||
label: '工单名称',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_gdclzt'),
|
||||
},
|
||||
fieldName: 'status',
|
||||
label: '状态',
|
||||
},
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{type: 'checkbox', width: 60},
|
||||
{
|
||||
title: '工单编号',
|
||||
field: 'orderNo',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '工单名称',
|
||||
field: 'orderName',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
title: '派单时间',
|
||||
field: 'dispatchTime',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.status, 'wy_gdclzt');
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '地址',
|
||||
field: 'location',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '计划完成时间',
|
||||
field: 'planCompleTime',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '完成时间',
|
||||
field: 'compleTime',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '评价',
|
||||
field: 'serviceEvalua',
|
||||
width: 180,
|
||||
slots:{
|
||||
default: ({ row }) => {
|
||||
return h(Rate, {
|
||||
value: row.serviceEvalua || 0,
|
||||
disabled: true,
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
title: '是否超时',
|
||||
field: 'isTimeOut',
|
||||
width: 100,
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.status, 'wy_sf');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: {default: 'action'},
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: 'id',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '工单名称',
|
||||
fieldName: 'orderName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '工单类型',
|
||||
fieldName: 'type',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
// {
|
||||
// label: '状态',
|
||||
// fieldName: 'status',
|
||||
// component: 'RadioGroup',
|
||||
// componentProps: {
|
||||
// buttonStyle: 'solid',
|
||||
// optionType: 'button',
|
||||
// },
|
||||
// rules: 'selectRequired',
|
||||
// },
|
||||
{
|
||||
label: '派单时间',
|
||||
fieldName: 'dispatchTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '发起人',
|
||||
fieldName: 'initiatorName',
|
||||
component: 'ApiSelect',
|
||||
formItemClass: 'col-span-2',
|
||||
rules: 'selectRequired',
|
||||
|
||||
},
|
||||
{
|
||||
label: '处理人',
|
||||
fieldName: 'handler',
|
||||
component: 'ApiSelect',
|
||||
formItemClass: 'col-span-2',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '具体位置',
|
||||
fieldName: 'location',
|
||||
component: 'Input',
|
||||
formItemClass: 'col-span-2',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '计划完成时间',
|
||||
fieldName: 'planCompleTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
labelWidth: 110,
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '完成时间',
|
||||
fieldName: 'compleTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '评价',
|
||||
fieldName: 'serviceEvalua',
|
||||
component: 'Rate',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '是否超时',
|
||||
fieldName: 'isTimeOut',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
buttonStyle: 'solid',
|
||||
options: getDictOptions('wy_sf'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
];
|
@@ -0,0 +1,221 @@
|
||||
<script setup lang="ts">
|
||||
import {Page, useVbenModal, type VbenFormProps} from '@vben/common-ui';
|
||||
import {getVxePopupContainer} from '@vben/utils';
|
||||
|
||||
import {Modal, Popconfirm, Space, RadioGroup, RadioButton} from 'ant-design-vue';
|
||||
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
vxeCheckboxChecked,
|
||||
type VxeGridProps
|
||||
} from '#/adapter/vxe-table';
|
||||
|
||||
import {
|
||||
workOrdersExport,
|
||||
workOrdersList,
|
||||
workOrdersRemove,
|
||||
} from '#/api/property/businessManagement/workOrders';
|
||||
import type {WorkOrdersForm} from '#/api/property/businessManagement/workOrders/model';
|
||||
import {commonDownloadExcel} from '#/utils/file/download';
|
||||
|
||||
import workOrdersModal from './workOrders-modal.vue';
|
||||
import workOrdersDetail from './work-orders-detail.vue';
|
||||
import {columns, querySchema} from './data';
|
||||
import {onMounted, ref} from "vue";
|
||||
import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType";
|
||||
|
||||
const ordersTypeList = ref<any[]>([]);
|
||||
const ordersType = ref<string>('0');
|
||||
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 workOrdersList({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
},
|
||||
// 表格全局唯一表示 保存列配置需要用到
|
||||
id: 'property-workOrders-index'
|
||||
};
|
||||
|
||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
formOptions,
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [WorkOrdersModal, modalApi] = useVbenModal({
|
||||
connectedComponent: workOrdersModal,
|
||||
});
|
||||
|
||||
const [WorkOrdersDetail, detailApi] = useVbenModal({
|
||||
connectedComponent: workOrdersDetail,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
}
|
||||
function handleInfo(row) {
|
||||
detailApi.setData({id:row.id});
|
||||
detailApi.open();
|
||||
}
|
||||
|
||||
async function handleEdit(row: Required<WorkOrdersForm>) {
|
||||
modalApi.setData({id: row.id});
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<WorkOrdersForm>) {
|
||||
await workOrdersRemove(row.id);
|
||||
await tableApi.query();
|
||||
}
|
||||
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Required<WorkOrdersForm>) => row.id);
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
onOk: async () => {
|
||||
await workOrdersRemove(ids);
|
||||
await tableApi.query();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function handleDownloadExcel() {
|
||||
commonDownloadExcel(workOrdersExport, '工单处理数据', tableApi.formApi.form.values, {
|
||||
fieldMappingTime: formOptions.fieldMappingTime,
|
||||
});
|
||||
}
|
||||
|
||||
async function queryOrderType() {
|
||||
let params = {
|
||||
pageSize: 1000,
|
||||
pageNum: 1
|
||||
}
|
||||
const res = await workOrdersTypeList(params)
|
||||
ordersTypeList.value = res.rows.map((item) => ({
|
||||
label: item.orderTypeName,
|
||||
value: item.id,
|
||||
}));
|
||||
ordersTypeList.value.unshift({
|
||||
label: '全部工单',
|
||||
value: '0',
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await queryOrderType()
|
||||
});
|
||||
|
||||
async function changeOrdersType(val: string) {
|
||||
await tableApi.formApi.setValues({
|
||||
type: val === '0' ? undefined : val, // '0' 表示全部工单,传 undefined 或清除该字段
|
||||
});
|
||||
console.log(tableApi.formApi.getValues(),'==================')
|
||||
await tableApi.query()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="工单处理列表">
|
||||
<template #table-title>
|
||||
<RadioGroup v-model:value="ordersType" button-style="solid" @change="changeOrdersType">
|
||||
<RadioButton v-for="item in ordersTypeList"
|
||||
:value="item.value">{{ item.label }}
|
||||
</RadioButton>
|
||||
</RadioGroup>
|
||||
</template>
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
v-access:code="['property:workOrders:export']"
|
||||
@click="handleDownloadExcel"
|
||||
>
|
||||
{{ $t('pages.common.export') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['property:workOrders:remove']"
|
||||
@click="handleMultiDelete">
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-access:code="['property:workOrders:add']"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('pages.common.add') }}
|
||||
</a-button>
|
||||
</Space>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['property:workOrders:info']"
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['property:workOrders: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:workOrders:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<WorkOrdersModal @reload="tableApi.query()"/>
|
||||
<WorkOrdersDetail/>
|
||||
</Page>
|
||||
</template>
|
@@ -0,0 +1,98 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import {ref, shallowRef} from 'vue';
|
||||
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
|
||||
import {Descriptions, DescriptionsItem, Timeline, TimelineItem, Rate,Divider} from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
|
||||
import type {WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
orderDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const orderDetail = shallowRef<null | WorkOrdersVO>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
// 赋值
|
||||
orderDetail.value = await workOrdersInfo(id);
|
||||
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="工单详情信息" class="w-[70%]">
|
||||
<div v-if="orderDetail">
|
||||
<Descriptions size="small" :column="2" :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="订单号">
|
||||
{{ orderDetail.orderNo }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="工单名称">
|
||||
{{ orderDetail.orderName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="工单类型">
|
||||
<component
|
||||
:is="renderDict(orderDetail.customerType,'wy_khlx')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="发起人">
|
||||
{{ orderDetail.rentalPeriod }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="派单时间">
|
||||
{{ orderDetail.dispatchTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="处理人">
|
||||
{{ orderDetail.totalAmount + "元" }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="具体位置" :span="2">
|
||||
{{ orderDetail.location }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="计划完成时间">
|
||||
{{ orderDetail.planCompleTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="完成时间">
|
||||
{{ orderDetail.compleTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="评价">
|
||||
<Rate :value="orderDetail.serviceEvalua" disabled/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="是否超时">
|
||||
<component
|
||||
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
<Divider orientation="left" orientation-margin="0px">
|
||||
处理记录
|
||||
</Divider>
|
||||
<Timeline>
|
||||
<TimelineItem>
|
||||
<p>类型:</p>
|
||||
<p>时间:</p>
|
||||
<p>处理人:</p>
|
||||
</TimelineItem>
|
||||
</Timeline>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
@@ -0,0 +1,163 @@
|
||||
<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 {
|
||||
workOrdersAdd,
|
||||
workOrdersInfo,
|
||||
workOrdersUpdate
|
||||
} from '#/api/property/businessManagement/workOrders';
|
||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||
|
||||
import {modalSchema} from './data';
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType";
|
||||
|
||||
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-[70%]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
onConfirm: handleConfirm,
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
await queryPersonData()
|
||||
await queryWorkOrdersType()
|
||||
const {id} = modalApi.getData() as { id?: number | string };
|
||||
isUpdate.value = !!id;
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
const record = await workOrdersInfo(id);
|
||||
record.isTimeOut=record.isTimeOut.toString()
|
||||
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 ? workOrdersUpdate(data) : workOrdersAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
modalApi.lock(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
|
||||
async function queryPersonData() {
|
||||
let params = {
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
}
|
||||
const res = await personList(params);
|
||||
const options = res.rows.map((user) => ({
|
||||
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone,
|
||||
value: user.id,
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
options: options,
|
||||
showSearch:true,
|
||||
filterOption: filterOption
|
||||
}),
|
||||
fieldName: 'initiatorName',
|
||||
},
|
||||
{
|
||||
componentProps: () => ({
|
||||
options: options,
|
||||
showSearch:true,
|
||||
filterOption: filterOption
|
||||
}),
|
||||
fieldName: 'handler',
|
||||
}])
|
||||
}
|
||||
|
||||
async function queryWorkOrdersType() {
|
||||
let params = {
|
||||
pageSize: 1000,
|
||||
pageNum: 1
|
||||
}
|
||||
const res = await workOrdersTypeList(params)
|
||||
const options = res.rows.map((item) => ({
|
||||
label: item.orderTypeName,
|
||||
value: item.id,
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
options: options,
|
||||
filterOption: filterOption,
|
||||
showSearch:true,
|
||||
}),
|
||||
fieldName: 'type',
|
||||
}])
|
||||
}
|
||||
|
||||
const filterOption = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :title="title">
|
||||
<BasicForm/>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
@@ -0,0 +1,120 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'orderTypeNo',
|
||||
label: '工单类型编号',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'orderTypeName',
|
||||
label: '类型名称',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_operation_pattern'),
|
||||
},
|
||||
fieldName: 'operationMode',
|
||||
label: '运作模式',
|
||||
},
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '工单类型编号',
|
||||
field: 'orderTypeNo',
|
||||
},
|
||||
{
|
||||
title: '类型名称',
|
||||
field: 'orderTypeName',
|
||||
},
|
||||
{
|
||||
title: '运作模式',
|
||||
field: 'operationMode',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.operationMode, 'pro_operation_pattern');
|
||||
},
|
||||
},
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '排序值',
|
||||
field: 'sort',
|
||||
},
|
||||
{
|
||||
title: '累计工单数量',
|
||||
field: 'number',
|
||||
},
|
||||
{
|
||||
title: '是否支持转单',
|
||||
field: 'isTransfers',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.isTransfers, 'support_transferring_orders');
|
||||
},
|
||||
},
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: 'id',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '类型名称',
|
||||
fieldName: 'orderTypeName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '运作模式',
|
||||
fieldName: 'operationMode',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_operation_pattern'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '完成时效(小时)',
|
||||
fieldName: 'isTransfers',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '是否支持转单',
|
||||
fieldName: 'isTransfers',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('support_transferring_orders'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '排序值',
|
||||
fieldName: 'sort',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
@@ -0,0 +1,164 @@
|
||||
<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 {
|
||||
workOrdersTypeList,
|
||||
workOrdersTypeRemove,
|
||||
} from '#/api/property/businessManagement/workOrdersType';
|
||||
import type { WorkOrdersTypeForm } from '#/api/property/businessManagement/workOrdersType/model';
|
||||
import workOrdersTypeModal from './workOrdersType-modal.vue';
|
||||
import workOrdersTypeDetail from './workOrdersType-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
labelWidth: 90,
|
||||
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 workOrdersTypeList({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
},
|
||||
// 表格全局唯一表示 保存列配置需要用到
|
||||
id: 'property-workOrdersType-index'
|
||||
};
|
||||
|
||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
formOptions,
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [workOrdersTypeDetailModal, workOrdersTypeDetailApi] = useVbenModal({
|
||||
connectedComponent: workOrdersTypeDetail,
|
||||
});
|
||||
|
||||
async function handleInfo(row: Required<WorkOrdersTypeForm>) {
|
||||
workOrdersTypeDetailApi.setData({ id: row.id });
|
||||
workOrdersTypeDetailApi.open();
|
||||
}
|
||||
|
||||
const [WorkOrdersTypeModal, modalApi] = useVbenModal({
|
||||
connectedComponent: workOrdersTypeModal,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
async function handleEdit(row: Required<WorkOrdersTypeForm>) {
|
||||
modalApi.setData({ id: row.id });
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<WorkOrdersTypeForm>) {
|
||||
await workOrdersTypeRemove(row.id);
|
||||
await tableApi.query();
|
||||
}
|
||||
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Required<WorkOrdersTypeForm>) => row.id);
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
onOk: async () => {
|
||||
await workOrdersTypeRemove(ids);
|
||||
await tableApi.query();
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="工单类型列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['property:workOrdersType:remove']"
|
||||
@click="handleMultiDelete">
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-access:code="['property:workOrdersType: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:workOrdersType: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:workOrdersType:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<WorkOrdersTypeModal @reload="tableApi.query()" />
|
||||
<workOrdersTypeDetailModal/>
|
||||
</Page>
|
||||
</template>
|
@@ -0,0 +1,62 @@
|
||||
<script setup lang="ts">
|
||||
import type {WorkOrdersTypeVO} from '#/api/property/businessManagement/workOrdersType/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem, Rate} from 'ant-design-vue';
|
||||
import {workOrdersTypeInfo} from '#/api/property/businessManagement/workOrdersType';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
workOrdersTypeInfoDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const workOrdersTypeInfoDetail = shallowRef<null | WorkOrdersTypeVO>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await workOrdersTypeInfo(id);
|
||||
workOrdersTypeInfoDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="工单类型信息" class="w-[70%]">
|
||||
<Descriptions v-if="workOrdersTypeInfoDetail" size="small" :column="2" bordered :labelStyle="{width:'120px'}">
|
||||
<DescriptionsItem label="工单类型编号">
|
||||
{{ workOrdersTypeInfoDetail.orderTypeNo }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="类型名称">
|
||||
{{ workOrdersTypeInfoDetail.orderTypeName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="运作模式" v-if="workOrdersTypeInfoDetail.operationMode!=null">
|
||||
<component
|
||||
:is="renderDict(workOrdersTypeInfoDetail.operationMode,'pro_operation_pattern')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="运作模式" v-if="workOrdersTypeInfoDetail.operationMode!=null">
|
||||
<component
|
||||
:is="renderDict(workOrdersTypeInfoDetail.operationMode,'pro_operation_pattern')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="排序值">
|
||||
{{ workOrdersTypeInfoDetail.sort }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="累计工单数量">
|
||||
{{ workOrdersTypeInfoDetail.number }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="是否支持转单" v-if="workOrdersTypeInfoDetail.isTransfers!=null">
|
||||
<component
|
||||
:is="renderDict(workOrdersTypeInfoDetail.isTransfers,'support_transferring_orders')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
@@ -1,19 +1,16 @@
|
||||
<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 { bookingAdd, bookingInfo, bookingUpdate } from '#/api/property/roomBooking/conferenceReservationRecords';
|
||||
import { workOrdersTypeAdd, workOrdersTypeInfo, workOrdersTypeUpdate } from '#/api/property/businessManagement/workOrdersType';
|
||||
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');
|
||||
});
|
||||
@@ -21,9 +18,9 @@ const title = computed(() => {
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
// 默认占满两列
|
||||
formItemClass: 'col-span-2',
|
||||
formItemClass: 'col-span-1',
|
||||
// 默认label宽度 px
|
||||
labelWidth: 80,
|
||||
labelWidth: 120,
|
||||
// 通用配置项 会影响到所有表单项
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
@@ -43,7 +40,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
// 在这里更改宽度
|
||||
class: 'w-[550px]',
|
||||
class: 'w-[60%]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
@@ -58,7 +55,9 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
isUpdate.value = !!id;
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
const record = await bookingInfo(id);
|
||||
const record = await workOrdersTypeInfo(id);
|
||||
record.operationMode = record.operationMode?.toString();
|
||||
record.isTransfers = record.isTransfers?.toString();
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
@@ -76,7 +75,7 @@ async function handleConfirm() {
|
||||
}
|
||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
await (isUpdate.value ? bookingUpdate(data) : bookingAdd(data));
|
||||
await (isUpdate.value ? workOrdersTypeUpdate(data) : workOrdersTypeAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
@@ -31,14 +31,14 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'rentalType',
|
||||
label: '租赁方式',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_charging_status')
|
||||
},
|
||||
fieldName: 'paymentStatus',
|
||||
label: '支付状态',
|
||||
},
|
||||
// {
|
||||
// component: 'Select',
|
||||
// componentProps: {
|
||||
// options: getDictOptions('pro_charging_status')
|
||||
// },
|
||||
// fieldName: 'paymentStatus',
|
||||
// label: '支付状态',
|
||||
// },
|
||||
|
||||
];
|
||||
|
||||
@@ -99,16 +99,16 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '支付状态',
|
||||
field: 'paymentStatus',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.paymentStatus, 'pro_charging_status');
|
||||
},
|
||||
},
|
||||
width: 100
|
||||
},
|
||||
// {
|
||||
// title: '支付状态',
|
||||
// field: 'paymentStatus',
|
||||
// slots: {
|
||||
// default: ({ row }) => {
|
||||
// return renderDict(row.paymentStatus, 'pro_charging_status');
|
||||
// },
|
||||
// },
|
||||
// width: 100
|
||||
// },
|
||||
{
|
||||
title: '是否续租',
|
||||
field: 'isRelet',
|
||||
|
@@ -74,11 +74,11 @@ async function handleOpenChange(open: boolean) {
|
||||
:is="renderDict(orderDetail.rentalType,'wy_zlfs')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="支付状态">
|
||||
<component
|
||||
:is="renderDict(orderDetail.paymentStatus,'pro_charging_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<!-- <DescriptionsItem label="支付状态">-->
|
||||
<!-- <component-->
|
||||
<!-- :is="renderDict(orderDetail.paymentStatus,'pro_charging_status')"-->
|
||||
<!-- />-->
|
||||
<!-- </DescriptionsItem>-->
|
||||
<DescriptionsItem label="是否续租">
|
||||
<component
|
||||
:is="renderDict(orderDetail.isRelet,'wy_sf')"
|
||||
|
@@ -156,9 +156,9 @@ const modalSchema = [
|
||||
min: 1,
|
||||
max: plantInfo.value?.inventory,
|
||||
precision: 0,
|
||||
onChange:async ()=>{
|
||||
onChange: async () => {
|
||||
const formValues = await formApi.getValues();
|
||||
if (formValues.productNum&&plantInfo.value?.rent) {
|
||||
if (formValues.productNum && plantInfo.value?.rent) {
|
||||
singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2);
|
||||
}
|
||||
},
|
||||
@@ -182,7 +182,6 @@ const modalSchema = [
|
||||
step: 1,
|
||||
placeholder: '租赁数量不可超出绿植产品库存数量',
|
||||
onChange: async (value: number) => {
|
||||
console.log(value,'================vvvv')
|
||||
if (plantInfo.value) {
|
||||
singleAmount.value = (plantInfo.value.rent * value).toFixed(2);
|
||||
}
|
||||
@@ -202,8 +201,8 @@ const modalSchema = [
|
||||
slots: {default: 'totalAmount'},
|
||||
dependencies: {
|
||||
// 仅当 租赁方式 为 1(单点) 时显示
|
||||
show: (formValues: any) => formValues.productNum&&formValues.productId&&formValues.rentalType === '1',
|
||||
triggerFields: ['productNum','rentalType'],
|
||||
show: (formValues: any) => formValues.productNum && formValues.productId && formValues.rentalType === '1',
|
||||
triggerFields: ['productNum', 'rentalType'],
|
||||
disabled: true,
|
||||
},
|
||||
labelWidth: 110
|
||||
@@ -317,14 +316,14 @@ async function handleConfirm() {
|
||||
} else {
|
||||
data.productId = undefined;
|
||||
data.productNum = undefined;
|
||||
data.productList = plantsList.value
|
||||
data.productList = planProducts.value
|
||||
data.totalAmount = totalAmount.value
|
||||
}
|
||||
if (data.rentalTime) {
|
||||
data.startTime = data.rentalTime[0];
|
||||
data.endTime = data.rentalTime[1];
|
||||
}
|
||||
data.paymentStatus=0
|
||||
data.paymentStatus = 0
|
||||
await (isUpdate.value ? rentalOrderUpdate(data) : rentalOrderAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
@@ -339,7 +338,12 @@ async function handleConfirm() {
|
||||
//获取有库存的绿植
|
||||
async function getPlanProducts(id: string) {
|
||||
const res = await rentalPlanInfo(id)
|
||||
plantsList.value=res.productList;
|
||||
planProducts.value = res.productList.map(item => ({
|
||||
id:item.productId,
|
||||
plantName: item.product?.plantName,
|
||||
rent: item.product?.rent,
|
||||
inventory: item.productNum,
|
||||
}))
|
||||
totalAmount.value = planProducts.value?.reduce((sum, item: any) => sum + (item.rent * item.inventory), 0).toFixed(2)
|
||||
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
|
||||
const { id } = modalApi.getData() as { id?: number | string };
|
||||
isUpdate.value = !!id;
|
||||
initLocationOptions()
|
||||
await initLocationOptions()
|
||||
if (isUpdate.value && id) {
|
||||
const record = await resident_unitInfo(id);
|
||||
await formApi.setValues(record);
|
||||
|
@@ -0,0 +1,82 @@
|
||||
<script setup lang="ts">
|
||||
import type {BookingVO} from '#/api/property/roomBooking/conferenceReservationRecords/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 {bookingInfo} from '#/api/property/roomBooking/conferenceReservationRecords';
|
||||
import {renderDict} from "#/utils/render";
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
conferenceReservationRecordsDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const conferenceReservationRecordsDetail = shallowRef<null | BookingVO>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const res = await bookingInfo(id);
|
||||
conferenceReservationRecordsDetail.value = res;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="会议室预约记录信息" class="w-[70%]">
|
||||
<Descriptions v-if="conferenceReservationRecordsDetail" size="small" :column="2" bordered :labelStyle="{width:'120px'}">
|
||||
<DescriptionsItem label="会议室名称">
|
||||
{{ conferenceReservationRecordsDetail.name}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="会议室地址">
|
||||
{{ conferenceReservationRecordsDetail.locationName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="所属单位">
|
||||
{{ conferenceReservationRecordsDetail.unitName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预定人">
|
||||
{{ conferenceReservationRecordsDetail.personName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="联系方式">
|
||||
{{ conferenceReservationRecordsDetail.phone }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预定时间">
|
||||
{{ conferenceReservationRecordsDetail.scheduledStarttime + '-' + conferenceReservationRecordsDetail.scheduledEndtime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="参会人数">
|
||||
{{ conferenceReservationRecordsDetail.personSum }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="费用">
|
||||
{{ conferenceReservationRecordsDetail.price }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="是否有增值服务" v-if="conferenceReservationRecordsDetail.payState!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceReservationRecordsDetail.payState,'pro_add_service')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="支付状态" v-if="conferenceReservationRecordsDetail.payState!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceReservationRecordsDetail.payState,'pro_charging_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预约状态" v-if="conferenceReservationRecordsDetail.state!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceReservationRecordsDetail.state,'pro_appointment_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="提交时间">
|
||||
{{ conferenceReservationRecordsDetail.createTime }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
@@ -25,7 +25,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_yyzt'),
|
||||
options: getDictOptions('pro_appointment_status'),
|
||||
},
|
||||
fieldName: 'state',
|
||||
label: '预约状态',
|
||||
@@ -33,25 +33,19 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '会议室名称',
|
||||
field: 'name',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '会议室地址',
|
||||
field: 'meetLocation',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '所属单位',
|
||||
field: 'unit',
|
||||
field: 'unitName',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '预定人',
|
||||
field: 'person',
|
||||
field: 'personName',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
@@ -59,15 +53,29 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'phone',
|
||||
minWidth:'120'
|
||||
},
|
||||
// {
|
||||
// title: '预定时间',
|
||||
// field: 'scheduledStarttime',
|
||||
// minWidth: '180',
|
||||
// formatter: ({ row }) => {
|
||||
// return `${row.scheduledStarttime} ~ ${row.scheduledEndtime}`;
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: '预定开始时间',
|
||||
title: '预定时间',
|
||||
field: 'scheduledStarttime',
|
||||
minWidth:'120'
|
||||
minWidth: '180',
|
||||
formatter: ({ row }) => {
|
||||
const start = row.scheduledStarttime;
|
||||
const end = row.scheduledEndtime;
|
||||
|
||||
const startDate = start.substring(0, 10);
|
||||
const endDate = end.substring(0, 10);
|
||||
|
||||
const endDisplay = startDate === endDate ? end.substring(11) : end;
|
||||
|
||||
return `${start}-${endDisplay}`;
|
||||
},
|
||||
{
|
||||
title: '预定结束时间',
|
||||
field: 'scheduledEndtime',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '参会人数',
|
||||
@@ -82,6 +90,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '是否有增值服务',
|
||||
field: 'attach',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.attach, 'pro_add_service');
|
||||
},
|
||||
},
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
@@ -99,14 +112,14 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'state',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.state, 'wy_yyzt');
|
||||
return renderDict(row.state, 'pro_appointment_status');
|
||||
},
|
||||
},
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '提交时间',
|
||||
field: 'updateTime',
|
||||
field: 'createTime',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
@@ -117,126 +130,3 @@ export const columns: VxeGridProps['columns'] = [
|
||||
width: 180,
|
||||
},
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '会议室名称',
|
||||
fieldName: 'name',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '会议室id',
|
||||
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',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
||||
options: getDictOptions('wy_yyzt'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '创建人id',
|
||||
fieldName: 'createById',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '更新人id',
|
||||
fieldName: 'updateById',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '搜索值',
|
||||
fieldName: 'searchValue',
|
||||
component: 'Input',
|
||||
},
|
||||
];
|
||||
|
@@ -1,21 +1,19 @@
|
||||
<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 { Popconfirm, Space } from 'ant-design-vue';
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
vxeCheckboxChecked,
|
||||
type VxeGridProps
|
||||
} from '#/adapter/vxe-table';
|
||||
|
||||
import {
|
||||
bookingList,
|
||||
bookingRemove,
|
||||
bookingUpdate,
|
||||
} from '#/api/property/roomBooking/conferenceReservationRecords';
|
||||
import type { BookingForm } from '#/api/property/roomBooking/conferenceReservationRecords/model';
|
||||
|
||||
import ConferenceReservationRecordsModal from './conferenceReservationRecords-modal.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import conferenceReservationRecordsDetail
|
||||
from "#/views/property/roomBooking/conferenceReservationRecords/conferenceReservationRecords-detail.vue";
|
||||
import type {BookingForm} from "#/api/property/roomBooking/conferenceReservationRecords/model";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -30,9 +28,7 @@ const formOptions: VbenFormProps = {
|
||||
|
||||
const gridOptions: VxeGridProps = {
|
||||
checkboxConfig: {
|
||||
// 高亮
|
||||
highlight: true,
|
||||
// 翻页时保留选中状态
|
||||
reserve: true,
|
||||
},
|
||||
columns,
|
||||
@@ -61,87 +57,67 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [BookingModal, modalApi] = useVbenModal({
|
||||
connectedComponent: ConferenceReservationRecordsModal,
|
||||
const [conferenceReservationRecordsDetailModal, conferenceReservationRecordsDetailApi] = useVbenModal({
|
||||
connectedComponent: conferenceReservationRecordsDetail,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
async function handleInfo(row: Required<BookingForm>) {
|
||||
conferenceReservationRecordsDetailApi.setData({ id: row.id });
|
||||
conferenceReservationRecordsDetailApi.open();
|
||||
}
|
||||
|
||||
async function handleEdit(row: Required<BookingForm>) {
|
||||
modalApi.setData({ id: row.id });
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<BookingForm>) {
|
||||
await bookingRemove(row.id);
|
||||
async function handleExamine(row: Required<BookingForm>) {
|
||||
row.state = 2
|
||||
await bookingUpdate(row);
|
||||
await tableApi.query();
|
||||
}
|
||||
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Required<BookingForm>) => row.id);
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
onOk: async () => {
|
||||
await bookingRemove(ids);
|
||||
async function handleUnsubscribe(row: Required<BookingForm>) {
|
||||
row.state = 3
|
||||
await bookingUpdate(row);
|
||||
await tableApi.query();
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="会议室预约记录列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['system:booking:remove']"
|
||||
@click="handleMultiDelete">
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-access:code="['system:booking:add']"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('pages.common.add') }}
|
||||
</a-button>
|
||||
</Space>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['system:booking:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(row)"
|
||||
title="确认通过?"
|
||||
@confirm="handleExamine(row)"
|
||||
v-if="row.state === 0"
|
||||
>
|
||||
<ghost-button
|
||||
danger
|
||||
v-access:code="['system:booking:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
{{ '审核' }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
title="确认退订?"
|
||||
@confirm="handleUnsubscribe(row)"
|
||||
v-if="!(row.state === 2) && !(row.state === 3)"
|
||||
>
|
||||
<ghost-button
|
||||
@click.stop=""
|
||||
>
|
||||
{{ '退订' }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<ConferenceReservationRecordsModal @reload="tableApi.query()" />
|
||||
<conferenceReservationRecordsDetailModal/>
|
||||
</Page>
|
||||
</template>
|
||||
|
@@ -0,0 +1,238 @@
|
||||
<script setup lang="ts">
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {cloneDeep} from '@vben/utils';
|
||||
import {useVbenForm} from '#/adapter/form';
|
||||
import {attachListAll} from '#/api/property/roomBooking/conferenceAddServices';
|
||||
import {meetInfo} from '#/api/property/roomBooking/conferenceSettings';
|
||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||
import {modalSchema} from './data';
|
||||
import type {conferenceSettingsDetail} from "#/api/property/roomBooking/conferenceSettings/model";
|
||||
import type {AttachVO} from "#/api/property/roomBooking/conferenceAddServices/model";
|
||||
import {addServiceColumns} from "./data";
|
||||
import {Table, InputNumber, TimeRangePicker} from "ant-design-vue";
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
import {resident_unitList} from "#/api/property/resident/unit";
|
||||
import {reservationAdd} from "#/api/property/roomBooking/conferenceReservations";
|
||||
import {ref} from "vue";
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
const conferenceSettingDetail = ref<conferenceSettingsDetail>()
|
||||
const addServiceList = ref<AttachVO[]>([])
|
||||
const totalAmount = ref<number>(0)
|
||||
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-[70%]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
onConfirm: handleConfirm,
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
await handleOpenChange()
|
||||
await queryAddServices()
|
||||
await queryPersonData()
|
||||
await queryUnitData()
|
||||
await formApi.setValues({
|
||||
attach: '1',
|
||||
})
|
||||
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());
|
||||
data.meetId=conferenceSettingDetail.value?.id;
|
||||
data.name=conferenceSettingDetail.value?.name;
|
||||
if (data.timeSpan && data.timeSpan.length) {
|
||||
data.scheduledStarttime = data.timeSpan[0]?.format("HH:mm");
|
||||
data.scheduledEndtime = data.timeSpan[1]?.format("HH:mm");
|
||||
}
|
||||
data.price=totalAmount.value
|
||||
if(data.attach=='0'){
|
||||
data.meetAttachOrderBoList=addServiceList.value.filter(item=>item.quantity>0);
|
||||
}
|
||||
await (reservationAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
modalApi.lock(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
|
||||
async function handleOpenChange() {
|
||||
const {id} = modalApi.getData() as { id?: number };
|
||||
if (id) {
|
||||
conferenceSettingDetail.value = await meetInfo(id);
|
||||
}
|
||||
}
|
||||
|
||||
async function queryAddServices() {
|
||||
const res = await attachListAll()
|
||||
addServiceList.value = res.map(item => ({
|
||||
meetAttachId: item.id,
|
||||
projectName: item.projectName,
|
||||
price: item.price,
|
||||
unit: item.unit,
|
||||
quantity: 0
|
||||
}))
|
||||
}
|
||||
|
||||
async function queryPersonData() {
|
||||
let params = {
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
}
|
||||
const res = await personList(params);
|
||||
const options = res.rows.map((user) => ({
|
||||
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone,
|
||||
value: user.id,
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
options: options,
|
||||
filterOption: filterOption
|
||||
}),
|
||||
fieldName: 'person',
|
||||
}])
|
||||
}
|
||||
|
||||
async function queryUnitData() {
|
||||
let params = {
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
}
|
||||
const res = await resident_unitList(params);
|
||||
const options = res.rows.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
options: options,
|
||||
filterOption: filterOption,
|
||||
showSearch:true,
|
||||
}),
|
||||
fieldName: 'unit',
|
||||
}])
|
||||
}
|
||||
|
||||
const filterOption = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
|
||||
async function changeProjectNum() {
|
||||
totalAmount.value = 0;
|
||||
addServiceList.value.forEach(item => {
|
||||
totalAmount.value += item.price * item.quantity
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal title="会议室预约">
|
||||
<div class="detail-box" v-if="conferenceSettingDetail">
|
||||
<div>
|
||||
<span>会议室名称: {{ conferenceSettingDetail.name }}</span>
|
||||
<span>容纳人数: {{ conferenceSettingDetail.personNumber }}</span>
|
||||
</div>
|
||||
<div><span>会议室地址: {{ conferenceSettingDetail.locationName }}</span>
|
||||
<span>配套设备: {{ conferenceSettingDetail.baseService }}</span>
|
||||
</div>
|
||||
<div><span>会议室负责人: {{ conferenceSettingDetail.principalsName }}</span>
|
||||
<span>联系电话: {{ conferenceSettingDetail.phoneNo }}</span>
|
||||
</div>
|
||||
<div><span>基础费用: {{
|
||||
conferenceSettingDetail.expenseType == '2' ? conferenceSettingDetail.basePrice + '元' :
|
||||
renderDictValue(conferenceSettingDetail.expenseType, 'wy_fyms')
|
||||
}}</span>
|
||||
<span>开放时段:{{ conferenceSettingDetail.openHours }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<BasicForm>
|
||||
<template #timeSpan="slotProps">
|
||||
<TimeRangePicker style="width: 200px;" format="HH:mm"
|
||||
v-bind="slotProps"></TimeRangePicker>
|
||||
</template>
|
||||
<template #serverInfo="slotProps">
|
||||
<Table :dataSource="addServiceList" v-bind="slotProps" :columns="addServiceColumns"
|
||||
:pagination="false"
|
||||
size="small" :show-header="false" bordered>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.field === 'price'">
|
||||
{{ record.price + '元/' + renderDictValue(record.unit, 'pro_product_unit') }}
|
||||
</template>
|
||||
<template v-else-if="column.field === 'quantity'">
|
||||
<InputNumber id="inputNumber" v-model:value="record.quantity" :min="0"
|
||||
:precision="0" @change="changeProjectNum"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ record[column.field] }}
|
||||
</template>
|
||||
</template>
|
||||
<template #footer v-if="totalAmount">
|
||||
<div style="text-align: right;margin-right: 20px">
|
||||
<b>总金额(元):</b>
|
||||
{{ totalAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.detail-box {
|
||||
width: 100%;
|
||||
|
||||
div {
|
||||
display: grid;
|
||||
margin: 20px;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -0,0 +1,118 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type {VxeGridProps} from "#/adapter/vxe-table";
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '会议预定人',
|
||||
fieldName: 'person',
|
||||
component: 'ApiSelect',
|
||||
rules: 'selectRequired',
|
||||
formItemClass:'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '使用单位',
|
||||
fieldName: 'unit',
|
||||
component: 'ApiSelect',
|
||||
rules: 'selectRequired',
|
||||
formItemClass:'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '会议主题',
|
||||
fieldName: 'meetTheme',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
formItemClass:'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '预约日期',
|
||||
fieldName: 'appointmentTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预约时段',
|
||||
fieldName: 'timeSpan',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
slots:{
|
||||
default: 'meetTheme'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '参会人数',
|
||||
fieldName: 'personSum',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
min:1,
|
||||
precision:0,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Textarea',
|
||||
formItemClass:'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '是否需要增值服务',
|
||||
fieldName: 'attach',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '是', value: '0' },
|
||||
{ label: '否', value: '1' },
|
||||
],
|
||||
},
|
||||
rules: 'required',
|
||||
formItemClass:'col-span-2',
|
||||
labelWidth:130
|
||||
},
|
||||
{
|
||||
label: '增值服务',
|
||||
fieldName: 'serverInfo',
|
||||
component: 'Input',
|
||||
formItemClass:'col-span-2',
|
||||
dependencies: {
|
||||
show: (formValue) =>formValue.attach=='0' ,
|
||||
triggerFields: ['attach'],
|
||||
},
|
||||
slots:{default:'serverInfo'}
|
||||
},
|
||||
];
|
||||
export const addServiceColumns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '产品名称',
|
||||
field: 'projectName',
|
||||
width: 120,
|
||||
align:"center"
|
||||
},
|
||||
{
|
||||
title: '产品价格',
|
||||
field: 'price',
|
||||
width: 120,
|
||||
align:"center"
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
field: 'quantity',
|
||||
width: 200
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
@@ -1,53 +1,140 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="card-box">
|
||||
<Alert message="请先填写以下信息,查询可用会议室" show-icon banner closable type="info"></Alert>
|
||||
<a-form
|
||||
:model="formState"
|
||||
layout="inline"
|
||||
@finish="onFinish"
|
||||
@finishFailed="onFinishFailed"
|
||||
class="form-box"
|
||||
>
|
||||
<a-form-item label="会议日期">
|
||||
<DatePicker v-model:value="formState.appointmentTime" style="width: 200px;"/>
|
||||
</a-form-item>
|
||||
<a-form-item label="会议时段">
|
||||
<TimeRangePicker style="width: 200px;" format="HH:mm"
|
||||
v-model:value="formState.openHours"></TimeRangePicker>
|
||||
</a-form-item>
|
||||
<a-form-item label="参会人数" style="width: 400px;">
|
||||
<InputNumber style="width: 200px;" placeholder="请输入参会人数"
|
||||
v-model:value="formState.personNumber"/>
|
||||
</a-form-item>
|
||||
<a-form-item class="form-button">
|
||||
<a-button @click="handleClean">重置</a-button>
|
||||
<a-button type="primary" class="primary-button"
|
||||
:disabled="!formState.appointmentTime||!formState.openHours||!formState.personNumber"
|
||||
@click="handleSearch">搜索</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div v-if="meetingList?.length" class="card-box">
|
||||
<div v-for="(item,index) in meetingList" :key="index" class="card-list">
|
||||
<div><span class="card-title">{{ item.one }}</span><a-button class="card-button" type="primary">去预约</a-button></div>
|
||||
<div>容纳人数: {{ item.two }}人</div>
|
||||
<div>基础费用: {{ item.three }}元</div>
|
||||
<div>基础服务: {{ item.four }}</div>
|
||||
<div>基础服务: {{ item.five }}</div>
|
||||
<div><span class="card-title">{{ item.name }}</span>
|
||||
<a-button class="card-button" type="primary" @click="handleAdd(item.id)">去预约</a-button>
|
||||
</div>
|
||||
<div>容纳人数: {{ item.personNumber }}人</div>
|
||||
<div>基础费用: {{
|
||||
item.expenseType == '2' ? (item.basePrice+"元") : renderDictValue(item.expenseType, 'wy_fyms')
|
||||
}}
|
||||
</div>
|
||||
<div>开放时段: {{ item.openHours }}</div>
|
||||
<div>配套设备: {{ item.baseService }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="text-align: center;margin-top: 20%">
|
||||
<Empty :image="simpleImage"/>
|
||||
</div>
|
||||
<modal/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
const meetingList = ref([
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
])
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue'
|
||||
import {reactive} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {
|
||||
Form as AForm,
|
||||
FormItem as AFormItem,
|
||||
Button as AButton,
|
||||
TimeRangePicker,
|
||||
InputNumber,
|
||||
Empty,
|
||||
Alert,
|
||||
DatePicker
|
||||
} from 'ant-design-vue';
|
||||
import conferenceAddServicesModal from '../conferenceReservations/conferenceReservations-modal.vue';
|
||||
import {notlist} from "#/api/property/roomBooking/conferenceSettings";
|
||||
import type {MeetVO} from "#/api/property/roomBooking/conferenceSettings/model";
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
interface FormState {
|
||||
openHours?: any[];
|
||||
personNumber?: number|undefined;
|
||||
appointmentTime?:Dayjs|undefined
|
||||
}
|
||||
|
||||
const formState = reactive<FormState>({
|
||||
openHours: [],
|
||||
personNumber: undefined,
|
||||
appointmentTime:undefined
|
||||
});
|
||||
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
|
||||
|
||||
async function handleSearch() {
|
||||
let hours = '';
|
||||
if (formState.openHours && formState.openHours.length) {
|
||||
hours = formState.openHours[0]?.format("HH:mm") + '-' + formState.openHours[1]?.format("HH:mm");
|
||||
}
|
||||
const obj = {
|
||||
openHours: hours??undefined,
|
||||
personNumber: formState.personNumber,
|
||||
appointmentTime:formState.appointmentTime?formState.appointmentTime.format('YYYY-MM-DD'):undefined
|
||||
}
|
||||
meetingList.value =await notlist(obj);
|
||||
}
|
||||
|
||||
const handleClean = () => {
|
||||
formState.openHours = [];
|
||||
formState.personNumber = null;
|
||||
formState.appointmentTime = undefined;
|
||||
}
|
||||
|
||||
const [modal, modalApi] = useVbenModal({
|
||||
connectedComponent: conferenceAddServicesModal,
|
||||
});
|
||||
|
||||
function handleAdd(id:string) {
|
||||
modalApi.setData({id});
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
console.log('Success:', values);
|
||||
};
|
||||
const onFinishFailed = (errorInfo: any) => {
|
||||
console.log('Failed:', errorInfo);
|
||||
};
|
||||
|
||||
const meetingList = ref<MeetVO[]>([])
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card-box{
|
||||
.form-box {
|
||||
width: 100%;
|
||||
padding: 10px 30px 0 30px;
|
||||
position: relative;
|
||||
|
||||
.form-button {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
|
||||
.primary-button {
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
padding: 30px;
|
||||
@@ -56,28 +143,26 @@ const meetingList = ref([
|
||||
gap: 30px;
|
||||
border: none;
|
||||
|
||||
.card-list{
|
||||
.card-list {
|
||||
padding: 15px;
|
||||
background-color: white;
|
||||
border: 1px solid gray;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
|
||||
.card-title{
|
||||
font-size: 1.2vw;
|
||||
.card-title {
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
div:nth-child(1){
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
div{
|
||||
line-height: 1.5vw;
|
||||
|
||||
div {
|
||||
margin: 0.5vw 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 200px;
|
||||
max-width: 300px;
|
||||
|
||||
.card-button{
|
||||
.card-button {
|
||||
right: 15px;
|
||||
position: absolute;
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import {meetInfo} from '#/api/property/roomBooking/conferenceSettings';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
@@ -26,34 +27,52 @@ async function handleOpenChange(open: boolean) {
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await meetInfo(id);
|
||||
conferenceSettingsDetail.value = response;
|
||||
conferenceSettingsDetail.value =await meetInfo(id);
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="访客管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="conferenceSettingsDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="产品名称">
|
||||
{{ conferenceSettingsDetail.projectName}}
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="会议室详情" class="w-[70%]">
|
||||
<Descriptions v-if="conferenceSettingsDetail" size="small" :column="2" bordered
|
||||
:labelStyle="{width:'120px'}">
|
||||
<DescriptionsItem label="会议室名称">
|
||||
{{ conferenceSettingsDetail.name }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="单价(元)">
|
||||
{{ conferenceSettingsDetail.price }}
|
||||
<DescriptionsItem label="可容纳人数">
|
||||
{{ conferenceSettingsDetail.personNumber }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="单位">
|
||||
{{ conferenceSettingsDetail.unit }}
|
||||
<DescriptionsItem label="会议室地址" :span="2">
|
||||
{{ conferenceSettingsDetail.locationName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="类型" v-if="conferenceSettingsDetail.type!=null">
|
||||
<DescriptionsItem label="配套设备" :span="2">
|
||||
{{ conferenceSettingsDetail.baseService }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="负责人" :span="2">
|
||||
{{ conferenceSettingsDetail.principalsName+'-'+conferenceSettingsDetail.phoneNo }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="费用模式" :span="conferenceSettingsDetail.expenseType=='2'?1:2">
|
||||
<component
|
||||
:is="renderDict(conferenceSettingsDetail.type,'wy_parking_spot')"
|
||||
:is="renderDict(conferenceSettingsDetail.expenseType,'wy_fyms')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="状态" v-if="conferenceSettingsDetail.state!=null">
|
||||
<DescriptionsItem label="付费金额(元)" v-if="conferenceSettingsDetail.expenseType=='2'">
|
||||
{{ conferenceSettingsDetail.basePrice }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="会议室图片" :span="2">
|
||||
{{ conferenceSettingsDetail.picture }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预约是否审核">
|
||||
<component
|
||||
:is="renderDict(conferenceSettingsDetail.state,'wy_appointment_tatus')"
|
||||
:is="renderDict(conferenceSettingsDetail.isCheck,'wy_sf')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="开放时段" :span="2">
|
||||
{{ conferenceSettingsDetail.openHours }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="会议室描述" :span="2">
|
||||
{{ conferenceSettingsDetail.descs }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
@@ -1,16 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import {computed, ref} from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {$t} from '@vben/locales';
|
||||
import {cloneDeep, getPopupContainer, handleNode} 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';
|
||||
import {useVbenForm} from '#/adapter/form';
|
||||
import {meetAdd, meetInfo, meetUpdate} from '#/api/property/roomBooking/conferenceSettings';
|
||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||
|
||||
import {modalSchema} from './data';
|
||||
import {TimeRangePicker} from 'ant-design-vue'
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
import {communityTree} from "#/api/property/community";
|
||||
import dayjs from 'dayjs';
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const isUpdate = ref(false);
|
||||
@@ -21,7 +25,7 @@ const title = computed(() => {
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
// 默认占满两列
|
||||
formItemClass: 'col-span-1',
|
||||
formItemClass: 'col-span-2',
|
||||
// 默认label宽度 px
|
||||
labelWidth: 80,
|
||||
// 通用配置项 会影响到所有表单项
|
||||
@@ -34,7 +38,7 @@ const [BasicForm, formApi] = useVbenForm({
|
||||
wrapperClass: 'grid-cols-2',
|
||||
});
|
||||
|
||||
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
const {onBeforeClose, markInitialized, resetInitialized} = useBeforeCloseDiff(
|
||||
{
|
||||
initializedGetter: defaultFormValueGetter(formApi),
|
||||
currentGetter: defaultFormValueGetter(formApi),
|
||||
@@ -43,7 +47,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
// 在这里更改宽度
|
||||
class: 'w-[60%]',
|
||||
class: 'w-[70%]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
@@ -53,12 +57,22 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
|
||||
const { id } = modalApi.getData() as { id?: number | string };
|
||||
await formApi.setValues({
|
||||
expenseType:'1',
|
||||
isCheck:'0',
|
||||
})
|
||||
const {id} = modalApi.getData() as { id?: number | string };
|
||||
isUpdate.value = !!id;
|
||||
|
||||
await queryPerson()
|
||||
await initLocationOptions()
|
||||
if (isUpdate.value && id) {
|
||||
const record = await meetInfo(id);
|
||||
record.expenseType=record.expenseType.toString()
|
||||
record.isCheck=record.isCheck.toString()
|
||||
let hour = record.openHours.split('-');
|
||||
if(hour.length>1){
|
||||
record.openHours=[dayjs(hour[0],'HH:mm'),dayjs(hour[1],'HH:mm')]
|
||||
}
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
@@ -70,12 +84,15 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
async function handleConfirm() {
|
||||
try {
|
||||
modalApi.lock(true);
|
||||
const { valid } = await formApi.validate();
|
||||
const {valid} = await formApi.validate();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
if (data.openHours) {
|
||||
data.openHours = data.openHours[0]?.format("HH:mm") + '-' + data.openHours[1]?.format("HH:mm");
|
||||
}
|
||||
await (isUpdate.value ? meetUpdate(data) : meetAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
@@ -91,11 +108,76 @@ async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
|
||||
async function queryPerson() {
|
||||
let params = {
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
}
|
||||
const res = await personList(params);
|
||||
const options = res.rows.map((user) => ({
|
||||
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone,
|
||||
value: user.id,
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
options: options,
|
||||
filterOption: filterOption,
|
||||
showSearch:true,
|
||||
}),
|
||||
fieldName: 'principals',
|
||||
}])
|
||||
}
|
||||
|
||||
const filterOption = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* 地址数据
|
||||
*/
|
||||
async function initLocationOptions() {
|
||||
const locationList = await communityTree(5);
|
||||
const splitStr = '/';
|
||||
handleNode(locationList, 'label', splitStr, function (node: any) {
|
||||
if (node.level != 5) {
|
||||
node.disabled = true;
|
||||
}
|
||||
});
|
||||
formApi.updateSchema([
|
||||
{
|
||||
componentProps: () => ({
|
||||
class: 'w-full',
|
||||
fieldNames: {
|
||||
key: 'id',
|
||||
label: 'label',
|
||||
value: 'code',
|
||||
children: 'children',
|
||||
},
|
||||
getPopupContainer,
|
||||
placeholder: '请选择会议室地址',
|
||||
showSearch: true,
|
||||
treeData: locationList,
|
||||
treeDefaultExpandAll: true,
|
||||
treeLine: {showLeafIcon: false},
|
||||
// 筛选的字段
|
||||
treeNodeFilterProp: 'label',
|
||||
// 选中后显示在输入框的值
|
||||
treeNodeLabelProp: 'fullName',
|
||||
}),
|
||||
fieldName: 'location',
|
||||
},
|
||||
]);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :title="title">
|
||||
<BasicForm />
|
||||
<BasicForm>
|
||||
<template #openHours="slotProps">
|
||||
<TimeRangePicker v-bind="slotProps" format="HH:mm"></TimeRangePicker>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
@@ -10,69 +10,70 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'name',
|
||||
label: '会议室名称',
|
||||
},
|
||||
{
|
||||
component: 'InputNumber',
|
||||
fieldName: 'personNumber',
|
||||
label: '可容纳人数',
|
||||
componentProps: {
|
||||
min: 1,
|
||||
step: 1,
|
||||
precision:0,
|
||||
}
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('meeting_room_status'),
|
||||
},
|
||||
fieldName: 'attach',
|
||||
fieldName: 'status',
|
||||
label: '状态',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'createById',
|
||||
label: '创建人id',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'updateById',
|
||||
label: '更新人id',
|
||||
},
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{type: 'checkbox', width: 60},
|
||||
{
|
||||
title: '会议室名称',
|
||||
field: 'name',
|
||||
minWidth:100,
|
||||
},
|
||||
{
|
||||
title: '会议室地址',
|
||||
field: 'location',
|
||||
field: 'locationName',
|
||||
width:210,
|
||||
},
|
||||
{
|
||||
title: '可容纳人数',
|
||||
field: 'personNumber',
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: '基础服务',
|
||||
field: 'baseServiceId',
|
||||
title: '费用模式',
|
||||
field: 'expenseType',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.expenseType, 'wy_fyms');
|
||||
},
|
||||
},
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: '基础价格',
|
||||
field: 'basePrice',
|
||||
title: '开放时段',
|
||||
field: 'openHours',
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'attach',
|
||||
field: 'status',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.attach, 'meeting_room_status');
|
||||
default: 'status'
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建人id',
|
||||
field: 'createById',
|
||||
},
|
||||
{
|
||||
title: '更新人id',
|
||||
field: 'updateById',
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: { default: 'action' },
|
||||
slots: {default: 'action'},
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
@@ -93,50 +94,96 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'name',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '会议室地址',
|
||||
fieldName: 'location',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
formItemClass: 'col-span-1',
|
||||
},
|
||||
{
|
||||
label: '可容纳人数',
|
||||
fieldName: 'personNumber',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '基础服务',
|
||||
fieldName: 'baseServiceId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '基础价格',
|
||||
fieldName: 'basePrice',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
fieldName: 'attach',
|
||||
component: 'Select',
|
||||
formItemClass: 'col-span-1',
|
||||
componentProps: {
|
||||
options: getDictOptions('meeting_room_status'),
|
||||
min: 1,
|
||||
step: 1,
|
||||
precision:0,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '会议室地址',
|
||||
fieldName: 'location',
|
||||
component: 'TreeSelect',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '创建人id',
|
||||
fieldName: 'createById',
|
||||
component: 'Input',
|
||||
label: '配套设备',
|
||||
fieldName: 'baseService',
|
||||
component: 'Textarea',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '更新人id',
|
||||
fieldName: 'updateById',
|
||||
component: 'Input',
|
||||
label: '负责人',
|
||||
fieldName: 'principals',
|
||||
component: 'Select',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '费用模式',
|
||||
fieldName: 'expenseType',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
buttonStyle: 'solid',
|
||||
options: getDictOptions('wy_fyms'),
|
||||
},
|
||||
formItemClass: 'col-span-1',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '付费金额',
|
||||
fieldName: 'basePrice',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min: 0,
|
||||
step: 1,
|
||||
precision:2,
|
||||
},
|
||||
formItemClass: 'col-span-1',
|
||||
dependencies: {
|
||||
// 仅当 费用模式 为 2(付费) 时显示
|
||||
show: (formValues: any) => formValues.expenseType === '2',
|
||||
triggerFields: ['expenseType'],
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '会议室图片',
|
||||
fieldName: 'picture',
|
||||
component: 'ImageUpload',
|
||||
componentProps: {
|
||||
maxCount: 10, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '预约是否需要审核',
|
||||
fieldName: 'isCheck',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
buttonStyle: 'solid',
|
||||
options: getDictOptions('wy_sf'),
|
||||
},
|
||||
labelWidth:130,
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '开放时段',
|
||||
fieldName: 'openHours',
|
||||
component: 'Input',
|
||||
slots: {default: 'openHours'},
|
||||
formItemClass: 'col-span-1',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '会议室描述',
|
||||
fieldName: 'descs',
|
||||
component: 'Textarea',
|
||||
},
|
||||
];
|
||||
|
@@ -13,9 +13,12 @@ import {
|
||||
meetRemove,
|
||||
} from '#/api/property/roomBooking/conferenceSettings';
|
||||
import type { MeetForm } from '#/api/property/roomBooking/conferenceSettings/model';
|
||||
import ConferenceSettingsModal from './conferenceSettings-modal.vue';
|
||||
import conferenceSettingsModal from './conferenceSettings-modal.vue';
|
||||
import ConferenceSettingsDetail from './conferenceSettings-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import {TableSwitch} from "#/components/table";
|
||||
import {meetUpdate} from '#/api/property/roomBooking/conferenceSettings';
|
||||
import {useAccess} from "@vben/access";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -62,8 +65,8 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [conferenceSettingsModal, modalApi] = useVbenModal({
|
||||
connectedComponent: ConferenceSettingsModal,
|
||||
const [ConferenceSettingsModal, modalApi] = useVbenModal({
|
||||
connectedComponent: conferenceSettingsModal,
|
||||
});
|
||||
|
||||
const [ConferenceSettingsDetailModal, ConferenceSettingsDetailApi] = useVbenModal({
|
||||
@@ -103,6 +106,8 @@ function handleMultiDelete() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const { hasAccessByCodes } = useAccess();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -156,8 +161,20 @@ function handleMultiDelete() {
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
<TableSwitch
|
||||
:checkedValue="0"
|
||||
:unCheckedValue="1"
|
||||
:checkedText="'启用'"
|
||||
:unCheckedText="'停用'"
|
||||
v-model:value="row.status"
|
||||
:api="() => meetUpdate(row)"
|
||||
:disabled=" !hasAccessByCodes(['system:meet:edit'])"
|
||||
@reload="() => tableApi.query()"
|
||||
/>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<conferenceSettingsModal @reload="tableApi.query()" />
|
||||
<ConferenceSettingsModal @reload="tableApi.query()" />
|
||||
<ConferenceSettingsDetailModal/>
|
||||
</Page>
|
||||
</template>
|
||||
|
@@ -29,6 +29,8 @@ export default defineConfig(async () => {
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
// mock代理目标地址
|
||||
target: 'http://192.168.43.169:8080',
|
||||
// target: 'http://192.168.0.108:8080',
|
||||
// target: 'http://192.168.0.106:8080',
|
||||
// target: 'http://47.109.37.87:3010',
|
||||
ws: true,
|
||||
},
|
||||
|
Reference in New Issue
Block a user