From b1265fb00cdf80041a62aa582377bb0f3362b418 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Mon, 7 Jul 2025 17:30:51 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BC=9A=E8=AE=AE=E5=AE=A4=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roomBooking/conferenceSettings/index.ts | 12 +- .../roomBooking/conferenceSettings/model.d.ts | 138 +++++++++++++- .../orderManagement/data.ts | 36 ++-- .../orderManagement/order-detail.vue | 10 +- .../orderManagement/rentalOrder-modal.vue | 20 +- .../property/resident/unit/unit-modal.vue | 2 +- .../conferenceSettings-detail.vue | 44 +++-- .../conferenceSettings-modal.vue | 115 ++++++++++-- .../roomBooking/conferenceSettings/data.ts | 175 +++++++++++------- .../roomBooking/conferenceSettings/index.vue | 23 ++- 10 files changed, 430 insertions(+), 145 deletions(-) diff --git a/apps/web-antd/src/api/property/roomBooking/conferenceSettings/index.ts b/apps/web-antd/src/api/property/roomBooking/conferenceSettings/index.ts index 8c75d4e7..f2265a12 100644 --- a/apps/web-antd/src/api/property/roomBooking/conferenceSettings/index.ts +++ b/apps/web-antd/src/api/property/roomBooking/conferenceSettings/index.ts @@ -12,7 +12,7 @@ import { requestClient } from '#/api/request'; * @returns 会议室设置列表 */ export function meetList(params?: MeetQuery) { - return requestClient.get>('/system/meet/list', { params }); + return requestClient.get>('/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(`/system/meet/${id}`); + return requestClient.get(`/property/meet/${id}`); } /** @@ -39,7 +39,7 @@ export function meetInfo(id: ID) { * @returns void */ export function meetAdd(data: MeetForm) { - return requestClient.postWithMsg('/system/meet', data); + return requestClient.postWithMsg('/property/meet', data); } /** @@ -48,7 +48,7 @@ export function meetAdd(data: MeetForm) { * @returns void */ export function meetUpdate(data: MeetForm) { - return requestClient.putWithMsg('/system/meet', data); + return requestClient.putWithMsg('/property/meet', data); } /** @@ -57,5 +57,5 @@ export function meetUpdate(data: MeetForm) { * @returns void */ export function meetRemove(id: ID | IDS) { - return requestClient.deleteWithMsg(`/system/meet/${id}`); + return requestClient.deleteWithMsg(`/property/meet/${id}`); } 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 3fdd6073..7b0748ff 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 @@ -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; + /** * 容纳人数 */ @@ -207,4 +292,37 @@ export interface conferenceSettingsDetail extends BaseEntity { * 搜索值 */ searchValue: string; + + /** + * 负责人 + */ + principals: string; + /** + * 描述 + */ + descs: string; + /** + * 联系电话 + */ + phoneNo: string; + /** + * 是否审核 + */ + isCheck: string; + /** + * 开放时间 + */ + openHours: string; + /** + * 状态 + */ + status: string; + /** + *费用模式 + */ + expenseType: string; + /** + * 图片 + */ + picture: string; } diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts index 911dbb83..02d55171 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts @@ -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', diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue index a3175078..66314546 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/order-detail.vue @@ -74,11 +74,11 @@ async function handleOpenChange(open: boolean) { :is="renderDict(orderDetail.rentalType,'wy_zlfs')" /> - - - + + + + + { + 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) } diff --git a/apps/web-antd/src/views/property/resident/unit/unit-modal.vue b/apps/web-antd/src/views/property/resident/unit/unit-modal.vue index c3caed84..5c860d9c 100644 --- a/apps/web-antd/src/views/property/resident/unit/unit-modal.vue +++ b/apps/web-antd/src/views/property/resident/unit/unit-modal.vue @@ -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); diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-detail.vue b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-detail.vue index 3f4b8b97..fee0aeda 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-detail.vue +++ b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-detail.vue @@ -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); @@ -33,27 +34,46 @@ async function handleOpenChange(open: boolean) { diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-modal.vue b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-modal.vue index ca54db3f..42d4c3f2 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-modal.vue +++ b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/conferenceSettings-modal.vue @@ -1,16 +1,20 @@ diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts index cb8386d6..0733b20b 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts +++ b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts @@ -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', + }, ]; diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/index.vue b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/index.vue index a9545fd9..a1d35a82 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/index.vue +++ b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/index.vue @@ -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(); + - +