From 482d4b91993aad77cdbf2e2c05f4fd79e073a19e Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 9 Jul 2025 15:03:17 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E5=8D=95=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workOrdersType/index.ts | 61 ++++++ .../workOrdersType/model.d.ts | 114 +++++++++++ .../businessManagement/workOrders/data.ts | 177 +++++++----------- .../workOrders/workOrders-modal.vue | 67 +++++-- .../businessManagement/workOrdersType/data.ts | 104 ++++++++++ .../workOrdersType/index.vue | 166 ++++++++++++++++ .../workOrdersType/workOrdersType-modal.vue | 101 ++++++++++ 7 files changed, 670 insertions(+), 120 deletions(-) create mode 100644 apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts create mode 100644 apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts create mode 100644 apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts create mode 100644 apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue create mode 100644 apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue diff --git a/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts new file mode 100644 index 00000000..7350e6cd --- /dev/null +++ b/apps/web-antd/src/api/property/businessManagement/workOrdersType/index.ts @@ -0,0 +1,61 @@ +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'; + +/** +* 查询工单类型管理列表 +* @param params +* @returns 工单类型管理列表 +*/ +export function workOrdersTypeList(params?: WorkOrdersTypeQuery) { + return requestClient.get>('/property/workOrdersType/list', { params }); +} + +/** + * 导出工单类型管理列表 + * @param params + * @returns 工单类型管理列表 + */ +export function workOrdersTypeExport(params?: WorkOrdersTypeQuery) { + return commonExport('/property/workOrdersType/export', params ?? {}); +} + +/** + * 查询工单类型管理详情 + * @param id id + * @returns 工单类型管理详情 + */ +export function workOrdersTypeInfo(id: ID) { + return requestClient.get(`/property/workOrdersType/${id}`); +} + +/** + * 新增工单类型管理 + * @param data + * @returns void + */ +export function workOrdersTypeAdd(data: WorkOrdersTypeForm) { + return requestClient.postWithMsg('/property/workOrdersType', data); +} + +/** + * 更新工单类型管理 + * @param data + * @returns void + */ +export function workOrdersTypeUpdate(data: WorkOrdersTypeForm) { + return requestClient.putWithMsg('/property/workOrdersType', data); +} + +/** + * 删除工单类型管理 + * @param id id + * @returns void + */ +export function workOrdersTypeRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/workOrdersType/${id}`); +} diff --git a/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts b/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts new file mode 100644 index 00000000..2cde0610 --- /dev/null +++ b/apps/web-antd/src/api/property/businessManagement/workOrdersType/model.d.ts @@ -0,0 +1,114 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface WorkOrdersTypeVO { + /** + * id + */ + id: string | number; + + /** + * 工单类型编号 + */ + orderTypeNo: string; + + /** + * 工单类型名称 + */ + orderTypeName: string; + + /** + * 运作模式 + */ + operationMode: string; + + /** + * 排序值 + */ + sort: number; + + /** + * 累计工单数量 + */ + number: number; + + /** + * 是否支持转单(0支持,1不支持) + */ + isTransfers: number; + +} + +export interface WorkOrdersTypeForm extends BaseEntity { + /** + * id + */ + id?: string | number; + + /** + * 工单类型编号 + */ + orderTypeNo?: string; + + /** + * 工单类型名称 + */ + orderTypeName?: string; + + /** + * 运作模式 + */ + operationMode?: string; + + /** + * 排序值 + */ + sort?: number; + + /** + * 累计工单数量 + */ + number?: number; + + /** + * 是否支持转单(0支持,1不支持) + */ + isTransfers?: number; + +} + +export interface WorkOrdersTypeQuery extends PageQuery { + /** + * 工单类型编号 + */ + orderTypeNo?: string; + + /** + * 工单类型名称 + */ + orderTypeName?: string; + + /** + * 运作模式 + */ + operationMode?: string; + + /** + * 排序值 + */ + sort?: number; + + /** + * 累计工单数量 + */ + number?: number; + + /** + * 是否支持转单(0支持,1不支持) + */ + isTransfers?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts index b7c7586d..b6a1479f 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts @@ -1,5 +1,7 @@ -import type { FormSchemaGetter } from '#/adapter/form'; -import type { VxeGridProps } from '#/adapter/vxe-table'; +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 = () => [ @@ -15,146 +17,101 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Select', - componentProps: { - }, + componentProps: {}, fieldName: 'type', label: '工单类型', }, { - component: 'RadioGroup', + component: 'Select', componentProps: { - buttonStyle: 'solid', - optionType: 'button', + options: getDictOptions('wy_gdclzt'), }, fieldName: 'status', label: '状态', }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'dispatchTime', - label: '派单时间', - }, - { - component: 'Input', - fieldName: 'initiatorName', - label: '发起人姓名', - }, - { - component: 'Input', - fieldName: 'initiatorPhone', - label: '发起人手机号', - }, - { - component: 'Input', - fieldName: 'handler', - label: '处理人姓名', - }, - { - component: 'Input', - fieldName: 'location', - label: '地址', - }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'planCompleTime', - label: '计划完成时间', - }, - { - component: 'DatePicker', - componentProps: { - showTime: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - }, - fieldName: 'compleTime', - label: '完成时间', - }, - { - component: 'Input', - fieldName: 'serviceEvalua', - label: '评价', - }, - { - component: 'Input', - fieldName: 'isTimeOut', - label: '是否超时', - }, ]; -// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 -// export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ - { type: 'checkbox', width: 60 }, - { - title: 'id', - field: 'id', - }, + {type: 'checkbox', width: 60}, { title: '工单编号', field: 'orderNo', + width: 180, }, { title: '工单名称', field: 'orderName', + minWidth: 180, }, { title: '工单类型', field: 'type', + slots: { + default: ({row}) => { + return renderDict(row.type, 'wy_gdlx'); + }, + }, + width: 100, }, { title: '状态', field: 'status', + slots: { + default: ({row}) => { + return renderDict(row.status, 'wy_gdclzt'); + }, + }, + width: 100, }, { title: '派单时间', field: 'dispatchTime', + width: 100, }, { title: '发起人姓名', field: 'initiatorName', + width: 100, }, { title: '发起人手机号', field: 'initiatorPhone', + width: 100, }, { title: '处理人姓名', field: 'handler', + width: 100, }, { title: '地址', field: 'location', + width: 100, }, { title: '计划完成时间', field: 'planCompleTime', + width: 100, }, { title: '完成时间', field: 'compleTime', + width: 100, }, { title: '评价', field: 'serviceEvalua', + width: 100, }, { title: '是否超时', field: 'isTimeOut', + width: 100, }, { field: 'action', fixed: 'right', - slots: { default: 'action' }, + slots: {default: 'action'}, title: '操作', width: 180, }, @@ -170,11 +127,6 @@ export const modalSchema: FormSchemaGetter = () => [ triggerFields: [''], }, }, - { - label: '工单编号', - fieldName: 'orderNo', - component: 'Input', - }, { label: '工单名称', fieldName: 'orderName', @@ -185,20 +137,19 @@ export const modalSchema: FormSchemaGetter = () => [ label: '工单类型', fieldName: 'type', component: 'Select', - componentProps: { - }, - rules: 'selectRequired', - }, - { - label: '状态', - fieldName: 'status', - component: 'RadioGroup', - componentProps: { - buttonStyle: 'solid', - optionType: 'button', - }, + componentProps: {}, rules: 'selectRequired', }, + // { + // label: '状态', + // fieldName: 'status', + // component: 'RadioGroup', + // componentProps: { + // buttonStyle: 'solid', + // optionType: 'button', + // }, + // rules: 'selectRequired', + // }, { label: '派单时间', fieldName: 'dispatchTime', @@ -208,27 +159,34 @@ export const modalSchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, - rules: 'required', + rules: 'selectRequired', }, { - label: '发起人姓名', + label: '发起人', fieldName: 'initiatorName', - component: 'Input', + component: 'ApiSelect', + formItemClass: 'col-span-2', + rules: 'selectRequired', + }, + // { + // label: '发起人手机号', + // fieldName: 'initiatorPhone', + // component: 'Input', + // }, { - label: '发起人手机号', - fieldName: 'initiatorPhone', - component: 'Input', - }, - { - label: '处理人姓名', + label: '处理人', fieldName: 'handler', - component: 'Input', + component: 'ApiSelect', + formItemClass: 'col-span-2', + rules: 'selectRequired', }, { - label: '地址', + label: '具体位置', fieldName: 'location', component: 'Input', + formItemClass: 'col-span-2', + rules: 'selectRequired', }, { label: '计划完成时间', @@ -239,6 +197,8 @@ export const modalSchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, + labelWidth: 110, + rules: 'selectRequired', }, { label: '完成时间', @@ -249,15 +209,22 @@ export const modalSchema: FormSchemaGetter = () => [ format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, + rules: 'selectRequired', }, { label: '评价', fieldName: 'serviceEvalua', - component: 'Input', + component: 'Rate', + rules: 'required', }, { label: '是否超时', fieldName: 'isTimeOut', - component: 'Input', + component: 'RadioGroup', + componentProps: { + buttonStyle: 'solid', + options: getDictOptions('wy_sf'), + }, + rules: 'selectRequired', }, ]; diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue index f9cbccd0..86043c1f 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue @@ -1,15 +1,21 @@ diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts b/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts new file mode 100644 index 00000000..9ca14207 --- /dev/null +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/data.ts @@ -0,0 +1,104 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'orderTypeNo', + label: '类型编号', + }, + { + component: 'Input', + fieldName: 'orderTypeName', + label: '类型名称', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'operationMode', + label: '运作模式', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '类型编号', + field: 'orderTypeNo', + }, + { + title: '类型名称', + field: 'orderTypeName', + }, + { + title: '运作模式', + field: 'operationMode', + }, + { + title: '排序值', + field: 'sort', + }, + { + title: '累计工单数量', + field: 'number', + }, + { + title: '是否支持转单', + field: 'isTransfers', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: 'id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '类型编号', + fieldName: 'orderTypeNo', + component: 'Input', + }, + { + label: '类型名称', + fieldName: 'orderTypeName', + component: 'Input', + rules: 'required', + }, + { + label: '运作模式', + fieldName: 'operationMode', + component: 'Input', + componentProps: { + }, + rules: 'selectRequired', + }, + { + label: '排序值', + fieldName: 'sort', + component: 'Input', + }, + { + label: '累计工单数量', + fieldName: 'number', + component: 'Input', + }, + { + label: '是否支持转单', + fieldName: 'isTransfers', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue b/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue new file mode 100644 index 00000000..6e44d6c7 --- /dev/null +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/index.vue @@ -0,0 +1,166 @@ + + + diff --git a/apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue b/apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue new file mode 100644 index 00000000..3d06b1ec --- /dev/null +++ b/apps/web-antd/src/views/property/businessManagement/workOrdersType/workOrdersType-modal.vue @@ -0,0 +1,101 @@ + + + +