From 19f8c57e23ba542f7d32e52f18fbf2d7ead264f0 Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Mon, 30 Jun 2025 17:58:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E5=AE=A2=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/property/visitorManagement/index.ts | 3 +- .../api/property/visitorManagement/model.d.ts | 75 ++++++- .../chargeManagement/data.ts | 86 ++------ .../chargeManagement/orderCharge-modal.vue | 6 +- .../property/visitorManagement/index.vue | 172 --------------- .../{ => visitorInvitation}/data.ts | 203 +++++++----------- .../visitorInvitation/index.vue | 104 +++++++++ .../visitorInvitation-detail.vue | 77 +++++++ .../visitorInvitation-modal.vue} | 12 +- .../visitorManagement/visitorTodo/data.ts | 131 +++++++++++ .../visitorTodo/visitorTodo-detail.vue | 77 +++++++ apps/web-antd/vite.config.mts | 4 +- 12 files changed, 570 insertions(+), 380 deletions(-) delete mode 100644 apps/web-antd/src/views/property/visitorManagement/index.vue rename apps/web-antd/src/views/property/visitorManagement/{ => visitorInvitation}/data.ts (57%) create mode 100644 apps/web-antd/src/views/property/visitorManagement/visitorInvitation/index.vue create mode 100644 apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-detail.vue rename apps/web-antd/src/views/property/visitorManagement/{visitorManagement-modal.vue => visitorInvitation/visitorInvitation-modal.vue} (89%) create mode 100644 apps/web-antd/src/views/property/visitorManagement/visitorTodo/data.ts create mode 100644 apps/web-antd/src/views/property/visitorManagement/visitorTodo/visitorTodo-detail.vue diff --git a/apps/web-antd/src/api/property/visitorManagement/index.ts b/apps/web-antd/src/api/property/visitorManagement/index.ts index eeac0d15..fec00e88 100644 --- a/apps/web-antd/src/api/property/visitorManagement/index.ts +++ b/apps/web-antd/src/api/property/visitorManagement/index.ts @@ -1,8 +1,6 @@ import type { VisitorManagementVO, VisitorManagementForm, VisitorManagementQuery } 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'; @@ -59,3 +57,4 @@ export function visitorManagementUpdate(data: VisitorManagementForm) { export function visitorManagementRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/property/visitorManagement/${id}`); } + diff --git a/apps/web-antd/src/api/property/visitorManagement/model.d.ts b/apps/web-antd/src/api/property/visitorManagement/model.d.ts index 673a8f46..eec10054 100644 --- a/apps/web-antd/src/api/property/visitorManagement/model.d.ts +++ b/apps/web-antd/src/api/property/visitorManagement/model.d.ts @@ -70,7 +70,6 @@ export interface VisitorManagementVO { * 预约状态(0:待确认,1:已确认,2:已取消,3:已完成) */ serveStatus: number; - } export interface VisitorManagementForm extends BaseEntity { @@ -143,7 +142,6 @@ export interface VisitorManagementForm extends BaseEntity { * 预约状态(0:待确认,1:已确认,2:已取消,3:已完成) */ serveStatus?: number; - } export interface VisitorManagementQuery extends PageQuery { @@ -217,3 +215,76 @@ export interface VisitorManagementQuery extends PageQuery { */ params?: any; } + +export interface VisitorManagementDetail extends BaseEntity { + /** + * id + */ + id?: string | number; + + /** + * 访客姓名 + */ + visitorName?: string; + + /** + * 所属公司 + */ + visitorUnit?: string; + + /** + * 访客电话 + */ + visitorPhone?: string; + + /** + * 拜访事由 + */ + visitingReason?: string; + + /** + * 被访人 + */ + interviewedPerson?: string; + + /** + * 被访单位 + */ + interviewedUnit?: string; + + /** + * 被访人联系方式 + */ + interviewedPhone?: string; + + /** + * 拜访开始时间 + */ + visitingBeginTime?: string; + + /** + * 拜访结束时间 + */ + visitingEndTime?: string; + + /** + * 预约车位(0:预约,1:不预约) + */ + bookingParkingSpace?: number; + + /** + * 车牌号 + */ + licensePlate?: string; + + /** + * 人脸图片 + */ + facePictures?: string; + + /** + * 预约状态(0:待确认,1:已确认,2:已取消,3:已完成) + */ + serveStatus?: number; +} + diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts index 6df90566..47ed6132 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts @@ -7,37 +7,25 @@ export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'orderId', - label: '订单id', + label: '订单号', }, { component: 'Input', fieldName: 'userId', label: '租赁人id', }, + { + component: 'Select', + componentProps: { + options: getDictOptions('pro_invoice_status'), + }, + fieldName: 'invoiceStatus', + label: '开票状态', + }, { component: 'Input', fieldName: 'userName', - label: '租赁人名称', - }, - { - component: 'Input', - fieldName: 'rent', - label: '租金', - }, - { - component: 'Input', - fieldName: 'deposit', - label: '押金', - }, - { - component: 'Input', - fieldName: 'penalty', - label: '违约金', - }, - { - component: 'Input', - fieldName: 'totalAmount', - label: '总金额', + label: '租赁人', }, { component: 'DatePicker', @@ -57,19 +45,6 @@ export const querySchema: FormSchemaGetter = () => [ fieldName: 'paymentMethod', label: '支付方式', }, - { - component: 'Select', - componentProps: { - options: getDictOptions('pro_invoice_status'), - }, - fieldName: 'invoiceStatus', - label: '开票状态', - }, - { - component: 'Input', - fieldName: 'invoiceType', - label: '发票类型', - }, { component: 'Select', componentProps: { @@ -83,11 +58,16 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: '主键', + title: '序号', field: 'id', + slots: { + default: ({ rowIndex }) => { + return (rowIndex + 1).toString(); + }, + }, }, { - title: '订单id', + title: '订单号', field: 'orderId', }, { @@ -95,7 +75,7 @@ export const columns: VxeGridProps['columns'] = [ field: 'userId', }, { - title: '租赁人名称', + title: '租赁人', field: 'userName', }, { @@ -169,7 +149,7 @@ export const modalSchema: FormSchemaGetter = () => [ }, }, { - label: '订单id', + label: '订单号', fieldName: 'orderId', component: 'Input', rules: 'required', @@ -181,7 +161,7 @@ export const modalSchema: FormSchemaGetter = () => [ rules: 'required', }, { - label: '租赁人名称', + label: '租赁人', fieldName: 'userName', component: 'Input', rules: 'required', @@ -204,32 +184,6 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, - { - label: '总金额', - fieldName: 'totalAmount', - component: 'Input', - rules: 'required', - }, - { - label: '收费日期', - fieldName: 'chargeDate', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - rules: 'required', - }, - { - label: '支付方式', - fieldName: 'paymentMethod', - component: 'Select', - componentProps: { - options: getDictOptions('pro_payment_method'), - }, - rules: 'selectRequired', - }, { label: '开票状态', fieldName: 'invoiceStatus', diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue index 786e7715..4099e78e 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue @@ -12,12 +12,12 @@ const emit = defineEmits<{ reload: [] }>(); const isUpdate = ref(false); const title = computed(() => { - return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add'); + return isUpdate.value ? $t('pages.common.edit') : '添加收费'; }); const [BasicForm, formApi] = useVbenForm({ commonConfig: { - formItemClass: 'col-span-2', + formItemClass: 'col-span-1', labelWidth: 80, componentProps: { class: 'w-full', @@ -36,7 +36,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( ); const [BasicModal, modalApi] = useVbenModal({ - class: 'w-[550px]', + class: 'w-[60%]', fullscreenButton: false, onBeforeClose, onClosed: handleClosed, diff --git a/apps/web-antd/src/views/property/visitorManagement/index.vue b/apps/web-antd/src/views/property/visitorManagement/index.vue deleted file mode 100644 index 62f25010..00000000 --- a/apps/web-antd/src/views/property/visitorManagement/index.vue +++ /dev/null @@ -1,172 +0,0 @@ - - - diff --git a/apps/web-antd/src/views/property/visitorManagement/data.ts b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/data.ts similarity index 57% rename from apps/web-antd/src/views/property/visitorManagement/data.ts rename to apps/web-antd/src/views/property/visitorManagement/visitorInvitation/data.ts index 56ff8245..03c07098 100644 --- a/apps/web-antd/src/views/property/visitorManagement/data.ts +++ b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/data.ts @@ -1,6 +1,5 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; - import { getDictOptions } from '#/utils/dict'; import { renderDict } from '#/utils/render'; @@ -10,35 +9,23 @@ export const querySchema: FormSchemaGetter = () => [ fieldName: 'visitorName', label: '访客姓名', }, - { - component: 'Input', - fieldName: 'visitorUnit', - label: '所属公司', - }, - { - component: 'Input', - fieldName: 'visitorPhone', - label: '访客电话', - }, - { - component: 'Input', - fieldName: 'visitingReason', - label: '拜访事由', - }, { component: 'Input', fieldName: 'interviewedPerson', - label: '被访人', + label: '邀约人', }, { component: 'Input', fieldName: 'interviewedUnit', - label: '被访单位', + label: '邀约单位', }, { - component: 'Input', - fieldName: 'interviewedPhone', - label: '被访人联系方式', + component: 'Select', + componentProps: { + options: getDictOptions('wy_appointment_tatus'), + }, + fieldName: 'serveStatus', + label: '预约状态', }, { component: 'DatePicker', @@ -48,7 +35,7 @@ export const querySchema: FormSchemaGetter = () => [ valueFormat: 'YYYY-MM-DD HH:mm:ss', }, fieldName: 'visitingBeginTime', - label: '拜访开始时间', + label: '拜访时间', }, { component: 'DatePicker', @@ -57,103 +44,83 @@ export const querySchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, - fieldName: 'visitingEndTime', - label: '拜访结束时间', - }, - { - component: 'Input', - fieldName: 'bookingParkingSpace', - label: '预约车位', - }, - { - component: 'Input', - fieldName: 'licensePlate', - label: '车牌号', - }, - { - component: 'Input', - fieldName: 'facePictures', - label: '人脸图片', - }, - { - component: 'RadioGroup', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_APPOINTMENT_TATUS 便于维护 - options: getDictOptions('wy_appointment_tatus'), - buttonStyle: 'solid', - optionType: 'button', - }, - fieldName: 'serveStatus', - label: '预约状态', + fieldName: 'createTime', + label: '提交时间', }, ]; -// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 -// export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: 'id', + title: '序号', field: 'id', + slots: { + default: ({ rowIndex }) => { + return (rowIndex + 1).toString(); + }, + }, }, { title: '访客姓名', field: 'visitorName', }, + { + title: '访客电话', + field: 'visitorPhone', + }, { title: '所属公司', field: 'visitorUnit', }, { - title: '访客电话', - field: 'visitorPhone', + title: '邀约人', + field: 'interviewedPerson', + }, + { + title: '联系电话', + field: 'interviewedPhone', + }, + { + title: '邀约单位', + field: 'interviewedUnit', }, { title: '拜访事由', field: 'visitingReason', }, { - title: '被访人', - field: 'interviewedPerson', + title: '拜访时间', + field: 'visitingTimeRange', + slots: { + default: ({ row }) => { + const beginTime = row.visitingBeginTime || ''; + const endTime = row.visitingEndTime || ''; + return `${beginTime} - ${endTime}`; + }, + }, }, { - title: '被访单位', - field: 'interviewedUnit', - }, - { - title: '被访人联系方式', - field: 'interviewedPhone', - }, - { - title: '拜访开始时间', - field: 'visitingBeginTime', - }, - { - title: '拜访结束时间', - field: 'visitingEndTime', - }, - { - title: '预约车位', + title: '是否预约车位', field: 'bookingParkingSpace', - }, - { - title: '车牌号', - field: 'licensePlate', - }, - { - title: '人脸图片', - field: 'facePictures', + slots: { + default: ({ row }) => { + return renderDict(row.bookingParkingSpace, 'wy_parking_spot'); + }, + }, }, { title: '预约状态', field: 'serveStatus', slots: { default: ({ row }) => { - // 可选从DictEnum中获取 DictEnum.WY_APPOINTMENT_TATUS 便于维护 return renderDict(row.serveStatus, 'wy_appointment_tatus'); }, }, }, + { + title: '提交时间', + field: 'createTime', + }, { field: 'action', fixed: 'right', @@ -179,12 +146,6 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', rules: 'required', }, - { - label: '所属公司', - fieldName: 'visitorUnit', - component: 'Input', - rules: 'required', - }, { label: '访客电话', fieldName: 'visitorPhone', @@ -192,8 +153,8 @@ export const modalSchema: FormSchemaGetter = () => [ rules: 'required', }, { - label: '拜访事由', - fieldName: 'visitingReason', + label: '所属公司', + fieldName: 'visitorUnit', component: 'Input', rules: 'required', }, @@ -204,17 +165,19 @@ export const modalSchema: FormSchemaGetter = () => [ rules: 'required', }, { - label: '被访单位', - fieldName: 'interviewedUnit', - component: 'Input', - }, - { - label: '被访人联系方式', + label: '联系电话', fieldName: 'interviewedPhone', component: 'Input', + rules: 'required', }, { - label: '拜访开始时间', + label: '拜访事由', + fieldName: 'visitingReason', + component: 'Input', + rules: 'required', + }, + { + label: '拜访时间', fieldName: 'visitingBeginTime', component: 'DatePicker', componentProps: { @@ -222,43 +185,33 @@ export const modalSchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, - }, - { - label: '拜访结束时间', - fieldName: 'visitingEndTime', - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, + rules: 'required', }, { label: '预约车位', fieldName: 'bookingParkingSpace', - component: 'Input', + component: 'RadioGroup', + componentProps: { + options: [ + { label: '否', value: '1' }, + { label: '是', value: '0' }, + ], + }, rules: 'required', }, { label: '车牌号', fieldName: 'licensePlate', component: 'Input', - }, - { - label: '人脸图片', - fieldName: 'facePictures', - component: 'Input', rules: 'required', }, - { - label: '预约状态', - fieldName: 'serveStatus', - component: 'RadioGroup', - componentProps: { - // 可选从DictEnum中获取 DictEnum.WY_APPOINTMENT_TATUS 便于维护 - options: getDictOptions('wy_appointment_tatus'), - buttonStyle: 'solid', - optionType: 'button', - }, - }, + // { + // label: '人脸图片', + // fieldName: 'facePictures', + // component: 'ImageUpload', + // componentProps: { + // maxCount: 1, + // }, + // formItemClass: 'col-span-2', + // }, ]; diff --git a/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/index.vue b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/index.vue new file mode 100644 index 00000000..fc08c046 --- /dev/null +++ b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/index.vue @@ -0,0 +1,104 @@ + + + diff --git a/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-detail.vue b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-detail.vue new file mode 100644 index 00000000..1cc49f0a --- /dev/null +++ b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-detail.vue @@ -0,0 +1,77 @@ + + + diff --git a/apps/web-antd/src/views/property/visitorManagement/visitorManagement-modal.vue b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-modal.vue similarity index 89% rename from apps/web-antd/src/views/property/visitorManagement/visitorManagement-modal.vue rename to apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-modal.vue index b1fa89ce..03cf553b 100644 --- a/apps/web-antd/src/views/property/visitorManagement/visitorManagement-modal.vue +++ b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-modal.vue @@ -1,8 +1,7 @@ diff --git a/apps/web-antd/src/views/property/visitorManagement/visitorTodo/data.ts b/apps/web-antd/src/views/property/visitorManagement/visitorTodo/data.ts new file mode 100644 index 00000000..0afe6203 --- /dev/null +++ b/apps/web-antd/src/views/property/visitorManagement/visitorTodo/data.ts @@ -0,0 +1,131 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; +import { getDictOptions } from '#/utils/dict'; +import { renderDict } from '#/utils/render'; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'visitorName', + label: '访客姓名', + }, + { + component: 'Input', + fieldName: 'interviewedPerson', + label: '被访人', + }, + { + component: 'Input', + fieldName: 'interviewedUnit', + label: '被访单位', + }, + { + component: 'Select', + componentProps: { + options: getDictOptions('wy_appointment_tatus'), + }, + fieldName: 'serveStatus', + label: '预约状态', + }, + { + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + fieldName: 'visitingBeginTime', + label: '拜访时间', + }, + { + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + fieldName: 'createTime', + label: '提交时间', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '序号', + field: 'id', + slots: { + default: ({ rowIndex }) => { + return (rowIndex + 1).toString(); + }, + }, + }, + { + title: '访客姓名', + field: 'visitorName', + }, + { + title: '访客电话', + field: 'visitorPhone', + }, + { + title: '所属公司', + field: 'visitorUnit', + }, + { + title: '被访人', + field: 'interviewedPerson', + }, + { + title: '联系电话', + field: 'interviewedPhone', + }, + { + title: '被访单位', + field: 'interviewedUnit', + }, + { + title: '拜访事由', + field: 'visitingReason', + }, + { + title: '拜访时间', + field: 'visitingTimeRange', + slots: { + default: ({ row }) => { + const beginTime = row.visitingBeginTime || ''; + const endTime = row.visitingEndTime || ''; + return `${beginTime} - ${endTime}`; + }, + }, + }, + { + title: '是否预约车位', + field: 'bookingParkingSpace', + slots: { + default: ({ row }) => { + return renderDict(row.bookingParkingSpace, 'wy_parking_spot'); + }, + }, + }, + { + title: '预约状态', + field: 'serveStatus', + slots: { + default: ({ row }) => { + return renderDict(row.serveStatus, 'wy_appointment_tatus'); + }, + }, + }, + { + title: '提交时间', + field: 'createTime', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; diff --git a/apps/web-antd/src/views/property/visitorManagement/visitorTodo/visitorTodo-detail.vue b/apps/web-antd/src/views/property/visitorManagement/visitorTodo/visitorTodo-detail.vue new file mode 100644 index 00000000..1cc49f0a --- /dev/null +++ b/apps/web-antd/src/views/property/visitorManagement/visitorTodo/visitorTodo-detail.vue @@ -0,0 +1,77 @@ + + + diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index 1e37cb9a..77d61004 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -28,8 +28,8 @@ export default defineConfig(async () => { rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 // target: 'http://by.missmoc.top:3010/', - target: 'http://127.0.0.1:8080/', - // target: 'http://47.109.37.87:3010', + // target: 'http://192.168.0.103:8080', + target: 'http://47.109.37.87:3010', ws: true, }, },