This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
import type { WorkOrdersTypeVO, WorkOrdersTypeForm, WorkOrdersTypeQuery } from './model';
|
import type { WorkOrdersTypeVO, WorkOrdersTypeForm, WorkOrdersTypeQuery } 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';
|
||||||
|
|
||||||
import { commonExport } from '#/api/helper';
|
import { commonExport } from '#/api/helper';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
@@ -35,7 +35,6 @@ export interface WorkOrdersTypeVO {
|
|||||||
* 是否支持转单(0支持,1不支持)
|
* 是否支持转单(0支持,1不支持)
|
||||||
*/
|
*/
|
||||||
isTransfers: number;
|
isTransfers: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WorkOrdersTypeForm extends BaseEntity {
|
export interface WorkOrdersTypeForm extends BaseEntity {
|
||||||
@@ -73,7 +72,6 @@ export interface WorkOrdersTypeForm extends BaseEntity {
|
|||||||
* 是否支持转单(0支持,1不支持)
|
* 是否支持转单(0支持,1不支持)
|
||||||
*/
|
*/
|
||||||
isTransfers?: number;
|
isTransfers?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WorkOrdersTypeQuery extends PageQuery {
|
export interface WorkOrdersTypeQuery extends PageQuery {
|
||||||
|
@@ -46,7 +46,7 @@ export function bookingAdd(data: BookingForm) {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function bookingUpdate(data: BookingForm) {
|
export function bookingUpdate(data: BookingForm) {
|
||||||
return requestClient.putWithMsg<void>('/system/booking', data);
|
return requestClient.putWithMsg<void>('/property/meetbooking', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
import {getDictOptions} from "#/utils/dict";
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
fieldName: 'orderTypeNo',
|
fieldName: 'orderTypeNo',
|
||||||
label: '类型编号',
|
label: '工单类型编号',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
@@ -16,6 +17,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_operation_pattern'),
|
||||||
},
|
},
|
||||||
fieldName: 'operationMode',
|
fieldName: 'operationMode',
|
||||||
label: '运作模式',
|
label: '运作模式',
|
||||||
@@ -25,7 +27,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
{
|
||||||
title: '类型编号',
|
title: '工单类型编号',
|
||||||
field: 'orderTypeNo',
|
field: 'orderTypeNo',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -35,6 +37,12 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
title: '运作模式',
|
title: '运作模式',
|
||||||
field: 'operationMode',
|
field: 'operationMode',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.operationMode, 'pro_operation_pattern');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '排序值',
|
title: '排序值',
|
||||||
@@ -47,6 +55,12 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
title: '是否支持转单',
|
title: '是否支持转单',
|
||||||
field: 'isTransfers',
|
field: 'isTransfers',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.isTransfers, 'support_transferring_orders');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
@@ -67,11 +81,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
triggerFields: [''],
|
triggerFields: [''],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '类型编号',
|
|
||||||
fieldName: 'orderTypeNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '类型名称',
|
label: '类型名称',
|
||||||
fieldName: 'orderTypeName',
|
fieldName: 'orderTypeName',
|
||||||
@@ -81,8 +90,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
label: '运作模式',
|
label: '运作模式',
|
||||||
fieldName: 'operationMode',
|
fieldName: 'operationMode',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
componentProps: {
|
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',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
@@ -90,15 +115,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
label: '排序值',
|
label: '排序值',
|
||||||
fieldName: 'sort',
|
fieldName: 'sort',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
rules: 'required',
|
||||||
{
|
|
||||||
label: '累计工单数量',
|
|
||||||
fieldName: 'number',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '是否支持转单',
|
|
||||||
fieldName: 'isTransfers',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -1,29 +1,24 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useVbenVxeGrid,
|
useVbenVxeGrid,
|
||||||
vxeCheckboxChecked,
|
vxeCheckboxChecked,
|
||||||
type VxeGridProps
|
type VxeGridProps
|
||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
workOrdersTypeExport,
|
|
||||||
workOrdersTypeList,
|
workOrdersTypeList,
|
||||||
workOrdersTypeRemove,
|
workOrdersTypeRemove,
|
||||||
} from '#/api/property/businessManagement/workOrdersType';
|
} from '#/api/property/businessManagement/workOrdersType';
|
||||||
import type { WorkOrdersTypeForm } from '#/api/property/businessManagement/workOrdersType/model';
|
import type { WorkOrdersTypeForm } from '#/api/property/businessManagement/workOrdersType/model';
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
|
||||||
|
|
||||||
import workOrdersTypeModal from './workOrdersType-modal.vue';
|
import workOrdersTypeModal from './workOrdersType-modal.vue';
|
||||||
|
import workOrdersTypeDetail from './workOrdersType-detail.vue';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
labelWidth: 80,
|
labelWidth: 90,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
@@ -68,6 +63,15 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
|||||||
gridOptions,
|
gridOptions,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const [workOrdersTypeDetailModal, workOrdersTypeDetailApi] = useVbenModal({
|
||||||
|
connectedComponent: workOrdersTypeDetail,
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleInfo(row: Required<WorkOrdersTypeForm>) {
|
||||||
|
workOrdersTypeDetailApi.setData({ id: row.id });
|
||||||
|
workOrdersTypeDetailApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
const [WorkOrdersTypeModal, modalApi] = useVbenModal({
|
const [WorkOrdersTypeModal, modalApi] = useVbenModal({
|
||||||
connectedComponent: workOrdersTypeModal,
|
connectedComponent: workOrdersTypeModal,
|
||||||
});
|
});
|
||||||
@@ -100,12 +104,6 @@ function handleMultiDelete() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDownloadExcel() {
|
|
||||||
commonDownloadExcel(workOrdersTypeExport, '工单类型管理数据', tableApi.formApi.form.values, {
|
|
||||||
fieldMappingTime: formOptions.fieldMappingTime,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -113,12 +111,6 @@ function handleDownloadExcel() {
|
|||||||
<BasicTable table-title="工单类型列表">
|
<BasicTable table-title="工单类型列表">
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<Space>
|
<Space>
|
||||||
<a-button
|
|
||||||
v-access:code="['property:workOrdersType:export']"
|
|
||||||
@click="handleDownloadExcel"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.export') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
<a-button
|
||||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
danger
|
danger
|
||||||
@@ -132,12 +124,17 @@ function handleDownloadExcel() {
|
|||||||
v-access:code="['property:workOrdersType:add']"
|
v-access:code="['property:workOrdersType:add']"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.add') }}
|
{{ '新增工单类型' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
|
<ghost-button
|
||||||
|
@click.stop="handleInfo(row)"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.info') }}
|
||||||
|
</ghost-button>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
v-access:code="['property:workOrdersType:edit']"
|
v-access:code="['property:workOrdersType:edit']"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
@@ -162,5 +159,6 @@ function handleDownloadExcel() {
|
|||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<WorkOrdersTypeModal @reload="tableApi.query()" />
|
<WorkOrdersTypeModal @reload="tableApi.query()" />
|
||||||
|
<workOrdersTypeDetailModal/>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</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">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { workOrdersTypeAdd, workOrdersTypeInfo, workOrdersTypeUpdate } from '#/api/property/businessManagement/workOrdersType';
|
import { workOrdersTypeAdd, workOrdersTypeInfo, workOrdersTypeUpdate } from '#/api/property/businessManagement/workOrdersType';
|
||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
|
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||||
});
|
});
|
||||||
@@ -21,9 +18,9 @@ const title = computed(() => {
|
|||||||
const [BasicForm, formApi] = useVbenForm({
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
// 默认占满两列
|
// 默认占满两列
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-1',
|
||||||
// 默认label宽度 px
|
// 默认label宽度 px
|
||||||
labelWidth: 80,
|
labelWidth: 120,
|
||||||
// 通用配置项 会影响到所有表单项
|
// 通用配置项 会影响到所有表单项
|
||||||
componentProps: {
|
componentProps: {
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
@@ -43,7 +40,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
|||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
// 在这里更改宽度
|
// 在这里更改宽度
|
||||||
class: 'w-[550px]',
|
class: 'w-[60%]',
|
||||||
fullscreenButton: false,
|
fullscreenButton: false,
|
||||||
onBeforeClose,
|
onBeforeClose,
|
||||||
onClosed: handleClosed,
|
onClosed: handleClosed,
|
||||||
@@ -59,6 +56,8 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
|
|
||||||
if (isUpdate.value && id) {
|
if (isUpdate.value && id) {
|
||||||
const record = await workOrdersTypeInfo(id);
|
const record = await workOrdersTypeInfo(id);
|
||||||
|
record.operationMode = record.operationMode?.toString();
|
||||||
|
record.isTransfers = record.isTransfers?.toString();
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
}
|
}
|
||||||
await markInitialized();
|
await markInitialized();
|
||||||
|
@@ -34,18 +34,18 @@ async function handleOpenChange(open: boolean) {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<BasicModal :footer="false" :fullscreen-button="false" title="会议室预约记录信息" class="w-[70%]">
|
<BasicModal :footer="false" :fullscreen-button="false" title="会议室预约记录信息" class="w-[70%]">
|
||||||
<Descriptions v-if="conferenceReservationRecordsDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
<Descriptions v-if="conferenceReservationRecordsDetail" size="small" :column="2" bordered :labelStyle="{width:'120px'}">
|
||||||
<DescriptionsItem label="会议室名称">
|
<DescriptionsItem label="会议室名称">
|
||||||
{{ conferenceReservationRecordsDetail.name}}
|
{{ conferenceReservationRecordsDetail.name}}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="会议室地址">
|
<DescriptionsItem label="会议室地址">
|
||||||
{{ conferenceReservationRecordsDetail.meetLocation }}
|
{{ conferenceReservationRecordsDetail.locationName }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="所属单位">
|
<DescriptionsItem label="所属单位">
|
||||||
{{ conferenceReservationRecordsDetail.unit }}
|
{{ conferenceReservationRecordsDetail.unitName }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="预定人">
|
<DescriptionsItem label="预定人">
|
||||||
{{ conferenceReservationRecordsDetail.person }}
|
{{ conferenceReservationRecordsDetail.personName }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="联系方式">
|
<DescriptionsItem label="联系方式">
|
||||||
{{ conferenceReservationRecordsDetail.phone }}
|
{{ conferenceReservationRecordsDetail.phone }}
|
||||||
|
@@ -40,12 +40,12 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '所属单位',
|
title: '所属单位',
|
||||||
field: 'unit',
|
field: 'unitName',
|
||||||
minWidth:'120'
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预定人',
|
title: '预定人',
|
||||||
field: 'person',
|
field: 'personName',
|
||||||
minWidth:'120'
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -53,12 +53,28 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'phone',
|
field: 'phone',
|
||||||
minWidth:'120'
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: '预定时间',
|
||||||
|
// field: 'scheduledStarttime',
|
||||||
|
// minWidth: '180',
|
||||||
|
// formatter: ({ row }) => {
|
||||||
|
// return `${row.scheduledStarttime} ~ ${row.scheduledEndtime}`;
|
||||||
|
// },
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: '预定时间',
|
title: '预定时间',
|
||||||
field: 'scheduledStarttime',
|
field: 'scheduledStarttime',
|
||||||
minWidth: '180',
|
minWidth: '180',
|
||||||
formatter: ({ row }) => {
|
formatter: ({ row }) => {
|
||||||
return `${row.scheduledStarttime} ~ ${row.scheduledEndtime}`;
|
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}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -103,7 +119,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '提交时间',
|
title: '提交时间',
|
||||||
field: 'updateTime',
|
field: 'createTime',
|
||||||
minWidth:'120'
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -8,6 +8,7 @@ import {
|
|||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
bookingList,
|
bookingList,
|
||||||
|
bookingUpdate,
|
||||||
} from '#/api/property/roomBooking/conferenceReservationRecords';
|
} from '#/api/property/roomBooking/conferenceReservationRecords';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
import conferenceReservationRecordsDetail
|
import conferenceReservationRecordsDetail
|
||||||
@@ -66,10 +67,14 @@ async function handleInfo(row: Required<BookingForm>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleExamine(row: Required<BookingForm>) {
|
async function handleExamine(row: Required<BookingForm>) {
|
||||||
|
row.state = 2
|
||||||
|
await bookingUpdate(row);
|
||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleUnsubscribe(row: Required<BookingForm>) {
|
async function handleUnsubscribe(row: Required<BookingForm>) {
|
||||||
|
row.state = 3
|
||||||
|
await bookingUpdate(row);
|
||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -87,8 +92,9 @@ async function handleUnsubscribe(row: Required<BookingForm>) {
|
|||||||
<Popconfirm
|
<Popconfirm
|
||||||
:get-popup-container="getVxePopupContainer"
|
:get-popup-container="getVxePopupContainer"
|
||||||
placement="left"
|
placement="left"
|
||||||
title="确认删除?"
|
title="确认通过?"
|
||||||
@confirm="handleExamine(row)"
|
@confirm="handleExamine(row)"
|
||||||
|
v-if="row.state === 0"
|
||||||
>
|
>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
@@ -99,8 +105,9 @@ async function handleUnsubscribe(row: Required<BookingForm>) {
|
|||||||
<Popconfirm
|
<Popconfirm
|
||||||
:get-popup-container="getVxePopupContainer"
|
:get-popup-container="getVxePopupContainer"
|
||||||
placement="left"
|
placement="left"
|
||||||
title="确认删除?"
|
title="确认退订?"
|
||||||
@confirm="handleUnsubscribe(row)"
|
@confirm="handleUnsubscribe(row)"
|
||||||
|
v-if="!(row.state === 2) && !(row.state === 3)"
|
||||||
>
|
>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
|
@@ -27,7 +27,8 @@ export default defineConfig(async () => {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: 'http://192.168.0.108:8080',
|
target: 'http://192.168.43.169:8080',
|
||||||
|
// target: 'http://192.168.0.108:8080',
|
||||||
// target: 'http://192.168.0.106:8080',
|
// target: 'http://192.168.0.106:8080',
|
||||||
// target: 'http://47.109.37.87:3010',
|
// target: 'http://47.109.37.87:3010',
|
||||||
ws: true,
|
ws: true,
|
||||||
|
Reference in New Issue
Block a user