From e31212419e903c370c16cda14b180b262b2db91d Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Wed, 26 Jun 2024 16:34:23 +0800 Subject: [PATCH] =?UTF-8?q?EAM=20=20=E2=80=94=E2=80=94>=20=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E6=8D=AE=20=E8=BD=A6=E9=97=B4=E4=BA=A7?= =?UTF-8?q?=E7=BA=BF=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicEamProductionline.data.ts | 1 - src/views/eam/basicEamProductionline/index.vue | 13 +++++++++++++ src/views/eam/basicEamWorkshop/index.vue | 13 +++++++++++++ .../equipmentMaintenanceMain.data.ts | 11 +++++------ .../equipmentRepairJobMain.data.ts | 14 +++++++------- .../equipmentReportRepairRequest.data.ts | 11 +++++------ src/views/eam/maintenance/maintenance.data.ts | 11 +++++------ .../eam/planInspection/planInspection.data.ts | 12 +++++------- src/views/eam/planSpotCheck/planSpotCheck.data.ts | 11 +++++------ 9 files changed, 58 insertions(+), 39 deletions(-) diff --git a/src/views/eam/basicEamProductionline/basicEamProductionline.data.ts b/src/views/eam/basicEamProductionline/basicEamProductionline.data.ts index a9018722a..d4470df4d 100644 --- a/src/views/eam/basicEamProductionline/basicEamProductionline.data.ts +++ b/src/views/eam/basicEamProductionline/basicEamProductionline.data.ts @@ -2,7 +2,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import * as WorkshopApi from "@/api/eam/basicEamWorkshop"; import {BasicEamWorkshop} from "@/views/eam/basicEamWorkshop/basicEamWorkshop.data"; -import {getBasicEamWorkshopPage} from "@/api/eam/basicEamWorkshop"; // 表单校验 export const BasicEamProductionlineRules = reactive({ diff --git a/src/views/eam/basicEamProductionline/index.vue b/src/views/eam/basicEamProductionline/index.vue index 1b00d53df..38b483ed9 100644 --- a/src/views/eam/basicEamProductionline/index.vue +++ b/src/views/eam/basicEamProductionline/index.vue @@ -169,6 +169,19 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type == "create"){ + BasicEamProductionline.allSchemas.formSchema.forEach((item) => { + if(item.field == 'code'){ + item.componentProps.disabled = false + } + }) + }else { + BasicEamProductionline.allSchemas.formSchema.forEach((item) => { + if(item.field == 'code'){ + item.componentProps.disabled = false + } + }) + } basicFormRef.value.open(type, row) } diff --git a/src/views/eam/basicEamWorkshop/index.vue b/src/views/eam/basicEamWorkshop/index.vue index c3739217a..5f9f85977 100644 --- a/src/views/eam/basicEamWorkshop/index.vue +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -168,6 +168,19 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type == "create"){ + BasicEamWorkshop.allSchemas.formSchema.forEach((item) => { + if(item.field == 'code'){ + item.componentProps.disabled = false + } + }) + }else{ + BasicEamWorkshop.allSchemas.formSchema.forEach((item) => { + if(item.field == 'code'){ + item.componentProps.disabled = true + } + }) + } basicFormRef.value.open(type, row) } diff --git a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts index 97d22bbfe..33839e0b6 100644 --- a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts +++ b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts @@ -2,8 +2,8 @@ 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"; -import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; -import * as WorkshopApi from "@/api/wms/workshop"; +import {BasicEamWorkshop} from "@/views/eam/basicEamWorkshop/basicEamWorkshop.data"; +import * as WorkshopApi from "@/api/eam/basicEamWorkshop"; import {RelationMaintenancePlanItem} from "@/views/eam/maintenance/maintenance.data"; import * as ItemApi from "@/api/eam/relationMaintenancePlanItem"; import {validateroundNumber} from "@/utils/validator"; @@ -378,20 +378,19 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ isForm:false, }, { - label: '车间编号', + label: '车间代码', field: 'workshopCode', sort: 'custom', isSearch: false, required: true, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '车间', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', diff --git a/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts b/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts index e8b0de93c..076dc0a7b 100644 --- a/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts +++ b/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts @@ -4,8 +4,8 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import {BasicFaultCause} from "@/views/eam/basicFaultCause/basicFaultCause.data"; import * as ItemApi from "@/api/eam/basicFaultCause"; -import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; -import * as WorkshopApi from "@/api/wms/workshop"; +import {BasicEamWorkshop} from "@/views/eam/basicEamWorkshop/basicEamWorkshop.data"; +import * as WorkshopApi from "@/api/eam/basicEamWorkshop"; import {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data"; import * as BasicFaultTypeApi from "@/api/eam/basicFaultType"; @@ -452,20 +452,19 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([ // isSearch: true, // }, { - label: '车间编号', + label: '车间代码', field: 'workshopCode', sort: 'custom', isSearch: false, required: true, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择车间', // 输入框占位文本 + searchListPlaceholder: '车间', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', @@ -474,6 +473,7 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([ } }, }, + // { // label: '产线编号', // field: 'lineCode', diff --git a/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts b/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts index 93b558fc9..538e9e130 100644 --- a/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts +++ b/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts @@ -1,8 +1,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; -import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; -import * as WorkshopApi from "@/api/wms/workshop"; +import {BasicEamWorkshop} from "@/views/eam/basicEamWorkshop/basicEamWorkshop.data"; +import * as WorkshopApi from "@/api/eam/basicEamWorkshop"; import {dateFormatter} from '@/utils/formatTime' import {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data"; import * as BasicFaultTypeApi from "@/api/eam/basicFaultType"; @@ -136,20 +136,19 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive([ isDetail:false, }, { - label: '车间编号', + label: '车间代码', field: 'workshopCode', sort: 'custom', isSearch: false, required: true, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '车间', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', diff --git a/src/views/eam/planInspection/planInspection.data.ts b/src/views/eam/planInspection/planInspection.data.ts index 23ceae4ec..84bd0d6b6 100644 --- a/src/views/eam/planInspection/planInspection.data.ts +++ b/src/views/eam/planInspection/planInspection.data.ts @@ -4,9 +4,8 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import * as BasicInspectionApi from "@/api/eam/basicInspectionOption"; import {BasicInspectionOption} from "@/views/eam/basicInspectionOption/basicInspectionOption.data"; -import {getBasicInspectionOptionPage} from "@/api/eam/basicInspectionOption"; -import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; -import * as WorkshopApi from "@/api/wms/workshop"; +import {BasicEamWorkshop} from "@/views/eam/basicEamWorkshop/basicEamWorkshop.data"; +import * as WorkshopApi from "@/api/eam/basicEamWorkshop"; // 表单校验 export const PlanInspectionRules = reactive({ @@ -234,20 +233,19 @@ export const PlanInspection = useCrudSchemas(reactive([ isDetail:false, }, { - label: '车间编号', + label: '车间代码', field: 'workshopCode', sort: 'custom', isSearch: false, required: true, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '车间', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', diff --git a/src/views/eam/planSpotCheck/planSpotCheck.data.ts b/src/views/eam/planSpotCheck/planSpotCheck.data.ts index 4c94aefcb..01c49f3cd 100644 --- a/src/views/eam/planSpotCheck/planSpotCheck.data.ts +++ b/src/views/eam/planSpotCheck/planSpotCheck.data.ts @@ -4,8 +4,8 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import * as SpotCheckOptionApi from "@/api/eam/basicSpotCheckOption"; import {BasicSpotCheckOption} from "@/views/eam/basicSpotCheckOption/basicSpotCheckOption.data"; -import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; -import * as WorkshopApi from "@/api/wms/workshop"; +import {BasicEamWorkshop} from "@/views/eam/basicEamWorkshop/basicEamWorkshop.data"; +import * as WorkshopApi from "@/api/eam/basicEamWorkshop"; // 表单校验 export const PlanSpotCheckRules = reactive({ @@ -233,20 +233,19 @@ export const PlanSpotCheck = useCrudSchemas(reactive([ isDetail:false, }, { - label: '车间编号', + label: '车间代码', field: 'workshopCode', sort: 'custom', isSearch: false, required: true, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '车间', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE',