From 91d57344bb74eb2384aa03450f35a117a4d0a72b Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 23 May 2024 13:45:03 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B5=B7=E6=8B=89=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en-US.ts | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 5a6b94b3f..d828c8d92 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1086,7 +1086,7 @@ export default { 查看质检报告:'Check the quality inspection report', 长春:'ChangChun', 成都:'ChengDu', - 富维海拉智慧工厂管理平台:'HELLR Smart Factory Management Platform', + 富维海拉智慧工厂管理平台:'HELLA Smart Factory Management Platform', 采购未收货记录:'Purchase unreceived record', 请选择要货计划单号:'Please select the desired shipment tracking number', 大小不超过:'Not more in size', diff --git a/src/main.ts b/src/main.ts index c8c5c34d5..50255e0c3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -74,7 +74,7 @@ const setupAll = async () => { // 多语言相关 const localeStore = useLocaleStore() if(localeStore&&localeStore.currentLocale&&localeStore.currentLocale.lang.indexOf('en')>-1&&document.querySelector('#app-loading-title')){ - document.querySelector('#app-loading-title').innerHTML = 'HELLR Smart Factory Management Platform' // 富维海拉智慧工厂管理平台 + document.querySelector('#app-loading-title').innerHTML = 'HELLA Smart Factory Management Platform' // 富维海拉智慧工厂管理平台 } setupAll() From 0afb567a16a7f5d88e52a7530de1ec328565f9c8 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Thu, 23 May 2024 13:52:00 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E5=8F=B7=E9=9D=9E=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasereceiptRequestMain.data.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index 004cafd62..f5ebb517b 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -1268,9 +1268,6 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive Date: Thu, 23 May 2024 13:57:33 +0800 Subject: [PATCH 3/6] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=E4=BF=9D?= =?UTF-8?q?=E5=85=BB=E8=AE=A1=E5=88=92/=E4=BF=9D=E5=85=BB=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=20=E5=A2=9E=E6=94=B9=E6=9F=A5=20=E5=81=9C=E7=94=A8?= =?UTF-8?q?=E5=90=AF=E7=94=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/equipmentMaintenanceMain/index.ts | 74 ++++ src/utils/dict.ts | 3 +- .../equipmentMaintenanceMain.data.ts | 318 ++++++++++++++++++ .../eam/equipmentMaintenanceMain/index.vue | 244 ++++++++++++++ src/views/eam/maintenance/index.vue | 35 +- src/views/eam/maintenance/maintenance.data.ts | 33 +- 6 files changed, 701 insertions(+), 6 deletions(-) create mode 100644 src/api/eam/equipmentMaintenanceMain/index.ts create mode 100644 src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts create mode 100644 src/views/eam/equipmentMaintenanceMain/index.vue diff --git a/src/api/eam/equipmentMaintenanceMain/index.ts b/src/api/eam/equipmentMaintenanceMain/index.ts new file mode 100644 index 000000000..835e6bff0 --- /dev/null +++ b/src/api/eam/equipmentMaintenanceMain/index.ts @@ -0,0 +1,74 @@ +import request from '@/config/axios' + +export interface EquipmentMaintenanceMainVO { + id: number + number: string + describing: string + equipmentCode: string + type: string + classes: string + planNumber: string + faultType: string + cycle: string + times: string + verifyer: number + verifyContent: string + verifyTime: Date + maintenancer: number + maintenancePhone: string + completeResult: string + completionTime: Date + maintenanceTime: Date + status: string + factoryAreaCode: string + workshopCode: string + workshopSectionCode: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询设备保养工单主列表 +export const getEquipmentMaintenanceMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/equipment-maintenance-main/senior', data }) + } else { + return await request.get({ url: `/eam/equipment-maintenance-main/page`, params }) + } +} + +// 查询设备保养工单主详情 +export const getEquipmentMaintenanceMain = async (id: number) => { + return await request.get({ url: `/eam/equipment-maintenance-main/get?id=` + id }) +} + +// 新增设备保养工单主 +export const createEquipmentMaintenanceMain = async (data: EquipmentMaintenanceMainVO) => { + return await request.post({ url: `/eam/equipment-maintenance-main/create`, data }) +} + +// 修改设备保养工单主 +export const updateEquipmentMaintenanceMain = async (data: EquipmentMaintenanceMainVO) => { + return await request.put({ url: `/eam/equipment-maintenance-main/update`, data }) +} + +// 删除设备保养工单主 +export const deleteEquipmentMaintenanceMain = async (id: number) => { + return await request.delete({ url: `/eam/equipment-maintenance-main/delete?id=` + id }) +} + +// 导出设备保养工单主 Excel +export const exportEquipmentMaintenanceMain = async (params) => { + return await request.download({ url: `/eam/equipment-maintenance-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/equipment-maintenance-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index c3ef09211..320790719 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -348,4 +348,5 @@ export enum DICT_TYPE { SUBJECT = 'subject', //科目 REGION = 'region', //区域 PART_CLASS = 'part_class', //备件分类 -} \ No newline at end of file + MAINTENANCE_CYCLE ='maintenance_cycle' // 保养周期 +} diff --git a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts new file mode 100644 index 000000000..b324fe9e1 --- /dev/null +++ b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts @@ -0,0 +1,318 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const EquipmentMaintenanceMainRules = reactive({ + number: [required], + equipmentCode: [required], + planNumber: [required], + status: [required], + factoryAreaCode: [required], + concurrencyStamp: [required], +}) + +export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '保养工单编号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '描述', + field: 'describing', + sort: 'custom', + isSearch: true, + }, + { + label: '设备编号', + field: 'equipmentCode', + sort: 'custom', + isSearch: true, + }, + { + label: '设备分类', + field: 'type', + sort: 'custom', + isSearch: true, + }, + { + label: '班次枚举', + field: 'classes', + sort: 'custom', + isSearch: true, + }, + { + label: '保养计划工单号', + field: 'planNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '故障类型枚举', + field: 'faultType', + sort: 'custom', + isSearch: true, + }, + { + label: '保养周期', + field: 'cycle', + sort: 'custom', + isSearch: true, + }, + { + label: '保养次数', + field: 'times', + sort: 'custom', + isSearch: true, + }, + { + label: '验证人', + field: 'verifyer', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '验证内容', + field: 'verifyContent', + sort: 'custom', + isSearch: true, + form: { + component: 'Editor', + componentProps: { + valueHtml: '', + height: 200 + } + }, + }, + { + label: '验证时间', + field: 'verifyTime', + 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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '保养人id', + field: 'maintenancer', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '保养人联系电话', + field: 'maintenancePhone', + sort: 'custom', + isSearch: true, + }, + { + label: '结果枚举临时措施、完成', + field: 'completeResult', + sort: 'custom', + isSearch: true, + }, + { + label: '完成时间', + field: 'completionTime', + 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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '保养时间', + field: 'maintenanceTime', + 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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '流程状态枚举', + field: 'status', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + }, + }, + { + label: '所属厂区编号', + field: 'factoryAreaCode', + sort: 'custom', + isSearch: true, + }, + { + label: '车间编号', + field: 'workshopCode', + sort: 'custom', + isSearch: true, + }, + { + label: '工段编号', + field: 'workshopSectionCode', + sort: 'custom', + isSearch: true, + }, + { + 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: 'departmentCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '是否可用默认TRUE', + field: 'available', + sort: 'custom', + isSearch: true, + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + 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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '删除人id', + field: 'deleterId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/equipmentMaintenanceMain/index.vue b/src/views/eam/equipmentMaintenanceMain/index.vue new file mode 100644 index 000000000..248f1de3f --- /dev/null +++ b/src/views/eam/equipmentMaintenanceMain/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/maintenance/index.vue b/src/views/eam/maintenance/index.vue index 9409b27b2..2c4ff5eb7 100644 --- a/src/views/eam/maintenance/index.vue +++ b/src/views/eam/maintenance/index.vue @@ -48,6 +48,7 @@ :apiCreate="MaintenanceApi.createMaintenance" @searchTableSuccess="searchTableSuccess" :isBusiness="false" + @onChange="onChange" /> @@ -65,7 +66,10 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' -import * as BasicInspectionOptionApi from "@/api/eam/basicInspectionOption"; +import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; +import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; +import { ToolAccounts } from "@/views/eam/toolAccounts/ToolAccounts.data"; +import * as ToolItemApi from "@/api/eam/toolAccounts"; defineOptions({ name: 'Maintenance' }) @@ -243,6 +247,35 @@ const handleDisable = async (id: number) => { } catch {} } +const onChange = (field, item) => { + console.log(field) + console.log(item) + //设备 + if(field == 'type' && item == 'DEVICE'){ + Maintenance.allSchemas.formSchema.forEach((items) => { + if (items.field == 'equipmentCode') { + basicFormRef.value.formRef.setValues({ + equipmentCode:'' + }) + items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas + items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage + } + }) + } + //工装 + if(field == 'type' && item == 'EQUIPMENT'){ + Maintenance.allSchemas.formSchema.forEach((items) => { + if (items.field == 'equipmentCode') { + basicFormRef.value.formRef.setValues({ + equipmentCode:'' + }) + items.componentProps.searchAllSchemas = ToolAccounts.allSchemas + items.componentProps.searchPage = ToolItemApi.getToolAccountsPage + } + }) + } +} + /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { diff --git a/src/views/eam/maintenance/maintenance.data.ts b/src/views/eam/maintenance/maintenance.data.ts index d8eacab32..a75cc0886 100644 --- a/src/views/eam/maintenance/maintenance.data.ts +++ b/src/views/eam/maintenance/maintenance.data.ts @@ -1,5 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { EquipmentAccounts } from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; +import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; // 表单校验 export const MaintenanceRules = reactive({ @@ -33,16 +35,37 @@ export const Maintenance = useCrudSchemas(reactive([ isSearch: true, }, { - label: '设备编号', - field: 'equipmentCode', + label: '设备类别', + field: 'type', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', sort: 'custom', isSearch: true, }, { - label: '设备类别枚举', - field: 'type', + label: '设备编号', + field: 'equipmentCode', sort: 'custom', isSearch: true, + isForm: true, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchTitle: '设备信息', // 查询弹窗标题 + searchListPlaceholder: '请选择 设备编号', // 输入框占位文本 + searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类 + searchField: 'code', // 查询弹窗赋值字段 + searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法 + multiple:true, + searchCondition: [{ + key: 'status', + value: 'NORMAL', + action: '==', + isSearch: true, + isMainValue: false + }] + } + } }, { label: '方案编号', @@ -53,6 +76,8 @@ export const Maintenance = useCrudSchemas(reactive([ { label: '周期', field: 'cycle', + dictType: DICT_TYPE.MAINTENANCE_CYCLE, + dictClass: 'string', sort: 'custom', isSearch: true, }, From 4d2061e9873637b02855ca3fb32aa3c353767583 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 23 May 2024 14:29:56 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=99=8D=E7=BA=A7bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/rowDrop/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/rowDrop/index.vue b/src/components/rowDrop/index.vue index 73363f566..8ceae3d64 100644 --- a/src/components/rowDrop/index.vue +++ b/src/components/rowDrop/index.vue @@ -153,7 +153,7 @@ const initSelectSta = () => { if (item.field != 'action') { checkedDataList.value.push(item.label) _showTableColumns.push(_myTableColumns.find(myItem => (myItem.label == item.label))) - allData.value.push(t(`ts.${item.label}`)) + allData.value.push(t(`ts.${item.label}`).replace('ts.','')) } } }) @@ -165,7 +165,7 @@ const initSelectSta = () => { if (!myTableItem.fixed) { if (myTableItem.field != 'action') { if (allData.value.indexOf(myTableItem.label) == -1) { - allData.value.push(t(`ts.${myTableItem.label}`)) + allData.value.push(t(`ts.${myTableItem.label}`).replace('ts.','')) } } } @@ -195,7 +195,7 @@ const initSelectSta = () => { if (!item.fixed) { if (item.field != 'action') { checkedDataList.value.push(item.label) - allData.value.push(t(`ts.${item.label}`)) + allData.value.push(t(`ts.${item.label}`).replace('ts.','')) } } }) From 4c07b1284169ca6bdfec0564ad1a762051ca9318 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Thu, 23 May 2024 14:46:06 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=BA=93=E4=BD=8D=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../labelManage/locationLabel/index.vue | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue b/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue index 1081eec14..04ec8d045 100644 --- a/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue +++ b/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue @@ -16,7 +16,7 @@ -