From 5890359726438753c681591174de1185e37cf0e7 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 11 Jun 2024 09:38:20 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E5=BB=B6=E8=BF=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index c34237694..07ef4a755 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -566,9 +566,15 @@ const buttonBaseClick = (val) => { } // 保存 else if (val == 'save') { - debounce(() => { + let timer = null + if(!timer){ submitForm() - }, 2000)() + timer = setTimeout(()=>{ + if(timer){ + clearTimeout(timer) + } + },2000) + } } // 关闭 else if (val == 'close') { From 7fec5a2177021e342183d65dd52107813b783bdd Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 11 Jun 2024 09:39:12 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/XButton/src/ButtonBase.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/XButton/src/ButtonBase.vue b/src/components/XButton/src/ButtonBase.vue index 18d850111..adf88fab7 100644 --- a/src/components/XButton/src/ButtonBase.vue +++ b/src/components/XButton/src/ButtonBase.vue @@ -72,8 +72,17 @@ const props = defineProps({ const emit = defineEmits(['buttonBaseClick', 'updataTableColumns']) const buttonBaseClick = (val, item, $event) => { - clearButtonBlurHandle($event) //解决el-button点击后颜色不恢复问题 - emit('buttonBaseClick', val, item, $event) + let timer = null + if(!timer){ + clearButtonBlurHandle($event) //解决el-button点击后颜色不恢复问题 + emit('buttonBaseClick', val, item, $event) + timer = setTimeout(()=>{ + if(timer){ + clearTimeout(timer) + } + },2000) + } + } const popoverVisible = ref(false) // 关闭页面 From 7bf75ea9255d0a3c2c2eb822c743b91ac282cd05 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 11 Jun 2024 09:57:51 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=A4=87=E4=BB=B6=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/sparepartsinlocation/index.vue | 14 ++- .../sparePartsInLocationMain.data.ts | 93 +++++++++---------- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/src/views/eam/sparepartsinlocation/index.vue b/src/views/eam/sparepartsinlocation/index.vue index 6b0d3fc8a..f739ba809 100644 --- a/src/views/eam/sparepartsinlocation/index.vue +++ b/src/views/eam/sparepartsinlocation/index.vue @@ -76,8 +76,7 @@ :apiDelete="SparePartsInLocationDetailApi.deleteSparePartsInLocationDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :isShowAddBtn="true" - :detailButtonIsShowAdd="true" - :detailButtonIsShowAddStatusArray="['0']" + :detailButtonIsShowAdd="false" /> @@ -126,17 +125,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => const setV = {} setV[formField] = val[0][searchField] if (type == 'tableForm') { - if (formField == 'sparePartsCode') { - row['sparePartsCode'] = val[0].itemNumber + if (formField == 'locationCode') { + // row['sparePartsCode'] = val[0].itemNumber + row['locationCode'] = val[0].code + row['areaCode'] = val[0].areaCode + row['sparePartsCode'] = val[0].sparePartsCode row['currentQty'] = val[0].qty } } else { if (formField == 'locationCode') { setV['locationCode'] = val[0].code setV['areaCode'] = val[0].areaCode + setV['sparePartsCode'] = val[0].sparePartsCode + setV['currentQty'] = val[0].qty + } } - formRef.setValues(setV) }) }) diff --git a/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts b/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts index 9a311ae27..5908cfbd3 100644 --- a/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts +++ b/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts @@ -112,40 +112,7 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, }, - { - label: '库位编号', - field: 'locationCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择库位编号', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '库位信息', // 查询弹窗标题 - searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - ] - } - }, - }, - { - label: '库区编号', - field: 'areaCode', - sort: 'custom', - isSearch: false, - form: { - componentProps: { - disabled: true - } - } - }, + { label: '备注', @@ -187,6 +154,8 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive([ export const SparePartsInLocationDetailRules = reactive({ number: [required], masterId: [required], + locationCode: [required], + areaCode: [required], sparePartsCode: [required], applyQty: [required], concurrencyStamp: [required], @@ -228,21 +197,18 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( isTableForm:false }, { - label: '备件编号', - field: 'sparePartsCode', + label: '库位编号', + field: 'locationCode', sort: 'custom', - table: { - width: 150 - }, + isSearch: false, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 - searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 - searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 + searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 searchCondition: [ { key: 'available', @@ -257,8 +223,8 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchField: 'itemNumber', // 查询弹窗赋值字段 searchTitle: '备件信息', // 查询弹窗标题 - searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 - searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 searchCondition: [ { key: 'available', @@ -268,6 +234,36 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( ] } }, + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true + } + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true + } + }, { label: '库存数量', field: 'currentQty', @@ -321,7 +317,8 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( width: 150, fixed: 'right' }, - isTableForm:false + isTableForm:false, + isTable:false } ])) From 27a2daeeb75af8609104df7f07c284db2080f28a Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Tue, 11 Jun 2024 10:32:19 +0800 Subject: [PATCH 4/5] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E7=BB=B4?= =?UTF-8?q?=E4=BF=AE=E8=AE=B0=E5=BD=95=20=E4=B8=BB=E5=AD=90=E6=98=8E?= =?UTF-8?q?=E7=BB=86=20=E5=89=8D=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 1 + .../equipmentRepairJobMain.data.ts | 2 + .../eam/equipmentRepairJobMain/index.vue | 1 - .../equipmentRepairRecordMain.data.ts | 157 ++++++++++-------- .../eam/equipmentRepairRecordMain/index.vue | 29 +++- 5 files changed, 114 insertions(+), 76 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index dd9d89dee..64754649a 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -363,6 +363,7 @@ export enum DICT_TYPE { EAM_MAINTENANCE_URGENCY = 'eam_maintenance_urgency', // 维保紧急程度 EAM_MAINTENANCE_LEVEL = 'eam_maintenance_level', // 维保维修级别 EAM_REPAIR_STATUS = 'eam_repair_status', // 维修状态 + EAM_COMPLETE_RESULT = 'eam_complete_result', // 维修状态 OFF_BACK_STATUS = 'off_back_status', SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态 IS_LINE_ITEM = 'is_line_item', // 是否是线边 diff --git a/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts b/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts index 14f3d3a3a..d431d5ddd 100644 --- a/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts +++ b/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts @@ -249,6 +249,8 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([ label: '结果', field: 'completeResult', sort: 'custom', + dictType: DICT_TYPE.EAM_COMPLETE_RESULT, + dictClass: 'string', isSearch: true, }, { diff --git a/src/views/eam/equipmentRepairJobMain/index.vue b/src/views/eam/equipmentRepairJobMain/index.vue index 0fd5b724c..5943cdd48 100644 --- a/src/views/eam/equipmentRepairJobMain/index.vue +++ b/src/views/eam/equipmentRepairJobMain/index.vue @@ -88,7 +88,6 @@ import Detail from '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail. import FinishForm1 from '@/views/eam/equipmentRepairJobMain/finishForm1.vue' import FinishForm2 from '@/views/eam/equipmentRepairJobMain/finishForm2.vue' import FinishForm3 from '@/views/eam/equipmentRepairJobMain/finishForm3.vue' -import {createEquipmentRepairNewOrder} from "@/api/eam/equipmentRepairJobMain"; defineOptions({ name: 'EquipmentRepairJobMain' }) diff --git a/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts b/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts index 145876a38..c42362e3a 100644 --- a/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts +++ b/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.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 EquipmentRepairRecordMainRules = reactive({ @@ -11,7 +13,6 @@ export const EquipmentRepairRecordMainRules = reactive({ equipmentCode: [required], totalMinutes: [required], faultType: [required], - concurrencyStamp: [required] }) export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ @@ -28,12 +29,9 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_TYPE, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, - form: { - component: 'SelectV2' - } }, { - label: '报修工单申请号', + label: '报修工单号', field: 'repairNumber', sort: 'custom', isSearch: true @@ -42,43 +40,56 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ label: '来源字典', field: 'sources', sort: 'custom', - dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true + dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: false }, { label: '维修描述', field: 'maintenanceDesc', sort: 'custom', - isSearch: true + isSearch: false }, { label: '紧急程度', field: 'urgency', sort: 'custom', - dictType: DICT_TYPE.REPAIR_DEGREE, + dictType: DICT_TYPE.EAM_MAINTENANCE_URGENCY, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, - form: { - component: 'SelectV2' - } }, { label: '维修级别', field: 'level', sort: 'custom', - dictType: DICT_TYPE.REPAIR_LEVEL, + dictType: DICT_TYPE.EAM_MAINTENANCE_LEVEL, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, - form: { - component: 'SelectV2' - } }, { label: '设备编号', field: 'equipmentCode', sort: 'custom', - isSearch: true + 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: '是否停机', @@ -96,7 +107,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ field: 'startTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -118,7 +129,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ field: 'endTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -139,23 +150,25 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ label: '维修时间', field: 'totalMinutes', sort: 'custom', - isSearch: true + isSearch: false }, { label: '验证人', field: 'verifyer', sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '验证内容', field: 'verifyContent', sort: 'custom', - isSearch: true, + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, form: { component: 'Editor', componentProps: { @@ -169,7 +182,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ field: 'verifyTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, search: { component: 'DatePicker', componentProps: { @@ -190,35 +206,31 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ label: '执行人', field: 'maintenancer', sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } + isSearch: false, }, { label: '维修人联系电话', field: 'maintenancePhone', sort: 'custom', - isSearch: true + isSearch: false }, { label: '结果枚举', field: 'completeResult', sort: 'custom', - dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, + dictType: DICT_TYPE.EAM_COMPLETE_RESULT, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'SelectV2' - } + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '完成时间', field: 'completionTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -240,7 +252,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ field: 'maintenanceTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, search: { component: 'DatePicker', componentProps: { @@ -262,7 +277,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ field: 'repairTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -283,11 +298,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ label: '报修人', field: 'repairer', sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } + isSearch: false, }, { label: '故障类型', @@ -296,75 +307,86 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.FAILURE_REASON, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, - form: { - component: 'SelectV2' - } }, { label: '流程状态', field: 'status', sort: 'custom', + dictType: DICT_TYPE.EAM_REPAIR_STATUS, + dictClass: 'string', isSearch: true, - form: { - component: 'Radio' - } }, { label: '自动接单', field: 'autoOrder', sort: 'custom', - isSearch: true + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '自动执行', field: 'autoPerform', sort: 'custom', - isSearch: true + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '自动验证', field: 'autoVerify', sort: 'custom', - isSearch: true + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '直接生成记录', field: 'directCreateRecord', sort: 'custom', - isSearch: true + isSearch: false }, { label: '班组类型', field: 'classType', sort: 'custom', - isSearch: true, - form: { - component: 'SelectV2' - } + isSearch: false, }, { label: '所属厂区编号', field: 'factoryAreaCode', sort: 'custom', - isSearch: true + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '车间编号', field: 'workshopCode', sort: 'custom', - isSearch: true + isSearch: false }, { label: '工段编号', field: 'workshopSectionCode', sort: 'custom', - isSearch: true + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '备注', field: 'remark', sort: 'custom', - isSearch: true + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '是否可用', @@ -372,7 +394,10 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '操作', diff --git a/src/views/eam/equipmentRepairRecordMain/index.vue b/src/views/eam/equipmentRepairRecordMain/index.vue index d06fdd899..a56616c42 100644 --- a/src/views/eam/equipmentRepairRecordMain/index.vue +++ b/src/views/eam/equipmentRepairRecordMain/index.vue @@ -27,9 +27,9 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -