From 0283f44e13e735d1c511f3f6e84a04bd109aae51 Mon Sep 17 00:00:00 2001 From: zhousq Date: Mon, 20 May 2024 09:19:55 +0800 Subject: [PATCH 1/6] =?UTF-8?q?2024-05-20=20=E4=BF=AE=E5=A4=8D=E5=9B=BE?= =?UTF-8?q?=E5=BD=A2=E8=8A=82=E7=82=B9=E7=82=B9=E5=87=BB=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E8=8A=82=E7=82=B9=E5=90=8E=E5=81=9C=E6=AD=A2?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E7=9A=84bug=EF=BC=9B=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=9A=84=E9=BB=98=E8=AE=A4=E5=80=BC=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=A1=AB=E5=86=99=E9=94=99=E8=AF=AF;=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=B7=A5=E8=89=BA=E8=B7=AF=E7=BA=BF=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/orderDay/components/schedule.vue | 5 +++++ src/views/mes/orderDay/orderDay.data.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue index 0a8db8e45..455883192 100644 --- a/src/views/mes/orderDay/components/schedule.vue +++ b/src/views/mes/orderDay/components/schedule.vue @@ -438,6 +438,11 @@ const getConfigProcessEquipment= async (code:any) => { } const nodeClick = (e, x, y, node, view) => { //console.log(node.id) + //console.log("schedule-nodeClick-440",node) + if(node.id=="startNode" || node.id=="endNode"){ + return + } + getProcessBom(node.id) getConfigProcessWorkstation(node.id) getConfigProcessWorker(node.id) diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts index 8796228c6..191655684 100644 --- a/src/views/mes/orderDay/orderDay.data.ts +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -181,7 +181,7 @@ export const OrderDay = useCrudSchemas(reactive([ form:{ component:'Select', componentProps:{ - options:[{lablel:'1',value:'1'}] + options:[] } } }, From ca89a0e631d4b493b40fcb10a9ab32a1d4249369 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 20 May 2024 14:29:06 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=8E=82=E5=8C=BA=E7=8F=AD=E7=BB=84?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/classTypeRole/index.ts | 64 +++++ src/api/system/role/index.ts | 5 + src/api/wms/workshop/index.ts | 5 + src/config/axios/config.ts | 2 +- src/utils/dict.ts | 5 +- .../eam/classTypeRole/classTypeRole.data.ts | 191 +++++++++++++ src/views/eam/classTypeRole/index.vue | 264 ++++++++++++++++++ .../eam/spotCheckItem/spotCheckItem.data.ts | 14 +- src/views/system/role/role.data.ts | 85 ++++++ 9 files changed, 625 insertions(+), 10 deletions(-) create mode 100644 src/api/eam/classTypeRole/index.ts create mode 100644 src/views/eam/classTypeRole/classTypeRole.data.ts create mode 100644 src/views/eam/classTypeRole/index.vue create mode 100644 src/views/system/role/role.data.ts diff --git a/src/api/eam/classTypeRole/index.ts b/src/api/eam/classTypeRole/index.ts new file mode 100644 index 000000000..506a8abe3 --- /dev/null +++ b/src/api/eam/classTypeRole/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' + +export interface ClassTypeRoleVO { + id: number + workerRoleId: string + engineerRoleId: string + type: string + factoryAreaCode: string + workshopCode: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询厂区班组角色维护列表 +export const getClassTypeRolePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic/class-type-role/senior', data }) + } else { + return await request.get({ url: `/eam/basic/class-type-role/page`, params }) + } +} + +// 查询厂区班组角色维护详情 +export const getClassTypeRole = async (id: number) => { + return await request.get({ url: `/eam/basic/class-type-role/get?id=` + id }) +} + +// 新增厂区班组角色维护 +export const createClassTypeRole = async (data: ClassTypeRoleVO) => { + return await request.post({ url: `/eam/basic/class-type-role/create`, data }) +} + +// 修改厂区班组角色维护 +export const updateClassTypeRole = async (data: ClassTypeRoleVO) => { + return await request.put({ url: `/eam/basic/class-type-role/update`, data }) +} + +// 删除厂区班组角色维护 +export const deleteClassTypeRole = async (id: number) => { + return await request.delete({ url: `/eam/basic/class-type-role/delete?id=` + id }) +} + +// 导出厂区班组角色维护 Excel +export const exportClassTypeRole = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/class-type-role/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/class-type-role/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic/class-type-role/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 93636ff0d..ac8b3e736 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -59,3 +59,8 @@ export const exportRole = (params) => { params }) } + +// 查询角色列表 +export const getRoleNoPage = async (params: PageParam) => { + return await request.get({ url: '/system/role/noPage', params }) +} diff --git a/src/api/wms/workshop/index.ts b/src/api/wms/workshop/index.ts index 727253443..e2a23282a 100644 --- a/src/api/wms/workshop/index.ts +++ b/src/api/wms/workshop/index.ts @@ -55,4 +55,9 @@ export const exportWorkshop = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/workshop/get-import-template' }) +} + +// 查询车间列表 +export const getWorkshopNoPage = async (params) => { + return await request.get({ url: `/wms/workshop/noPage`, params }) } \ No newline at end of file diff --git a/src/config/axios/config.ts b/src/config/axios/config.ts index 7f7b94732..811650873 100644 --- a/src/config/axios/config.ts +++ b/src/config/axios/config.ts @@ -16,7 +16,7 @@ const config: { /** * 接口请求超时时间 */ - request_timeout: 3000000, + request_timeout: 30000, /** * 默认接口请求类型 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 92d89451e..095fe6ad4 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -341,5 +341,6 @@ export enum DICT_TYPE { // ========== eam - 业务 - ========== DEVICE_TYPE = 'device_type', // 设备类型 IS_UPDATED = 'is_updated', //是否可修改 - -} + DATA_SCOPE = 'data_scope', // 数据范围 + ROLE_STATUS = 'role_status' // 角色状态 +} \ No newline at end of file diff --git a/src/views/eam/classTypeRole/classTypeRole.data.ts b/src/views/eam/classTypeRole/classTypeRole.data.ts new file mode 100644 index 000000000..0d6c35938 --- /dev/null +++ b/src/views/eam/classTypeRole/classTypeRole.data.ts @@ -0,0 +1,191 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as deptApi from '@/api/system/dept' +import * as roleApi from '@/api/system/role' +import { Role } from '@/views/system/role/role.data' +import { selectAllFactoryArea } from '@/api/system/dept' +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' + +const roleList = await roleApi.getSimpleRoleList({}) +const workshopList = await WorkshopApi.getWorkshopPage({ pageNo: 1, pageSize: 100 }) +const roleListNoPage = await roleApi.getRoleNoPage({}) +const workshopNoPage = await WorkshopApi.getWorkshopNoPage({ pageNo: 1, pageSize: 100 }) +// 表单校验 +export const ClassTypeRoleRules = reactive({ + workerRoleId: [required], + engineerRoleId: [required], + workerRoleName: [required], + engineerRoleName: [required], + workshopName: [required], + type: [required], + factoryAreaCode: [required], + concurrencyStamp: [required] +}) + +export const ClassTypeRole = useCrudSchemas(reactive([ + { + label: '维修工角色', + field: 'workerRoleId', + sort: 'custom', + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: roleListNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'id' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return roleList.find((item) => item.id == cellValue)?.name + }, + }, + { + label: '维修工角色', + field: 'workerRoleName', + sort: 'custom', + isTable: false, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择角色', // 输入框占位文本 + searchField: 'id', // 查询弹窗赋值字段 + searchTitle: '维修工角色', // 查询弹窗标题 + searchAllSchemas: Role.allSchemas, // 查询弹窗所需类 + searchPage: roleApi.getRolePage, // 查询弹窗所需分页方法 + searchCondition: [] + } + }, + }, + { + label: '工程师角色', + field: 'engineerRoleId', + sort: 'custom', + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: roleListNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'id' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return roleList.find((item) => item.id == cellValue)?.name + }, + }, + { + label: '工程师角色', + field: 'engineerRoleName', + sort: 'custom', + isTable: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择角色', // 输入框占位文本 + searchField: 'id', // 查询弹窗赋值字段 + searchTitle: '工程师角色', // 查询弹窗标题 + searchAllSchemas: Role.allSchemas, // 查询弹窗所需类 + searchPage: roleApi.getRolePage, // 查询弹窗所需分页方法 + searchCondition: [] + } + }, + }, + { + label: '班组', + field: 'type', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.BASIC_TEAM_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + }, + { + label: '车间编号', + field: 'workshopCode', + sort: 'custom', + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: workshopNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'code' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return workshopList.list.find((item) => item.code == cellValue)?.name + }, + }, + { + label: '车间编号', + field: 'workshopName', + sort: 'custom', + isTable: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/classTypeRole/index.vue b/src/views/eam/classTypeRole/index.vue new file mode 100644 index 000000000..e5e1645b1 --- /dev/null +++ b/src/views/eam/classTypeRole/index.vue @@ -0,0 +1,264 @@ + + + diff --git a/src/views/eam/spotCheckItem/spotCheckItem.data.ts b/src/views/eam/spotCheckItem/spotCheckItem.data.ts index 4d7e8db78..a04484032 100644 --- a/src/views/eam/spotCheckItem/spotCheckItem.data.ts +++ b/src/views/eam/spotCheckItem/spotCheckItem.data.ts @@ -77,13 +77,13 @@ export const SpotCheckItem = useCrudSchemas(reactive([ label: '是否启用', field: 'available', sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isTable: true, - isDetail: false, - isSearch: false, - isTableForm: false, - isForm: false, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, }, { label: '备注', diff --git a/src/views/system/role/role.data.ts b/src/views/system/role/role.data.ts new file mode 100644 index 000000000..7a8bf3517 --- /dev/null +++ b/src/views/system/role/role.data.ts @@ -0,0 +1,85 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const RoleRules = reactive({ + name: [required], + code: [required], +}) + +export const Role = useCrudSchemas(reactive([ + { + label: '角色ID', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '角色名称', + field: 'name', + sort: 'custom', + }, + { + label: '角色权限字符串', + field: 'code', + sort: 'custom', + width: 200, + }, + { + label: '显示顺序', + field: 'sort', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '数据权限范围', + field: 'dataScope', + sort: 'custom', + dictType: DICT_TYPE.DATA_SCOPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + width: 200, + }, + { + label: '数据部门范围', + field: 'dataScopeDeptIds', + sort: 'custom', + }, + { + label: '角色状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.ROLE_STATUS, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + }, + { + label: '角色类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.SYSTEM_ROLE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) From 2e19e388f103940de538a595666cf9348e82987e Mon Sep 17 00:00:00 2001 From: zhousq Date: Mon, 20 May 2024 14:38:13 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/orderDay/components/BasicFormV2.vue | 1 + src/views/mes/orderDay/orderDay.data.ts | 7 +++++-- src/views/mes/processroute/index.vue | 15 +++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/views/mes/orderDay/components/BasicFormV2.vue b/src/views/mes/orderDay/components/BasicFormV2.vue index a6863b0ad..3c31d2066 100644 --- a/src/views/mes/orderDay/components/BasicFormV2.vue +++ b/src/views/mes/orderDay/components/BasicFormV2.vue @@ -372,6 +372,7 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { unref(formRef)?.resetFields() + //formRef.value?.resetFields() } // 传递给父类 diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts index 191655684..c059c2a17 100644 --- a/src/views/mes/orderDay/orderDay.data.ts +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -178,11 +178,13 @@ export const OrderDay = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, required: true, + value:'', form:{ component:'Select', componentProps:{ - options:[] - } + options:[], + }, + } }, { @@ -200,6 +202,7 @@ export const OrderDay = useCrudSchemas(reactive([ field: 'processrouteCode', sort: 'custom', form: { + value:"", component:'Select', componentProps: { options: [] diff --git a/src/views/mes/processroute/index.vue b/src/views/mes/processroute/index.vue index 98b69f762..c7a0a30ff 100644 --- a/src/views/mes/processroute/index.vue +++ b/src/views/mes/processroute/index.vue @@ -126,8 +126,16 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 + // if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + // searchFormClick({ + // filters: tableObject.params.filters + // }) + // } else { + // getList() + // } getList() } else if (val == 'filtrate') { // 筛选 + } else { // 其他按钮 console.log('其他按钮', item) } @@ -257,12 +265,15 @@ const importSuccess = () => { } // 筛选提交 -const searchFormClick = (searchData) => { +const searchFormClick = async (searchData) => { tableObject.params = { isSearch: true, filters: searchData.filters } - getList() // 刷新当前列表 + + //await getList() + //console.log('searchFormClick',tableObject.tableList ) + // 刷新当前列表 } /** 初始化 **/ From 95f34e80fdcc6cb48689261da5e5021aa5ba7b06 Mon Sep 17 00:00:00 2001 From: chenfang Date: Mon, 20 May 2024 15:17:45 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=99=8D=E7=BA=A7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../relegate/relegateRecord/index.vue | 91 +++++---- .../relegateRecord/relegateRecordMain.data.ts | 192 ++++++++---------- .../relegate/relegateRequest/index.vue | 76 ++++++- .../relegateRequestMain.data.ts | 4 +- 4 files changed, 207 insertions(+), 156 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue b/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue index 4860432a5..a2ecba264 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue @@ -1,7 +1,7 @@