From b44f9d2baf13aba921e6aed18f1e1aecf9109d3d Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Thu, 8 Aug 2024 09:00:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basic/costCenterMapping/index.ts | 53 ++++ src/api/eam/basic/taskLog/index.ts | 62 ++++ src/utils/dict.ts | 3 + .../costCenterMapping.data.ts | 79 +++++ .../eam/basic/costCenterMapping/index.vue | 244 ++++++++++++++++ src/views/eam/basic/taskLog/index.vue | 272 ++++++++++++++++++ src/views/eam/basic/taskLog/taskLog.data.ts | 125 ++++++++ .../itemInLocation/itemInLocation.data.ts | 4 +- .../itemOutLocation/itemOutLocation.data.ts | 4 +- 9 files changed, 844 insertions(+), 2 deletions(-) create mode 100644 src/api/eam/basic/costCenterMapping/index.ts create mode 100644 src/api/eam/basic/taskLog/index.ts create mode 100644 src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts create mode 100644 src/views/eam/basic/costCenterMapping/index.vue create mode 100644 src/views/eam/basic/taskLog/index.vue create mode 100644 src/views/eam/basic/taskLog/taskLog.data.ts diff --git a/src/api/eam/basic/costCenterMapping/index.ts b/src/api/eam/basic/costCenterMapping/index.ts new file mode 100644 index 0000000..729f7a8 --- /dev/null +++ b/src/api/eam/basic/costCenterMapping/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface CostCenterMappingVO { + id: number + warehouseArea: string + department: string + creditAccount: string + ccAccount: string + siteId: string + available: string + concurrencyStamp: number +} + +// 查询科目成本中心对照列表 +export const getCostCenterMappingPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/cost-center-mapping/senior', data }) + } else { + return await request.get({ url: `/eam/cost-center-mapping/page`, params }) + } +} + +// 查询科目成本中心对照详情 +export const getCostCenterMapping = async (id: number) => { + return await request.get({ url: `/eam/cost-center-mapping/get?id=` + id }) +} + +// 新增科目成本中心对照 +export const createCostCenterMapping = async (data: CostCenterMappingVO) => { + return await request.post({ url: `/eam/cost-center-mapping/create`, data }) +} + +// 修改科目成本中心对照 +export const updateCostCenterMapping = async (data: CostCenterMappingVO) => { + return await request.put({ url: `/eam/cost-center-mapping/update`, data }) +} + +// 删除科目成本中心对照 +export const deleteCostCenterMapping = async (id: number) => { + return await request.delete({ url: `/eam/cost-center-mapping/delete?id=` + id }) +} + +// 导出科目成本中心对照 Excel +export const exportCostCenterMapping = async (params) => { + return await request.download({ url: `/eam/cost-center-mapping/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/cost-center-mapping/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/basic/taskLog/index.ts b/src/api/eam/basic/taskLog/index.ts new file mode 100644 index 0000000..a7004b9 --- /dev/null +++ b/src/api/eam/basic/taskLog/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface TaskLogVO { + id: number + businessKey: string + dataName: string + targetUrl: string + requestPayload: string + pushStatus: string + retryCount: number + siteId: string + available: string + concurrencyStamp: number + taskId: string +} + +// 查询重试任务日志列表 +export const getTaskLogPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/retry/task-log/senior', data }) + } else { + return await request.get({ url: `/retry/task-log/page`, params }) + } +} + +// 查询重试任务日志详情 +export const getTaskLog = async (id: number) => { + return await request.get({ url: `/retry/task-log/get?id=` + id }) +} + +// 新增重试任务日志 +export const createTaskLog = async (data: TaskLogVO) => { + return await request.post({ url: `/retry/task-log/create`, data }) +} + +// 修改重试任务日志 +export const updateTaskLog = async (data: TaskLogVO) => { + return await request.put({ url: `/retry/task-log/update`, data }) +} + +// 删除重试任务日志 +export const deleteTaskLog = async (id: number) => { + return await request.delete({ url: `/retry/task-log/delete?id=` + id }) +} + +// 导出重试任务日志 Excel +export const exportTaskLog = async (params) => { + return await request.download({ url: `/retry/task-log/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/retry/task-log/get-import-template' }) +} + + +// 下载用户导入模板 +export const resetTaskLog = async (id: number) => { + return await request.get({ url: `/retry/task-log/reset?id=` + id }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 3ad3f01..093185c 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -309,4 +309,7 @@ export enum DICT_TYPE { SPECIAL_DEPT_ROLE = 'special_dept_role', MOLD_ACCOUNT_CATEGORY = 'mold_account_category',//模具台账类型 ORDER_SOURCE_TYPE = 'order_source_type', //工单来源类型 + CENTER_SUBJECT_MAP_DEPT = 'center_subject_map_dept',//成本中心科目对照部门 + ITEM_OUT_IN_TYPE = 'item_out_in_type',//备件出入库类型 + } diff --git a/src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts b/src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts new file mode 100644 index 0000000..7164336 --- /dev/null +++ b/src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts @@ -0,0 +1,79 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { LocationArea } from '../locationArea/locationArea.data' +import * as LocationAreaApi from '@/api/eam/basic/locationArea' + +// 表单校验 +export const CostCenterMappingRules = reactive({ + warehouseArea: [required], + department: [required], + creditAccount: [required], + ccAccount: [required], + concurrencyStamp: [required] +}) + +export const CostCenterMapping = useCrudSchemas(reactive([ + // { + // label: '主键ID', + // field: 'id', + // sort: 'custom', + // isForm: false + // }, + { + label: '库区编码', + field: 'warehouseArea', + sort: 'custom', + isSearch: true, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库区', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '库区信息', // 查询弹窗标题 + searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类 + searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法 + searchCondition: [ + ] + } + }, + }, + { + label: '部门', + field: 'department', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.CENTER_SUBJECT_MAP_DEPT, + dictClass: 'string', + form: { + component: 'Select' + } + }, + { + label: '科目', + field: 'creditAccount', + sort: 'custom', + isSearch: true, + form: { + component: 'Input' + } + }, + { + label: '成本中心', + field: 'ccAccount', + sort: 'custom', + isSearch: true, + form: { + component: 'Input' + } + }, + + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/basic/costCenterMapping/index.vue b/src/views/eam/basic/costCenterMapping/index.vue new file mode 100644 index 0000000..8143e32 --- /dev/null +++ b/src/views/eam/basic/costCenterMapping/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/basic/taskLog/index.vue b/src/views/eam/basic/taskLog/index.vue new file mode 100644 index 0000000..fe03809 --- /dev/null +++ b/src/views/eam/basic/taskLog/index.vue @@ -0,0 +1,272 @@ + + + diff --git a/src/views/eam/basic/taskLog/taskLog.data.ts b/src/views/eam/basic/taskLog/taskLog.data.ts new file mode 100644 index 0000000..3c0f3c5 --- /dev/null +++ b/src/views/eam/basic/taskLog/taskLog.data.ts @@ -0,0 +1,125 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const TaskLogRules = reactive({ + businessKey: [required], + dataName: [required], + concurrencyStamp: [required], + taskId: [required] +}) + +export const TaskLog = useCrudSchemas(reactive([ + // { + // label: '主键ID', + // field: 'id', + // sort: 'custom', + // isForm: false + // }, + { + label: '业务主键', + field: 'businessKey', + sort: 'custom', + isSearch: true + }, + { + label: '接口名称', + field: 'dataName', + sort: 'custom', + isSearch: true + }, + // { + // label: '目标URL', + // field: 'targetUrl', + // sort: 'custom', + // isSearch: true + // }, + { + label: '请求负载', + field: 'requestPayload', + sort: 'custom', + isSearch: true + }, + { + label: '推送状态', + field: 'pushStatus', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + } + }, + { + label: '重试次数', + field: 'retryCount', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + // { + // label: '创建时间', + // field: 'createTime', + // sort: 'custom', + // formatter: dateFormatter, + // isSearch: true, + // search: { + // component: 'DatePicker', + // componentProps: { + // valueFormat: 'YYYY-MM-DD HH:mm:ss', + // type: 'daterange', + // defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + // } + // }, + // isForm: false + // }, + // { + // label: '地点ID', + // field: 'siteId', + // sort: 'custom', + // isSearch: true + // }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: true, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '并发乐观锁', + // field: 'concurrencyStamp', + // sort: 'custom', + // isSearch: true, + // form: { + // component: 'InputNumber', + // value: 0 + // } + // }, + { + label: '任务ID', + field: 'taskId', + sort: 'custom', + isSearch: true + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/item/itemInLocation/itemInLocation.data.ts b/src/views/eam/item/itemInLocation/itemInLocation.data.ts index 4aef77d..72d5de9 100644 --- a/src/views/eam/item/itemInLocation/itemInLocation.data.ts +++ b/src/views/eam/item/itemInLocation/itemInLocation.data.ts @@ -27,10 +27,12 @@ export const ItemInLocation = useCrudSchemas(reactive([ isSearch: true, }, { - label: '入库类型', + label: '类型', field: 'type', sort: 'custom', isSearch: false, + dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, + dictClass: 'string', form: { component: 'Select' }, diff --git a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts index ac28903..605687a 100644 --- a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts +++ b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts @@ -27,10 +27,12 @@ export const ItemOutLocation = useCrudSchemas(reactive([ isSearch: true, }, { - label: '出库类型', + label: '类型', field: 'type', sort: 'custom', isSearch: false, + dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, + dictClass: 'string', form: { component: 'Select' },