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