From 3bed166a0b76e2d8fcc4b6fda4df1a392b4bb8f2 Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Mon, 17 Jun 2024 17:31:59 +0800 Subject: [PATCH] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E7=82=B9?= =?UTF-8?q?=E6=A3=80=E5=B7=A5=E5=8D=95=20=E7=8A=B6=E6=80=81=E6=B5=81?= =?UTF-8?q?=E8=BD=AC=20=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/api/eam/equipmentSpotCheckDetail/index.ts | 62 + src/api/eam/equipmentSpotCheckMain/index.ts | 24 +- .../eam/relationSpotCheckPlanItem/index.ts | 57 + .../equipmentInspectionDetail.data.ts | 27 +- .../eam/equipmentInspectionMain/index.vue | 57 +- .../eam/equipmentMaintenanceMain/index.vue | 26 +- .../equipmentSpotCheckDetail.data.ts | 257 ++++ .../eam/equipmentSpotCheckDetail/index.vue | 244 ++++ .../SpotCheckOrderDetail.vue | 1055 +++++++++++++++++ .../equipmentSpotCheckMain.data.ts | 205 +++- .../equipmentSpotCheckMain/finishForm1.vue | 144 +++ .../equipmentSpotCheckMain/finishForm2.vue | 151 +++ .../eam/equipmentSpotCheckMain/index.vue | 326 ++++- 13 files changed, 2586 insertions(+), 49 deletions(-) create mode 100644 src/api/eam/equipmentSpotCheckDetail/index.ts create mode 100644 src/api/eam/relationSpotCheckPlanItem/index.ts create mode 100644 src/views/eam/equipmentSpotCheckDetail/equipmentSpotCheckDetail.data.ts create mode 100644 src/views/eam/equipmentSpotCheckDetail/index.vue create mode 100644 src/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue create mode 100644 src/views/eam/equipmentSpotCheckMain/finishForm1.vue create mode 100644 src/views/eam/equipmentSpotCheckMain/finishForm2.vue diff --git a/src/api/eam/equipmentSpotCheckDetail/index.ts b/src/api/eam/equipmentSpotCheckDetail/index.ts new file mode 100644 index 000000000..be5b18019 --- /dev/null +++ b/src/api/eam/equipmentSpotCheckDetail/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface EquipmentSpotCheckDetailVO { + id: number + number: string + masterId: number + completionTime: Date + uncompletedCause: string + result: string + name: string + content: string + equipmentParts: string + methods: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询点检工单子列表 +export const getEquipmentSpotCheckDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/equipment-spot-check-detail/senior', data }) + } else { + return await request.get({ url: `/eam/equipment-spot-check-detail/page`, params }) + } +} + +// 查询点检工单子详情 +export const getEquipmentSpotCheckDetail = async (id: number) => { + return await request.get({ url: `/eam/equipment-spot-check-detail/get?id=` + id }) +} + +// 新增点检工单子 +export const createEquipmentSpotCheckDetail = async (data: EquipmentSpotCheckDetailVO) => { + return await request.post({ url: `/eam/equipment-spot-check-detail/create`, data }) +} + +// 修改点检工单子 +export const updateEquipmentSpotCheckDetail = async (data: EquipmentSpotCheckDetailVO) => { + return await request.put({ url: `/eam/equipment-spot-check-detail/update`, data }) +} + +// 删除点检工单子 +export const deleteEquipmentSpotCheckDetail = async (id: number) => { + return await request.delete({ url: `/eam/equipment-spot-check-detail/delete?id=` + id }) +} + +// 导出点检工单子 Excel +export const exportEquipmentSpotCheckDetail = async (params) => { + return await request.download({ url: `/eam/equipment-spot-check-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/equipment-spot-check-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/equipmentSpotCheckMain/index.ts b/src/api/eam/equipmentSpotCheckMain/index.ts index fc4d941b5..9403acf8d 100644 --- a/src/api/eam/equipmentSpotCheckMain/index.ts +++ b/src/api/eam/equipmentSpotCheckMain/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import {EquipmentInspectionMainVO} from "@/api/eam/equipmentInspectionMain"; export interface EquipmentSpotCheckMainVO { id: number @@ -65,6 +66,11 @@ export const updateEquipmentSpotCheckMain = async (data: EquipmentSpotCheckMainV return await request.put({ url: `/eam/equipment-spot-check-main/update`, data }) } +// 修改点检工单主 +export const updateEquipmentSpotCheck = async (data: EquipmentSpotCheckMainVO) => { + return await request.post({ url: `/eam/equipment-spot-check-main/updateOrders`, data }) +} + // 删除点检工单主 export const deleteEquipmentSpotCheckMain = async (id: number) => { return await request.delete({ url: `/eam/equipment-spot-check-main/delete?id=` + id }) @@ -78,4 +84,20 @@ export const exportEquipmentSpotCheckMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/equipment-spot-check-main/get-import-template' }) -} \ No newline at end of file +} + + +// 修改点检工单状态 +export const updateEquipmentSpotCheckOrder = async (data: EquipmentSpotCheckMainVO) => { + return await request.post({ url: `/eam/equipment-spot-check-main/updateOrder`, data }) +} + +//完成点检工单 +export const executeEquipmentSpotCheckOrder = async (data: EquipmentSpotCheckMainVO) => { + return await request.post({ url: `/eam/equipment-spot-check-main/execute`, data }) +} + +//验证不通过,打回点检工单 +export const backEquipmentSpotCheckOrder = async (data: EquipmentSpotCheckMainVO) => { + return await request.post({ url: `/eam/equipment-spot-check-main/fallback`, data }) +} diff --git a/src/api/eam/relationSpotCheckPlanItem/index.ts b/src/api/eam/relationSpotCheckPlanItem/index.ts new file mode 100644 index 000000000..7293e4713 --- /dev/null +++ b/src/api/eam/relationSpotCheckPlanItem/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface RelationSpotCheckPlanItemVO { + id: number + planNumber: string + itemCode: string + itemName: string + isSelectd: boolean + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询点检计划表和巡检项关系列表 +export const getRelationSpotCheckPlanItemPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/relation-spot-check-plan-item/senior', data }) + } else { + return await request.get({ url: `/eam/relation-spot-check-plan-item/page`, params }) + } +} + +// 查询点检计划表和巡检项关系详情 +export const getRelationSpotCheckPlanItem = async (id: number) => { + return await request.get({ url: `/eam/relation-spot-check-plan-item/get?id=` + id }) +} + +// 新增点检计划表和巡检项关系 +export const createRelationSpotCheckPlanItem = async (data: RelationSpotCheckPlanItemVO) => { + return await request.post({ url: `/eam/relation-spot-check-plan-item/create`, data }) +} + +// 修改点检计划表和巡检项关系 +export const updateRelationSpotCheckPlanItem = async (data: RelationSpotCheckPlanItemVO) => { + return await request.put({ url: `/eam/relation-spot-check-plan-item/update`, data }) +} + +// 删除点检计划表和巡检项关系 +export const deleteRelationSpotCheckPlanItem = async (id: number) => { + return await request.delete({ url: `/eam/relation-spot-check-plan-item/delete?id=` + id }) +} + +// 导出点检计划表和巡检项关系 Excel +export const exportRelationSpotCheckPlanItem = async (params) => { + return await request.download({ url: `/eam/relation-spot-check-plan-item/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/relation-spot-check-plan-item/get-import-template' }) +} diff --git a/src/views/eam/equipmentInspectionDetail/equipmentInspectionDetail.data.ts b/src/views/eam/equipmentInspectionDetail/equipmentInspectionDetail.data.ts index 9ae61c6b6..cb52a81a8 100644 --- a/src/views/eam/equipmentInspectionDetail/equipmentInspectionDetail.data.ts +++ b/src/views/eam/equipmentInspectionDetail/equipmentInspectionDetail.data.ts @@ -109,18 +109,21 @@ export const EquipmentInspectionDetail = useCrudSchemas(reactive([ } } }, - // { - // label: '巡检内容', - // field: 'content', - // sort: 'custom', - // isSearch: true, - // form: { - // componentProps: { - // type:"textarea", - // maxlength:"100" - // } - // } - // }, + { + label: '巡检内容', + field: 'content', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + componentProps: { + type:"textarea", + maxlength:"100" + } + } + }, { label: '创建时间', field: 'createTime', diff --git a/src/views/eam/equipmentInspectionMain/index.vue b/src/views/eam/equipmentInspectionMain/index.vue index 1f5982cf0..1281c38df 100644 --- a/src/views/eam/equipmentInspectionMain/index.vue +++ b/src/views/eam/equipmentInspectionMain/index.vue @@ -94,11 +94,6 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; import * as ToolItemApi from "@/api/eam/toolAccounts"; -import * as EquipmentMaintenanceMainApi from "@/api/eam/equipmentMaintenanceMain"; -import { - executeEquipmentInspectionOrder, - updateEquipmentInspectionOrder -} from "@/api/eam/equipmentInspectionMain"; defineOptions({ name: 'EquipmentInspectionMain' }) @@ -135,8 +130,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentInspectionMain:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentInspectionMain:import'}), // 导入 + //defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentInspectionMain:create'}), // 新增 + //defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentInspectionMain:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentInspectionMain:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 @@ -183,16 +178,24 @@ const isShowStatusButton = (row,val) => { } } +const isShowEditStatusButton = (row) => { + if (row.status == "3" || row.status == "4") { + return false + } else { + return true + } +} + // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentInspectionMain:update'}), // 编辑 - defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 接单 - defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 执行 - defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 完成巡检 - defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 验证 - defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentMaintenanceMain:update'}), - defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:equipmentMaintenanceMain:update'}), + defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentInspectionMain:update'}), // 编辑 + defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentInspectionMain:update'}), // 接单 + defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentInspectionMain:update'}), // 执行 + defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentInspectionMain:update'}), // 完成巡检 + defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentInspectionMain:update'}), // 验证 + //defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentInspectionMain:update'}), + //defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:equipmentInspectionMain:update'}), ] } @@ -223,6 +226,32 @@ const handleMainFefresh = async()=>{ /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type == "create"){ + EquipmentInspectionMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'number'){ + item.componentProps.disabled = false + } + if(item.field == 'planNumber'){ + item.componentProps.disabled = false + } + if(item.field == 'status'){ + item.value = '3'; + item.componentProps.disabled = true + } + }) + }else{ + EquipmentInspectionMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'number'){ + item.componentProps.disabled = true + } + if(item.field == 'planNumber'){ + item.componentProps.disabled = true + } + if(item.field == 'status'){ + item.componentProps.disabled = true + } + }) + } basicFormRef.value.open(type, row) } diff --git a/src/views/eam/equipmentMaintenanceMain/index.vue b/src/views/eam/equipmentMaintenanceMain/index.vue index 11172f5eb..a644987de 100644 --- a/src/views/eam/equipmentMaintenanceMain/index.vue +++ b/src/views/eam/equipmentMaintenanceMain/index.vue @@ -186,10 +186,18 @@ const isShowStatusButton = (row,val) => { } } +const isShowEditStatusButton = (row) => { + if (row.status == "3" || row.status == "4") { + return false + } else { + return true + } +} + // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceMain:update'}), // 编辑 + defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 编辑 defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 接单 defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 执行 defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // 完成保养 @@ -227,13 +235,25 @@ const basicFormRef = ref() const openForm = (type: string, row?: any) => { if(type == "create"){ EquipmentMaintenanceMain.allSchemas.formSchema.forEach((item) => { - if(item.field == 'status'){ - item.value = '0'; + if(item.field == 'number'){ + item.componentProps.disabled = false + } + if(item.field == 'planNumber'){ + item.componentProps.disabled = false + } + if(item.field == 'status'){ + item.value = '3'; item.componentProps.disabled = true } }) }else{ EquipmentMaintenanceMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'number'){ + item.componentProps.disabled = true + } + if(item.field == 'planNumber'){ + item.componentProps.disabled = true + } if(item.field == 'status'){ item.componentProps.disabled = true } diff --git a/src/views/eam/equipmentSpotCheckDetail/equipmentSpotCheckDetail.data.ts b/src/views/eam/equipmentSpotCheckDetail/equipmentSpotCheckDetail.data.ts new file mode 100644 index 000000000..2fe8356fe --- /dev/null +++ b/src/views/eam/equipmentSpotCheckDetail/equipmentSpotCheckDetail.data.ts @@ -0,0 +1,257 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as ItemApi from "@/api/eam/relationSpotCheckPlanItem" +import { + RelationSpotCheckPlanItem +} from "@/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data"; + +// 表单校验 +export const EquipmentSpotCheckDetailRules = reactive({ + number: [required], + masterId: [required], + name: [required], + uncompletedCause:[{ + required:false , + message:'该项为必填项', + tagger:['blur','change'] + }], + result: [ + { + required:false , + message:'该项为必填项', + tagger:['blur'] + }], +}) + +export const EquipmentSpotCheckDetail = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '点检工单号', + field: 'number', + sort: 'custom', + isSearch: true, + form:{ + componentProps: { + disabled: true + } + } + }, + { + label: '主表id', + field: 'masterId', + sort: 'custom', + isSearch: true, + form:{ + componentProps: { + disabled: 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: 'uncompletedCause', + sort: 'custom', + isSearch: true, + }, + { + label: '结果枚举', + field: 'result', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.IS_COMPLETED, + dictClass: 'string' + }, + { + label: '点检项名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: true, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择 非必选点检项', + searchTitle: '非必选点检项信息', // 查询弹窗标题 + searchAllSchemas: RelationSpotCheckPlanItem.allSchemas, // 查询弹窗所需类 + searchField: 'itemName', // 查询弹窗赋值字段 + searchPage: ItemApi.getRelationSpotCheckPlanItemPage, // 查询弹窗所需分页方法 + searchCondition: [] + } + } + }, + { + label: '点检内容自动带出', + field: 'content', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + component: 'Editor', + componentProps: { + valueHtml: '', + height: 200 + } + }, + }, + { + label: '点检部位自动带出', + field: 'equipmentParts', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '点检方法自动带出', + field: 'methods', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '创建时间', + field: 'createTime', + 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')] + } + }, + isForm: false, + }, + { + label: '部门id', + field: 'departmentCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '是否可用默认TRUE', + field: 'available', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + 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/equipmentSpotCheckDetail/index.vue b/src/views/eam/equipmentSpotCheckDetail/index.vue new file mode 100644 index 000000000..3db57c929 --- /dev/null +++ b/src/views/eam/equipmentSpotCheckDetail/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue b/src/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue new file mode 100644 index 000000000..6c175bcfc --- /dev/null +++ b/src/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue @@ -0,0 +1,1055 @@ + + + + + diff --git a/src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts b/src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts index 377dcf90f..c0e4b8e4c 100644 --- a/src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts +++ b/src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts @@ -2,6 +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 {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data"; +import * as BasicFaultTypeApi from "@/api/eam/basicFaultType"; import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; import * as WorkshopApi from "@/api/wms/workshop"; @@ -25,11 +27,19 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ isDetail:false, }, { - label: '工单编号', + label: '点检工单', field: 'number', sort: 'custom', isSearch: true, }, + { + label: '来源字典', + field: 'sources', + sort: 'custom', + dictType: DICT_TYPE.EAM_SPOTCHECK_SOURCES, + dictClass: 'string', + isSearch: false, + }, { label: '点检描述', field: 'describing', @@ -74,7 +84,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ isSearch: false, }, { - label: '计划工单号', + label: '点检计划工单号', field: 'planNumber', sort: 'custom', isSearch: true, @@ -171,16 +181,32 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ label: '故障类型枚举', field: 'faultType', sort: 'custom', - dictType: DICT_TYPE.FAILURE_REASON, - dictClass: 'string', isSearch: true, - isSearch: false, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择故障类型', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '故障类型信息', // 查询弹窗标题 + searchAllSchemas: BasicFaultType.allSchemas, // 查询弹窗所需类 + searchPage: BasicFaultTypeApi.getBasicFaultTypePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, }, { label: '验证人', field: 'verifyer', sort: 'custom', isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, }, { label: '验证内容', @@ -215,10 +241,12 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ field: 'maintenancer', sort: 'custom', isSearch: false, - form: { - component: 'InputNumber', - value: 0 - }, + }, + { + label: '点检人电话', + field: 'maintenancePhone', + sort: 'custom', + isSearch: false, }, { label: '完成时间', @@ -318,13 +346,16 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ label: '班组类型', field: 'classType', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '所属厂区编号', field: 'factoryAreaCode', sort: 'custom', isSearch: false, + isTable: false, + isForm: false, + isDetail:false, }, { label: '车间编号', @@ -404,6 +435,160 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ 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: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + 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' + } + } +])) + + +export const RelationSpotCheckPlanItemRules = reactive({ + planNumber: [required], + itemCode: [required], + itemName: [required], + concurrencyStamp: [required], +}) + +export const RelationSpotCheckPlanItem = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '计划编号', + field: 'planNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '项编号', + field: 'itemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '项名称', + field: 'itemName', + sort: 'custom', + isSearch: true, + }, + { + label: '是否必选', + field: 'isSelectd', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.FALSE_OR_TRUE, + dictClass: 'string', + }, + { + label: '创建时间', + field: 'createTime', + 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')] + } + }, + isForm: false, + }, + { + label: '部门id', + field: 'departmentCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, { label: '备注', field: 'remark', diff --git a/src/views/eam/equipmentSpotCheckMain/finishForm1.vue b/src/views/eam/equipmentSpotCheckMain/finishForm1.vue new file mode 100644 index 000000000..a5acf0fb5 --- /dev/null +++ b/src/views/eam/equipmentSpotCheckMain/finishForm1.vue @@ -0,0 +1,144 @@ + + + + diff --git a/src/views/eam/equipmentSpotCheckMain/finishForm2.vue b/src/views/eam/equipmentSpotCheckMain/finishForm2.vue new file mode 100644 index 000000000..0894c57b3 --- /dev/null +++ b/src/views/eam/equipmentSpotCheckMain/finishForm2.vue @@ -0,0 +1,151 @@ + + + + diff --git a/src/views/eam/equipmentSpotCheckMain/index.vue b/src/views/eam/equipmentSpotCheckMain/index.vue index e7a54ca45..09f3d6cdd 100644 --- a/src/views/eam/equipmentSpotCheckMain/index.vue +++ b/src/views/eam/equipmentSpotCheckMain/index.vue @@ -33,7 +33,7 @@ @@ -48,10 +48,30 @@ :apiCreate="EquipmentSpotCheckMainApi.createEquipmentSpotCheckMain" @searchTableSuccess="searchTableSuccess" :isBusiness="false" + @onChange="onChange" /> + + + - + @@ -60,11 +80,23 @@