This commit is contained in:
parent
b1265fb00c
commit
a3c0cbe2a5
@ -14,6 +14,9 @@ import { requestClient } from '#/api/request';
|
|||||||
export function attachList(params?: AttachQuery) {
|
export function attachList(params?: AttachQuery) {
|
||||||
return requestClient.get<PageResult<AttachVO>>('/property/attach/list', { params });
|
return requestClient.get<PageResult<AttachVO>>('/property/attach/list', { params });
|
||||||
}
|
}
|
||||||
|
export function attachListAll() {
|
||||||
|
return requestClient.get<PageResult<AttachVO>>('/property/attach/attachList', );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出会议室增值服务列表
|
* 导出会议室增值服务列表
|
||||||
|
@ -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 { ID, IDS } from '#/api/common';
|
||||||
import type { PageResult } from '#/api/common';
|
import type { PageResult } from '#/api/common';
|
||||||
@ -59,3 +59,7 @@ export function meetUpdate(data: MeetForm) {
|
|||||||
export function meetRemove(id: ID | IDS) {
|
export function meetRemove(id: ID | IDS) {
|
||||||
return requestClient.deleteWithMsg<void>(`/property/meet/${id}`);
|
return requestClient.deleteWithMsg<void>(`/property/meet/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function notlist(params?: MeetBo) {
|
||||||
|
return requestClient.get<PageResult<MeetVO>>('/property/meet/notlist', { params });
|
||||||
|
}
|
||||||
|
@ -268,6 +268,8 @@ export interface conferenceSettingsDetail extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
baseServiceId: string | number;
|
baseServiceId: string | number;
|
||||||
|
|
||||||
|
baseService: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础价格
|
* 基础价格
|
||||||
*/
|
*/
|
||||||
@ -297,6 +299,8 @@ export interface conferenceSettingsDetail extends BaseEntity {
|
|||||||
* 负责人
|
* 负责人
|
||||||
*/
|
*/
|
||||||
principals: string;
|
principals: string;
|
||||||
|
|
||||||
|
principalsName: string;
|
||||||
/**
|
/**
|
||||||
* 描述
|
* 描述
|
||||||
*/
|
*/
|
||||||
@ -326,3 +330,60 @@ export interface conferenceSettingsDetail extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
picture: 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,13 +1,25 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {onMounted, ref} from 'vue';
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import {cloneDeep} from '@vben/utils';
|
||||||
import { cloneDeep } from '@vben/utils';
|
import {useVbenForm} from '#/adapter/form';
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import {attachListAll} from '#/api/property/roomBooking/conferenceAddServices';
|
||||||
import { attachAdd, attachInfo, attachUpdate } from '#/api/property/roomBooking/conferenceAddServices';
|
import {meetInfo} from '#/api/property/roomBooking/conferenceSettings';
|
||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||||
import { modalSchema } from './data';
|
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 emit = defineEmits<{ reload: [] }>();
|
||||||
|
const conferenceSettingDetail = ref<conferenceSettingsDetail>()
|
||||||
|
const addServiceList = ref<AttachVO[]>([])
|
||||||
|
const totalAmount = ref<number>(0)
|
||||||
const [BasicForm, formApi] = useVbenForm({
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
// 默认占满两列
|
// 默认占满两列
|
||||||
@ -24,7 +36,7 @@ const [BasicForm, formApi] = useVbenForm({
|
|||||||
wrapperClass: 'grid-cols-2',
|
wrapperClass: 'grid-cols-2',
|
||||||
});
|
});
|
||||||
|
|
||||||
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
const {onBeforeClose, markInitialized, resetInitialized} = useBeforeCloseDiff(
|
||||||
{
|
{
|
||||||
initializedGetter: defaultFormValueGetter(formApi),
|
initializedGetter: defaultFormValueGetter(formApi),
|
||||||
currentGetter: defaultFormValueGetter(formApi),
|
currentGetter: defaultFormValueGetter(formApi),
|
||||||
@ -32,23 +44,48 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
class: 'w-[60%]',
|
class: 'w-[70%]',
|
||||||
fullscreenButton: false,
|
fullscreenButton: false,
|
||||||
onBeforeClose,
|
onBeforeClose,
|
||||||
onClosed: handleClosed,
|
onClosed: handleClosed,
|
||||||
onConfirm: handleConfirm,
|
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() {
|
async function handleConfirm() {
|
||||||
try {
|
try {
|
||||||
modalApi.lock(true);
|
modalApi.lock(true);
|
||||||
const { valid } = await formApi.validate();
|
const {valid} = await formApi.validate();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
await (attachAdd(data));
|
data.meetId=conferenceSettingDetail.value.id;
|
||||||
|
data.name=conferenceSettingDetail.value.name;
|
||||||
|
if (data.timeSpan && data.timeSpan.length) {
|
||||||
|
data.appointmentBeginTime = data.timeSpan[0]?.format("HH:mm");
|
||||||
|
data.appointmentEndTime = data.timeSpan[1]?.format("HH:mm");
|
||||||
|
}
|
||||||
|
if(data.attach=='0'){
|
||||||
|
data.meetAttachOrderBoList=addServiceList.value.filter(item=>item.quantity>0);
|
||||||
|
}
|
||||||
|
await (reservationAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
@ -65,38 +102,136 @@ async function handleClosed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleOpenChange() {
|
async function handleOpenChange() {
|
||||||
const { id } = modalApi.getData() as { id?: number };
|
const {id} = modalApi.getData() as { id?: number };
|
||||||
if(id){
|
if (id) {
|
||||||
const response = await attachInfo(id);
|
conferenceSettingDetail.value = await meetInfo(id);
|
||||||
conferenceReservationsDetail.value = response;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(()=>{
|
async function queryAddServices() {
|
||||||
handleOpenChange()
|
let params = {
|
||||||
})
|
pageSize: 1000,
|
||||||
|
pageNum: 1,
|
||||||
|
state: 1
|
||||||
|
}
|
||||||
|
const res = await attachListAll(params)
|
||||||
|
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
|
||||||
|
}),
|
||||||
|
fieldName: 'unit',
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
|
||||||
|
const filterOption = (input: string, option: any) => {
|
||||||
|
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
async function changeProjectNum() {
|
||||||
|
totalAmount.value = 0;
|
||||||
|
addServiceList.value.forEach(item => {
|
||||||
|
totalAmount.value += item.price * item.quantity
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<BasicModal title="会议室预约">
|
<BasicModal title="会议室预约">
|
||||||
<div class="detail-box">
|
<div class="detail-box" v-if="conferenceSettingDetail">
|
||||||
<div><span>会议室名称: 会议室01</span><span>容纳人数: 50</span></div>
|
<div>
|
||||||
<div><span>会议室地址: 5楼505</span><span>配套设备: 话筒、音响、大屏。。</span></div>
|
<span>会议室名称: {{ conferenceSettingDetail.name }}</span>
|
||||||
<div><span>会议室负责人: 王林</span><span>联系电话: 15809875678</span></div>
|
<span>容纳人数: {{ conferenceSettingDetail.personNumber }}</span>
|
||||||
<div><span>基础费用: 600元</span><span></span></div>
|
</div>
|
||||||
</div>
|
<div><span>会议室地址: {{ conferenceSettingDetail.locationName }}</span>
|
||||||
<BasicForm />
|
<span>配套设备: {{ conferenceSettingDetail.baseService }}</span>
|
||||||
<div>
|
</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>
|
</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"
|
||||||
|
bordered size="small" :show-header="false" :bordered="false">
|
||||||
|
<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>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.detail-box{
|
.detail-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
div{
|
div {
|
||||||
display: grid;
|
display: grid;
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
|
import type {VxeGridProps} from "#/adapter/vxe-table";
|
||||||
|
|
||||||
export const modalSchema: FormSchemaGetter = () => [
|
export const modalSchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
@ -12,57 +13,64 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '会议预定人',
|
label: '会议预定人',
|
||||||
fieldName: 'projectName',
|
fieldName: 'person',
|
||||||
component: 'Input',
|
component: 'ApiSelect',
|
||||||
rules: 'required',
|
rules: 'selectRequired',
|
||||||
|
formItemClass:'col-span-2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '使用单位',
|
label: '使用单位',
|
||||||
fieldName: 'price',
|
fieldName: 'unit',
|
||||||
component: 'Input',
|
component: 'ApiSelect',
|
||||||
rules: 'required',
|
rules: 'selectRequired',
|
||||||
|
formItemClass:'col-span-2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '会议主题',
|
label: '会议主题',
|
||||||
fieldName: 'price',
|
fieldName: 'meetTheme',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
formItemClass:'col-span-2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '预约日期',
|
label: '预约日期',
|
||||||
fieldName: 'visitingTimeRange',
|
fieldName: 'appointmentTime',
|
||||||
component: 'RangePicker',
|
component: 'DatePicker',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
showTime: {
|
showTime: true,
|
||||||
format: 'HH:mm:ss'
|
format: 'YYYY-MM-DD',
|
||||||
},
|
valueFormat: 'YYYY-MM-DD',
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
placeholder: ['开始时间', '结束时间']
|
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '参会人数',
|
label: '预约时段',
|
||||||
fieldName: 'price',
|
fieldName: 'timeSpan',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
slots:{
|
||||||
|
default: 'meetTheme'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '参会人员',
|
label: '参会人数',
|
||||||
fieldName: 'price',
|
fieldName: 'personSum',
|
||||||
component: 'Input',
|
component: 'InputNumber',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
componentProps:{
|
||||||
|
min:1,
|
||||||
|
precision:0,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
fieldName: 'price',
|
fieldName: 'remark',
|
||||||
component: 'Input',
|
component: 'Textarea',
|
||||||
rules: 'required',
|
formItemClass:'col-span-2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '是否需要增值服务',
|
label: '是否需要增值服务',
|
||||||
fieldName: 'bookingParkingSpace',
|
fieldName: 'attach',
|
||||||
component: 'RadioGroup',
|
component: 'RadioGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: [
|
options: [
|
||||||
@ -71,5 +79,40 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
rules: 'required',
|
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,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>请先填写以下信息,查询可用会议室</div>
|
<Alert message="请先填写以下信息,查询可用会议室" show-icon banner closable type="info"></Alert>
|
||||||
<a-form
|
<a-form
|
||||||
:model="formState"
|
:model="formState"
|
||||||
layout="inline"
|
layout="inline"
|
||||||
@ -9,81 +9,103 @@
|
|||||||
class="form-box"
|
class="form-box"
|
||||||
>
|
>
|
||||||
<a-form-item label="会议日期">
|
<a-form-item label="会议日期">
|
||||||
<a-date-picker
|
<DatePicker v-model:value="formState.appointmentTime" style="width: 200px;"/>
|
||||||
v-model:value="formState.username"
|
</a-form-item>
|
||||||
show-time
|
<a-form-item label="会议时段">
|
||||||
format="YYYY-MM-DD HH:mm:ss"
|
<TimeRangePicker style="width: 200px;" format="HH:mm"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
v-model:value="formState.openHours"></TimeRangePicker>
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 330px; margin-right: 50px"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="参会人数" style="width: 400px;">
|
<a-form-item label="参会人数" style="width: 400px;">
|
||||||
<a-input placeholder="请输入" v-model:value="formState.username"/>
|
<InputNumber style="width: 200px;" placeholder="请输入参会人数"
|
||||||
|
v-model:value="formState.personNumber"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="form-button">
|
<a-form-item class="form-button">
|
||||||
<a-button @click="handleClean">重置</a-button>
|
<a-button @click="handleClean">重置</a-button>
|
||||||
<a-button type="primary" class="primary-button" @click="handleSearch">搜索</a-button>
|
<a-button type="primary" class="primary-button" @click="handleSearch">搜索</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<div class="card-box">
|
<div v-if="meetingList?.length" class="card-box">
|
||||||
<div v-for="(item,index) in meetingList" :key="index" class="card-list">
|
<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" @click="handleAdd(item.id)">去预约</a-button></div>
|
<div><span class="card-title">{{ item.name }}</span>
|
||||||
<div>容纳人数: {{ item.two }}人</div>
|
<a-button class="card-button" type="primary" @click="handleAdd(item.id)">去预约</a-button>
|
||||||
<div>基础费用: {{ item.three }}元</div>
|
</div>
|
||||||
<div>基础设备: {{ item.four }}</div>
|
<div>容纳人数: {{ item.personNumber }}人</div>
|
||||||
<div>基础服务: {{ item.five }}</div>
|
<div>基础费用: {{
|
||||||
|
item.expenseType == '2' ? (item.basePrice+"元") : renderDictValue(item.expenseType, 'wy_fyms')
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div>开放时段: {{ item.openHours }}</div>
|
||||||
|
<div>配套设备: {{ item.baseService }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else style="text-align: center;margin-top: 20%">
|
||||||
|
<Empty :image="simpleImage"/>
|
||||||
|
</div>
|
||||||
<modal/>
|
<modal/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import {ref} from 'vue'
|
||||||
import { reactive } from 'vue';
|
import {reactive} from 'vue';
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
import {
|
import {
|
||||||
Form as AForm,
|
Form as AForm,
|
||||||
FormItem as AFormItem,
|
FormItem as AFormItem,
|
||||||
Input as AInput,
|
|
||||||
Button as AButton,
|
Button as AButton,
|
||||||
DatePicker as ADatePicker,
|
TimeRangePicker,
|
||||||
RangePicker as ARangePicker
|
InputNumber,
|
||||||
|
Empty,
|
||||||
|
Alert,
|
||||||
|
DatePicker
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
import conferenceAddServicesModal from '../conferenceReservations/conferenceReservations-modal.vue';
|
import conferenceAddServicesModal from '../conferenceReservations/conferenceReservations-modal.vue';
|
||||||
import {attachInfo} from "#/api/property/roomBooking/conferenceAddServices";
|
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 {
|
interface FormState {
|
||||||
username: string;
|
openHours?: any[];
|
||||||
password: string;
|
personNumber?: number|undefined;
|
||||||
|
appointmentTime?:Dayjs|undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const formState = reactive<FormState>({
|
const formState = reactive<FormState>({
|
||||||
username: '',
|
openHours: [],
|
||||||
password: '',
|
personNumber: undefined,
|
||||||
|
appointmentTime:undefined
|
||||||
});
|
});
|
||||||
|
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
|
||||||
|
|
||||||
async function handleSearch() {
|
async function handleSearch() {
|
||||||
const obj = {
|
let hours = '';
|
||||||
...formState,
|
if (formState.openHours && formState.openHours.length) {
|
||||||
|
hours = formState.openHours[0]?.format("HH:mm") + '-' + formState.openHours[1]?.format("HH:mm");
|
||||||
}
|
}
|
||||||
const response = await attachInfo(obj);
|
const obj = {
|
||||||
meetingList.value = response.rows;
|
openHours: hours??undefined,
|
||||||
|
personNumber: formState.personNumber,
|
||||||
|
appointmentTime:formState.appointmentTime?formState.appointmentTime.format('YYYY-MM-DD'):undefined
|
||||||
|
}
|
||||||
|
meetingList.value =await notlist(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClean = () =>{
|
const handleClean = () => {
|
||||||
formState.username = '';
|
formState.openHours = [];
|
||||||
formState.password = '';
|
formState.personNumber = null;
|
||||||
|
formState.appointmentTime = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const [modal, modalApi] = useVbenModal({
|
const [modal, modalApi] = useVbenModal({
|
||||||
connectedComponent: conferenceAddServicesModal,
|
connectedComponent: conferenceAddServicesModal,
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleAdd() {
|
function handleAdd(id:string) {
|
||||||
modalApi.setData({id: row.id});
|
modalApi.setData({id});
|
||||||
modalApi.open();
|
modalApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
const onFinish = (values: any) => {
|
const onFinish = (values: any) => {
|
||||||
console.log('Success:', values);
|
console.log('Success:', values);
|
||||||
};
|
};
|
||||||
@ -91,54 +113,26 @@ const onFinishFailed = (errorInfo: any) => {
|
|||||||
console.log('Failed:', errorInfo);
|
console.log('Failed:', errorInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
const meetingList = ref([
|
const meetingList = ref<MeetVO[]>([])
|
||||||
{
|
|
||||||
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.form-box{
|
.form-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 30px 30px 0 30px;
|
padding: 10px 30px 0 30px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.form-button{
|
.form-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
|
|
||||||
.primary-button{
|
.primary-button {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.card-box{
|
|
||||||
|
.card-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
@ -147,25 +141,26 @@ const meetingList = ref([
|
|||||||
gap: 30px;
|
gap: 30px;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
.card-list{
|
.card-list {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.card-title{
|
.card-title {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
div{
|
|
||||||
|
div {
|
||||||
margin: 0.5vw 0;
|
margin: 0.5vw 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
|
|
||||||
.card-button{
|
.card-button {
|
||||||
right: 15px;
|
right: 15px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,7 @@ async function handleOpenChange(open: boolean) {
|
|||||||
}
|
}
|
||||||
modalApi.modalLoading(true);
|
modalApi.modalLoading(true);
|
||||||
const {id} = modalApi.getData() as { id: number | string };
|
const {id} = modalApi.getData() as { id: number | string };
|
||||||
const response = await meetInfo(id);
|
conferenceSettingsDetail.value =await meetInfo(id);
|
||||||
conferenceSettingsDetail.value = response;
|
|
||||||
modalApi.modalLoading(false);
|
modalApi.modalLoading(false);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -50,9 +49,9 @@ async function handleOpenChange(open: boolean) {
|
|||||||
{{ conferenceSettingsDetail.baseService }}
|
{{ conferenceSettingsDetail.baseService }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="负责人" :span="2">
|
<DescriptionsItem label="负责人" :span="2">
|
||||||
{{ conferenceSettingsDetail.principals }}
|
{{ conferenceSettingsDetail.principalsName+'-'+conferenceSettingsDetail.phoneNo }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="费用模式">
|
<DescriptionsItem label="费用模式" :span="conferenceSettingsDetail.expenseType=='2'?1:2">
|
||||||
<component
|
<component
|
||||||
:is="renderDict(conferenceSettingsDetail.expenseType,'wy_fyms')"
|
:is="renderDict(conferenceSettingsDetail.expenseType,'wy_fyms')"
|
||||||
/>
|
/>
|
||||||
|
@ -165,6 +165,8 @@ const { hasAccessByCodes } = useAccess();
|
|||||||
<TableSwitch
|
<TableSwitch
|
||||||
:checkedValue="0"
|
:checkedValue="0"
|
||||||
:unCheckedValue="1"
|
:unCheckedValue="1"
|
||||||
|
:checkedText="'启用'"
|
||||||
|
:unCheckedText="'停用'"
|
||||||
v-model:value="row.status"
|
v-model:value="row.status"
|
||||||
:api="() => meetUpdate(row)"
|
:api="() => meetUpdate(row)"
|
||||||
:disabled=" !hasAccessByCodes(['system:meet:edit'])"
|
:disabled=" !hasAccessByCodes(['system:meet:edit'])"
|
||||||
|
Loading…
Reference in New Issue
Block a user