From 1d7fbf78b643f2d87d89bc43d425fb6f14c1357b Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Sat, 5 Jul 2025 17:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AE=AE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../conservationManagement/model.d.ts | 13 +- .../conferenceAddServices/model.d.ts | 8 +- .../roomBooking/conferenceSettings/model.d.ts | 53 ++- .../conservationManagement/data.ts | 28 +- .../orderMaintain-detail.vue | 6 +- .../orderMaintain-modal.vue | 43 +- .../conferenceAddServices-detail.vue | 10 +- .../conferenceAddServices-modal.vue | 2 + .../roomBooking/conferenceAddServices/data.ts | 12 +- .../conferenceReservations/index.vue | 88 ++++- .../conferenceSettings-detail.vue | 59 +++ ...modal.vue => conferenceSettings-modal.vue} | 0 .../roomBooking/conferenceSettings/index.vue | 24 +- .../roomBooking/conferenceView/data.ts | 369 ------------------ .../conferenceView/roomBooking-modal.vue | 101 ----- 15 files changed, 309 insertions(+), 507 deletions(-) create mode 100644 apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-detail.vue rename apps/web-antd/src/views/property/roomBooking/conferenceSettings/{meet-modal.vue => conferenceSettings-modal.vue} (100%) delete mode 100644 apps/web-antd/src/views/property/roomBooking/conferenceView/data.ts delete mode 100644 apps/web-antd/src/views/property/roomBooking/conferenceView/roomBooking-modal.vue diff --git a/apps/web-antd/src/api/property/conservationManagement/model.d.ts b/apps/web-antd/src/api/property/conservationManagement/model.d.ts index 78654253..ab48f755 100644 --- a/apps/web-antd/src/api/property/conservationManagement/model.d.ts +++ b/apps/web-antd/src/api/property/conservationManagement/model.d.ts @@ -34,7 +34,7 @@ export interface OrderMaintainVO { /** * 养护周期类型 */ - periodType: number; + periodType: string | number; /** * 养护周期频次 @@ -116,7 +116,7 @@ export interface OrderMaintainForm extends BaseEntity { /** * 养护周期类型 */ - periodType?: number; + periodType?: string | number; /** * 养护周期频次 @@ -193,7 +193,7 @@ export interface OrderMaintainQuery extends PageQuery { /** * 养护周期类型 */ - periodType?: number; + periodType?: string | number; /** * 养护周期频次 @@ -257,6 +257,11 @@ export interface conservationManagement extends BaseEntity { */ maintainName: string; + /** + * 服务地点 + */ + roomName:string; + /** * 小区id */ @@ -280,7 +285,7 @@ export interface conservationManagement extends BaseEntity { /** * 养护周期类型 */ - periodType: number; + periodType: string | number; /** * 养护周期频次 diff --git a/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/model.d.ts b/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/model.d.ts index 3ba035ac..6a31137a 100644 --- a/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/model.d.ts +++ b/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/model.d.ts @@ -34,7 +34,7 @@ export interface AttachVO { /** * 状态 */ - state: number; + state: string | number; /** * 创建时间 @@ -76,7 +76,7 @@ export interface AttachForm extends BaseEntity { /** * 状态 */ - state?: number; + state?: string | number; } @@ -109,7 +109,7 @@ export interface AttachQuery extends PageQuery { /** * 状态 */ - state?: number; + state?: string | number; /** * 日期范围参数 @@ -151,7 +151,7 @@ export interface conferenceAddServices extends BaseEntity { /** * 状态 */ - state: number; + state: string | number; /** * 创建时间 diff --git a/apps/web-antd/src/api/property/roomBooking/conferenceSettings/model.d.ts b/apps/web-antd/src/api/property/roomBooking/conferenceSettings/model.d.ts index 6829f8c5..3fdd6073 100644 --- a/apps/web-antd/src/api/property/roomBooking/conferenceSettings/model.d.ts +++ b/apps/web-antd/src/api/property/roomBooking/conferenceSettings/model.d.ts @@ -50,7 +50,6 @@ export interface MeetVO { * 搜索值 */ searchValue: string; - } export interface MeetForm extends BaseEntity { @@ -157,3 +156,55 @@ export interface MeetQuery extends PageQuery { */ params?: any; } + +export interface conferenceSettingsDetail extends BaseEntity { + /** + * 主键 + */ + id: string | number; + + /** + * 会议室名称 + */ + name: string; + + /** + * 位置 + */ + location: string; + + /** + * 容纳人数 + */ + personNumber: number; + + /** + * 基础服务 + */ + baseServiceId: string | number; + + /** + * 基础价格 + */ + basePrice: number; + + /** + * 增值服务是否启用 + */ + attach: number; + + /** + * 创建人id + */ + createById: string | number; + + /** + * 更新人id + */ + updateById: string | number; + + /** + * 搜索值 + */ + searchValue: string; +} diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/data.ts index 148bac10..a082af9d 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/data.ts +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/data.ts @@ -4,6 +4,7 @@ import { getDictOptions } from '#/utils/dict'; import { renderDict } from '#/utils/render'; import {h} from "vue"; import {Rate} from "ant-design-vue"; +import {rentalOrderList} from "#/api/property/rentalOrder"; export const querySchema: FormSchemaGetter = () => [ { @@ -38,11 +39,11 @@ export const columns: VxeGridProps['columns'] = [ field: 'maintainName', minWidth: '120' }, - { - title: '服务地点', - field: 'roomId', - minWidth: '120' - }, + // { + // title: '服务地点', + // field: 'roomName', + // minWidth: '120' + // }, { title: '服务类型', field: 'serveType', @@ -109,7 +110,7 @@ export const columns: VxeGridProps['columns'] = [ }); }, }, - minWidth: '120' + minWidth: '150' }, { title: '客户反馈', @@ -154,8 +155,9 @@ export const modalSchema: FormSchemaGetter = () => [ }, { label: '服务地点', - fieldName: 'communityId', - component: 'Input', + fieldName: 'roomId', + component: 'TreeSelect', + defaultValue: undefined, rules: 'required', labelWidth:100 }, @@ -190,7 +192,13 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '关联订单', fieldName: 'orderId', - component: 'Input', + component: 'ApiSelect', + componentProps: { + api: rentalOrderList, + resultField: 'rows', + labelField: 'orderNo', + valueField: 'id', + }, rules: 'required', labelWidth:100 }, @@ -231,7 +239,7 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '处理措施', fieldName: 'measure', - component: 'Input', + component: 'Textarea', rules: 'required', labelWidth:100 }, diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-detail.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-detail.vue index d3a07536..2d873459 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-detail.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-detail.vue @@ -34,15 +34,15 @@ async function handleOpenChange(open: boolean) { {{ conservationManagementDetail.maintainName }} - {{ conservationManagementDetail.roomId }} + {{ conservationManagementDetail.roomName }} - - {{ conservationManagementDetail.orderId }} + + 1{{ conservationManagementDetail.periodFrequency }}次 {{ conservationManagementDetail.orderId }} diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-modal.vue index db5ae183..d802baad 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-modal.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/conservationManagement/orderMaintain-modal.vue @@ -2,12 +2,12 @@ import { computed, ref } from 'vue'; import { useVbenModal } from '@vben/common-ui'; import { $t } from '@vben/locales'; -import { cloneDeep } from '@vben/utils'; +import { cloneDeep,handleNode,getPopupContainer } from '@vben/utils'; import { useVbenForm } from '#/adapter/form'; import { orderMaintainAdd, orderMaintainInfo, orderMaintainUpdate } from '#/api/property/conservationManagement'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { modalSchema } from './data'; - +import { communityTree } from '#/api/property/community'; const emit = defineEmits<{ reload: [] }>(); const isUpdate = ref(false); @@ -45,6 +45,7 @@ const [BasicModal, modalApi] = useVbenModal({ if (!isOpen) { return null; } + setupCommunitySelect() modalApi.modalLoading(true); const { id } = modalApi.getData() as { id?: number | string }; @@ -55,6 +56,7 @@ const [BasicModal, modalApi] = useVbenModal({ record.serveType = record.serveType?.toString(); record.state = record.state?.toString(); record.inspectResult = record.inspectResult?.toString(); + record.periodType = record.periodType?.toString(); await formApi.setValues(record); } await markInitialized(); @@ -86,6 +88,43 @@ async function handleClosed() { await formApi.resetForm(); resetInitialized(); } + +// 获取服务地址 +async function setupCommunitySelect() { + const areaList = await communityTree(5); + // 选中后显示在输入框的值 即父节点 / 子节点 + // addFullName(areaList, 'areaName', ' / '); + const splitStr = '/'; + handleNode(areaList, '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: areaList, + treeDefaultExpandAll: true, + treeLine: { showLeafIcon: false }, + // 筛选的字段 + treeNodeFilterProp: 'label', + // 选中后显示在输入框的值 + treeNodeLabelProp: 'fullName', + }), + fieldName: 'roomId', + }, + ]); +} - + + diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceView/data.ts b/apps/web-antd/src/views/property/roomBooking/conferenceView/data.ts deleted file mode 100644 index 8cc702fd..00000000 --- a/apps/web-antd/src/views/property/roomBooking/conferenceView/data.ts +++ /dev/null @@ -1,369 +0,0 @@ -import type { FormSchemaGetter } from '#/adapter/form'; -import type { VxeGridProps } from '#/adapter/vxe-table'; - -import { getDictOptions } from '#/utils/dict'; -import { renderDict } from '#/utils/render'; - -export const querySchema: FormSchemaGetter = () => [ - { - component: 'Input', - fieldName: 'tbConferenceId', - label: '会议室id', - }, - { - component: 'Select', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护 - options: getDictOptions('wy_yyzt'), - }, - fieldName: 'bookingStatus', - label: '预约状态', - }, - { - component: 'Select', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护 - options: getDictOptions('wy_shzt'), - }, - fieldName: 'reviewStatus', - label: '审核状态', - }, - { - component: 'Input', - fieldName: 'bookingName', - label: '会议预订人', - }, - { - component: 'Input', - fieldName: 'userUnit', - label: '使用单位', - }, - { - component: 'Input', - fieldName: 'conferenceTheme', - label: '会议主题', - }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'appointmentDate', - label: '预约日期', - }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'appointmentBeginTime', - label: '预约开始时段', - }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'appointmentEndTime', - label: '预约结束时段', - }, - { - component: 'Input', - fieldName: 'attendeesName', - label: '参会人员', - }, - { - component: 'Input', - fieldName: 'approverCount', - label: '参会人数', - }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'checkInStartTime', - label: '签到开始时间', - }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'checkInEndTime', - label: '签到结束时间', - }, - { - component: 'Input', - fieldName: 'evaluate', - label: '评价', - }, - { - component: 'Input', - fieldName: 'remark', - label: '备注', - }, - { - component: 'RadioGroup', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_SF 便于维护 - options: getDictOptions('wy_sf'), - buttonStyle: 'solid', - optionType: 'button', - }, - fieldName: 'addServices', - label: '是否需要增值服务', - }, -]; - -// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 -// export const columns: () => VxeGridProps['columns'] = () => [ -export const columns: VxeGridProps['columns'] = [ - { type: 'checkbox', width: 60 }, - { - title: '会议室id', - field: 'tbConferenceId', - }, - { - title: '预约状态', - field: 'bookingStatus', - slots: { - default: ({ row }) => { - // 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护 - return renderDict(row.bookingStatus, 'wy_yyzt'); - }, - }, - }, - { - title: '审核状态', - field: 'reviewStatus', - slots: { - default: ({ row }) => { - // 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护 - return renderDict(row.reviewStatus, 'wy_shzt'); - }, - }, - }, - { - title: '会议预订人', - field: 'bookingName', - }, - { - title: '使用单位', - field: 'userUnit', - }, - { - title: '会议主题', - field: 'conferenceTheme', - }, - { - title: '预约日期', - field: 'appointmentDate', - }, - { - title: '预约开始时段', - field: 'appointmentBeginTime', - }, - { - title: '预约结束时段', - field: 'appointmentEndTime', - }, - { - title: '参会人员', - field: 'attendeesName', - }, - { - title: '参会人数', - field: 'approverCount', - }, - { - title: '签到开始时间', - field: 'checkInStartTime', - }, - { - title: '签到结束时间', - field: 'checkInEndTime', - }, - { - title: '评价', - field: 'evaluate', - }, - { - title: '备注', - field: 'remark', - }, - { - title: '是否需要增值服务', - field: 'addServices', - slots: { - default: ({ row }) => { - // 可选从DictEnum中获取 DictEnum.WY_SF 便于维护 - return renderDict(row.addServices, '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: '会议室id', - fieldName: 'tbConferenceId', - component: 'Input', - rules: 'required', - }, - { - label: '预约状态', - fieldName: 'bookingStatus', - component: 'Select', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护 - options: getDictOptions('wy_yyzt'), - }, - rules: 'selectRequired', - }, - { - label: '审核状态', - fieldName: 'reviewStatus', - component: 'Select', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护 - options: getDictOptions('wy_shzt'), - }, - rules: 'selectRequired', - }, - { - label: '会议预订人', - fieldName: 'bookingName', - component: 'Input', - rules: 'required', - }, - { - label: '使用单位', - fieldName: 'userUnit', - component: 'Input', - rules: 'required', - }, - { - label: '会议主题', - fieldName: 'conferenceTheme', - component: 'Input', - rules: 'required', - }, - { - label: '预约日期', - fieldName: 'appointmentDate', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - rules: 'required', - }, - { - label: '预约开始时段', - fieldName: 'appointmentBeginTime', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - rules: 'required', - }, - { - label: '预约结束时段', - fieldName: 'appointmentEndTime', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - rules: 'required', - }, - { - label: '参会人员', - fieldName: 'attendeesName', - component: 'Input', - rules: 'required', - }, - { - label: '参会人数', - fieldName: 'approverCount', - component: 'Input', - rules: 'required', - }, - { - label: '签到开始时间', - fieldName: 'checkInStartTime', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - rules: 'required', - }, - { - label: '签到结束时间', - fieldName: 'checkInEndTime', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - rules: 'required', - }, - { - label: '评价', - fieldName: 'evaluate', - component: 'Input', - rules: 'required', - }, - { - label: '备注', - fieldName: 'remark', - component: 'Input', - rules: 'required', - }, - { - label: '是否需要增值服务', - fieldName: 'addServices', - component: 'RadioGroup', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_SF 便于维护 - options: getDictOptions('wy_sf'), - buttonStyle: 'solid', - optionType: 'button', - }, - rules: 'selectRequired', - }, -]; diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceView/roomBooking-modal.vue b/apps/web-antd/src/views/property/roomBooking/conferenceView/roomBooking-modal.vue deleted file mode 100644 index 0841d157..00000000 --- a/apps/web-antd/src/views/property/roomBooking/conferenceView/roomBooking-modal.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - -