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