From e2703668fc5850d8992f75612ddce7aa849f5332 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Sun, 18 Feb 2024 15:59:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=85=B7=E9=99=A4=E5=8F=B0=E8=B4=A6?= =?UTF-8?q?=E5=A4=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../device/deviceMaintainOrderMain/index.ts | 8 +- .../eam/device/deviceMaintenanceMain/index.ts | 2 +- src/api/eam/mold/moldAccounts/index.ts | 5 + .../eam/mold/moldMaintainOrderMain/index.ts | 14 +- src/api/eam/mold/moldMaintenanceMain/index.ts | 23 +- src/components/Detail/src/Detail.vue | 2 +- .../deviceMaintainOrderMain.data.ts | 82 ++- .../device/deviceMaintainOrderMain/index.vue | 11 +- .../deviceMaintainPlan.data.ts | 111 ++-- .../deviceMaintenanceMain.data.ts | 7 +- .../eam/mold/moldInspectionMain/index.vue | 301 +++++++++-- .../moldInspectionMain.data.ts | 473 ++++++++++++++++-- .../eam/mold/moldMaintainOrderMain/index.vue | 425 ++++++++++++---- .../moldMaintainOrderMain.data.ts | 447 +++++++++++++++-- .../moldMaintainPlan/moldMaintainPlan.data.ts | 111 ++-- .../eam/mold/moldMaintenanceMain/index.vue | 406 +++++++++++---- .../moldMaintenanceMain.data.ts | 301 +++++++++-- src/views/eam/mold/moldRepair/index.vue | 107 ++-- .../eam/mold/moldRepair/moldRepair.data.ts | 167 +++++-- 20 files changed, 2423 insertions(+), 581 deletions(-) diff --git a/.gitignore b/.gitignore index aed17d0..09d8698 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ auto-*.d.ts /eam/ /eam eam +.vscode/ diff --git a/src/api/eam/device/deviceMaintainOrderMain/index.ts b/src/api/eam/device/deviceMaintainOrderMain/index.ts index 46ce24a..9c36da2 100644 --- a/src/api/eam/device/deviceMaintainOrderMain/index.ts +++ b/src/api/eam/device/deviceMaintainOrderMain/index.ts @@ -62,4 +62,10 @@ export const importTemplate = () => { // 保养接单 export const orderClick = (id: number) => { return request.get({ url: '/eam/device-maintain-order-main/orderClick?id=' + id }) -} \ No newline at end of file +} + +// 保养完成 +export const orderClickFinish = (id: number) => { + return request.get({ url: '/eam/device-maintain-order-main/orderClickFinish?id=' + id }) +} + diff --git a/src/api/eam/device/deviceMaintenanceMain/index.ts b/src/api/eam/device/deviceMaintenanceMain/index.ts index b12afb2..3e0576e 100644 --- a/src/api/eam/device/deviceMaintenanceMain/index.ts +++ b/src/api/eam/device/deviceMaintenanceMain/index.ts @@ -18,6 +18,7 @@ export interface DeviceMaintenanceMainVO { // 查询维修工单主列表 export const getDeviceMaintenanceMainPage = async (params) => { + params.type = 'DEVICE' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -41,7 +42,6 @@ export const createDeviceMaintenanceMain = async (data: DeviceMaintenanceMainVO) export const updateDeviceMaintenanceMain = async (data: DeviceMaintenanceMainVO) => { return await request.put({ url: `/eam/device-maintenance-main/update`, data }) } - // 删除维修工单主 export const deleteDeviceMaintenanceMain = async (id: number) => { return await request.delete({ url: `/eam/device-maintenance-main/delete?id=` + id }) diff --git a/src/api/eam/mold/moldAccounts/index.ts b/src/api/eam/mold/moldAccounts/index.ts index 09130c3..222e4ed 100644 --- a/src/api/eam/mold/moldAccounts/index.ts +++ b/src/api/eam/mold/moldAccounts/index.ts @@ -59,4 +59,9 @@ export const exportMoldAccounts = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/mold-accounts/get-import-template' }) +} + +// 查询模型台账列表 +export const getMoldAccountsNoPage = async (params) => { + return await request.get({ url: `/eam/mold-accounts/selectData`, params }) } \ No newline at end of file diff --git a/src/api/eam/mold/moldMaintainOrderMain/index.ts b/src/api/eam/mold/moldMaintainOrderMain/index.ts index 68593a8..7005400 100644 --- a/src/api/eam/mold/moldMaintainOrderMain/index.ts +++ b/src/api/eam/mold/moldMaintainOrderMain/index.ts @@ -18,7 +18,6 @@ export interface MoldMaintainOrderMainVO { available: string concurrencyStamp: number } - // 查询保养工单主列表 export const getMoldMaintainOrderMainPage = async (params) => { if (params.isSearch) { @@ -58,4 +57,15 @@ export const exportMoldMaintainOrderMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/device-maintain-order-main/get-import-template' }) -} \ No newline at end of file +} + +// 保养接单 +export const orderClick = (id: number) => { + return request.get({ url: '/eam/device-maintain-order-main/orderClick?id=' + id }) +} + +// 保养完成 +export const orderClickFinish = (id: number) => { + return request.get({ url: '/eam/device-maintain-order-main/orderClickFinish?id=' + id }) +} + diff --git a/src/api/eam/mold/moldMaintenanceMain/index.ts b/src/api/eam/mold/moldMaintenanceMain/index.ts index 8e429f3..472b933 100644 --- a/src/api/eam/mold/moldMaintenanceMain/index.ts +++ b/src/api/eam/mold/moldMaintenanceMain/index.ts @@ -1,6 +1,7 @@ import request from '@/config/axios' export interface MoldMaintenanceMainVO { + id: number number: string requestNumber: string describe: string @@ -17,6 +18,7 @@ export interface MoldMaintenanceMainVO { // 查询维修工单主列表 export const getMoldMaintenanceMainPage = async (params) => { + params.type = 'MOLD' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -33,14 +35,13 @@ export const getMoldMaintenanceMain = async (id: number) => { // 新增维修工单主 export const createMoldMaintenanceMain = async (data: MoldMaintenanceMainVO) => { - return await request.post({ url: `/eam/device-maintenance-main/create`, data }) + return await request.post({ url: `/eam/device-maintenance-main/createPC`, data }) } // 修改维修工单主 export const updateMoldMaintenanceMain = async (data: MoldMaintenanceMainVO) => { return await request.put({ url: `/eam/device-maintenance-main/update`, data }) } - // 删除维修工单主 export const deleteMoldMaintenanceMain = async (id: number) => { return await request.delete({ url: `/eam/device-maintenance-main/delete?id=` + id }) @@ -54,4 +55,20 @@ export const exportMoldMaintenanceMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/device-maintenance-main/get-import-template' }) -} \ No newline at end of file +} + +// 修改维修工单主 +export const orderStepChange = async (data: MoldMaintenanceMainVO) => { + return await request.get({ url: `/eam/device-maintenance-main/orderClick?number=`+data.number+`&status=`+data.status+`&id=`+data.id+`&requestNumber=`+data.requestNumber }) +} + +// 修改维修工单主 +export const orderTurnTo = async (data: MoldMaintenanceMainVO) => { + return await request.get({ url: `/eam/device-maintenance-main/turnTo?deviceNumber=`+data.deviceNumber +`&id=`+data.id + `&receiverType=`+ data.type +`&receiverUserId=` + data.maintenance }) +} + + +// 查询维修工单主列表不分页 +export const getMoldMainTempList = async (type: String) => { + return await request.get({ url: `/eam/device-maintenance-main/getList?type=` + type }) +} diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 40478d6..b7bed4b 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -336,7 +336,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: // masterParmas.value.number = row.number // masterParmas.value.status = row.status tableObjectRef.value.params = { - maintenanceNumber: row.number + number: row.number } await getList() } diff --git a/src/views/eam/device/deviceMaintainOrderMain/deviceMaintainOrderMain.data.ts b/src/views/eam/device/deviceMaintainOrderMain/deviceMaintainOrderMain.data.ts index a500a68..190ce4a 100644 --- a/src/views/eam/device/deviceMaintainOrderMain/deviceMaintainOrderMain.data.ts +++ b/src/views/eam/device/deviceMaintainOrderMain/deviceMaintainOrderMain.data.ts @@ -33,6 +33,9 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, + table: { + width: '150', + }, }, // { // label: '名称', @@ -45,12 +48,18 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ field: 'planNumber', sort: 'custom', isSearch: true, + table: { + width: '150', + }, }, { label: '设备/模具', field: 'deviceNumber', sort: 'custom', isSearch: false, + table: { + width: '150', + }, }, { label: '厂区编号', @@ -90,20 +99,41 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ } }, { - label: '工程师', - field: 'engineer', + label: '状态', + field: 'status', sort: 'custom', - isSearch: false, + isSearch: true, + table: { + width: '150', + }, form: { - component: 'InputNumber', - value: 0 + component: 'Radio' + }, + dictType: DICT_TYPE.WEI_XIU_ORDER_STATUS, + dictClass: 'string', + }, + { + label: '类型', + field: 'type', + sort: 'custom', + isSearch: true, + table: { + width: '150', }, + form: { + component: 'Select' + }, + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', }, { label: '接单时间', field: 'receiveTime', sort: 'custom', isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -113,11 +143,28 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ } }, }, + { + label: '工程师', + field: 'engineer', + sort: 'custom', + isSearch: false, + table: { + width: '150', + }, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { label: '指派时间', field: 'assignTime', sort: 'custom', isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -132,6 +179,9 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ field: 'finishedTime', sort: 'custom', isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -146,6 +196,9 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ field: 'verifyTime', sort: 'custom', isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -155,24 +208,7 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ } }, }, - { - label: '状态', - field: 'status', - sort: 'custom', - isSearch: true, - form: { - component: 'Radio' - }, - }, - { - label: '类型', - field: 'type', - sort: 'custom', - isSearch: true, - form: { - component: 'Select' - }, - }, + // { // label: '创建时间', // field: 'createTime', diff --git a/src/views/eam/device/deviceMaintainOrderMain/index.vue b/src/views/eam/device/deviceMaintainOrderMain/index.vue index d47d46d..20d3052 100644 --- a/src/views/eam/device/deviceMaintainOrderMain/index.vue +++ b/src/views/eam/device/deviceMaintainOrderMain/index.vue @@ -271,7 +271,9 @@ const buttonTableClick = async (val, row) => { acceptOrder(row) } else if (val == 'turnOrder') { openForm('turnOrder', row) - } + } else if (val == 'finishOrder') { + finishOrder(row) + } } /** 添加/修改操作 */ @@ -350,7 +352,12 @@ function acceptOrder(row) { // 转办 function turnOrder() {} // 完成 -function finishOrder() {} +function finishOrder(row) { + DeviceMaintainOrderMainApi.orderClickFinish(row.id).then(() => { + message.success('完成保养') + getList(); + }); +} // 验证 function verifyOrder() {} // 维修 diff --git a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts index 335c015..4ba599d 100644 --- a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts +++ b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts @@ -23,70 +23,75 @@ export const DeviceMaintainPlan = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, - { - label: '保养类型', - field: 'maintenanceType', - sort: 'custom', - form: { - component: 'Select' - }, - }, + // { + // label: '保养类型', + // field: 'maintenanceType', + // sort: 'custom', + // form: { + // component: 'Select' + // }, + // }, { label: '设备执行周期、半年、年', field: 'cycle', sort: 'custom', + dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE, + dictClass: 'string', }, - { - label: '次数', - field: 'times', - sort: 'custom', - form: { - component: 'InputNumber', - value: 0 - }, - }, + // { + // label: '次数', + // field: 'times', + // sort: 'custom', + // form: { + // component: 'InputNumber', + // value: 0 + // }, + // }, { label: '类型', field: 'type', sort: 'custom', isSearch: true, - form: { - component: 'Select' - }, - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - }, - { - label: '地点ID', - field: 'siteId', - sort: 'custom', - }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', form: { - component: 'InputNumber', - value: 0 + component: 'Select' }, + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } + // { + // label: '创建时间', + // field: 'createTime', + // sort: 'custom', + // formatter: dateFormatter, + // isForm: false, + // }, + // { + // label: '地点ID', + // field: 'siteId', + // sort: 'custom', + // }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // }, + // { + // label: '并发乐观锁', + // field: 'concurrencyStamp', + // sort: 'custom', + // form: { + // component: 'InputNumber', + // value: 0 + // }, + // }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // }, + // isTable: false + // } ])) diff --git a/src/views/eam/device/deviceMaintenanceMain/deviceMaintenanceMain.data.ts b/src/views/eam/device/deviceMaintenanceMain/deviceMaintenanceMain.data.ts index a99ab68..150946a 100644 --- a/src/views/eam/device/deviceMaintenanceMain/deviceMaintenanceMain.data.ts +++ b/src/views/eam/device/deviceMaintenanceMain/deviceMaintenanceMain.data.ts @@ -131,13 +131,13 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ } }, { - label: '类型设备', + label: '类型', field: 'type', sort: 'custom', table: { width: '150', }, - isSearch: true, + isSearch: false, isForm: true, dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', @@ -147,6 +147,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ disabled: true, } }, + search: { + value: 'DEVICE' + } }, { label: '班次', diff --git a/src/views/eam/mold/moldInspectionMain/index.vue b/src/views/eam/mold/moldInspectionMain/index.vue index 25939f7..fd8b2a0 100644 --- a/src/views/eam/mold/moldInspectionMain/index.vue +++ b/src/views/eam/mold/moldInspectionMain/index.vue @@ -4,64 +4,87 @@ - - + + - - diff --git a/src/views/eam/mold/moldMaintainOrderMain/moldMaintainOrderMain.data.ts b/src/views/eam/mold/moldMaintainOrderMain/moldMaintainOrderMain.data.ts index 3842d9c..d1a8581 100644 --- a/src/views/eam/mold/moldMaintainOrderMain/moldMaintainOrderMain.data.ts +++ b/src/views/eam/mold/moldMaintainOrderMain/moldMaintainOrderMain.data.ts @@ -1,12 +1,26 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { selectAllFactoryArea } from '@/api/system/dept' +import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts' +import { useUserStore } from '@/store/modules/user' +import { selecUserByType } from '@/api/system/dept' +import * as MoldMaintenanceMainApi from '@/api/eam/mold/moldMaintenanceMain' import { dateFormatter } from '@/utils/formatTime' +import { ItemSearchTable } from '../../basic/item/item.data' +import * as ItemApi from '@/api/eam/basic/item' +const userStore = useUserStore() +const factoryList = await selectAllFactoryArea() +const moldList = await MoldAccountsApi.getMoldAccountsNoPage({}) +const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: undefined, flag: 1 }) +const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: undefined, flag: undefined }) +const engineerList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: undefined, flag: 2}) +const repairList = await MoldMaintenanceMainApi.getMoldMainTempList('MOLD') // 表单校验 export const MoldMaintainOrderMainRules = reactive({ number: [required], name: [required], planNumber: [required], - deviceNumber: [required], + moldNumber: [required], factoryAreaNumber: [required], status: [required], type: [required], @@ -15,46 +29,111 @@ export const MoldMaintainOrderMainRules = reactive({ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ { - label: '编号唯一标识', + label: '保养单号', field: 'number', sort: 'custom', isSearch: true, + table: { + width: '150', + }, }, - { - label: '名称', - field: 'name', - sort: 'custom', - isSearch: true, - }, + // { + // label: '名称', + // field: 'name', + // sort: 'custom', + // isSearch: true, + // }, { label: '保养计划单号', field: 'planNumber', sort: 'custom', + isSearch: true, + table: { + width: '150', + }, }, { - label: '设备/模具编号', - field: 'deviceNumber', + label: '设备/模具', + field: 'moldNumber', sort: 'custom', - isSearch: true, + isSearch: false, + table: { + width: '150', + }, }, { label: '厂区编号', field: 'factoryAreaNumber', sort: 'custom', + table: { + width: '150', + }, + api: () => factoryList, + formatter: (_: Recordable, __: TableColumn, cellValue: String) => { + return factoryList.find((account) => account.id == cellValue)?.name + }, + search: { + show: true, + component: 'Select', + api: () => factoryList, + componentProps: { + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + }, + form: { + component: 'Select', + api: () => factoryList, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + }, + placeholder: "请先选择设备" + }, + }, + detail: { + } }, { - label: '工程师id', - field: 'engineer', + label: '状态', + field: 'status', sort: 'custom', + isSearch: true, + table: { + width: '150', + }, form: { - component: 'InputNumber', - value: 0 + component: 'Radio' }, + dictType: DICT_TYPE.WEI_XIU_ORDER_STATUS, + dictClass: 'string', + }, + { + label: '类型', + field: 'type', + sort: 'custom', + isSearch: true, + table: { + width: '150', + }, + form: { + component: 'Select' + }, + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', }, { label: '接单时间', field: 'receiveTime', sort: 'custom', + isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -64,10 +143,28 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ } }, }, + { + label: '工程师', + field: 'engineer', + sort: 'custom', + isSearch: false, + table: { + width: '150', + }, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { label: '指派时间', field: 'assignTime', sort: 'custom', + isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -77,19 +174,14 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ } }, }, - { - label: '工程师id', - field: 'worker', - sort: 'custom', - form: { - component: 'InputNumber', - value: 0 - }, - }, { label: '完成时间', field: 'finishedTime', sort: 'custom', + isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -103,6 +195,10 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ label: '验证时间', field: 'verifyTime', sort: 'custom', + isSearch: false, + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -112,58 +208,302 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ } }, }, + + // { + // label: '创建时间', + // field: 'createTime', + // sort: 'custom', + // formatter: dateFormatter, + // isSearch: 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: 'siteId', + // sort: 'custom', + // isSearch: false, + // }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // isSearch: false, + // }, + // { + // label: '并发乐观锁', + // field: 'concurrencyStamp', + // sort: 'custom', + // form: { + // component: 'InputNumber', + // value: 0 + // }, + // }, { - label: '状态', - field: 'status', + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + }, + isDetail: false, + } +])) + + + +// 表单校验 +export const MoldMaintainOrderDetailRules = reactive({ + concurrencyStamp: [required], + name: [required], + number: [required], + peoples: [required], + estimatedMinutes: [required], + actualMinutes: [required], + chargePeoples: [required], + completionTime: [required], + engineer: [required] +}) + +export const MoldMaintainOrderDetail = useCrudSchemas(reactive([ + + { + label: '保养工单号', + field: 'number', sort: 'custom', isSearch: true, form: { - component: 'Radio' + component: 'Input', + componentProps: { + disabled: true, + } }, }, { - label: '类型', - field: 'type', + label: '人数', + field: 'peoples', sort: 'custom', - isSearch: true, - form: { - component: 'Select' - }, + isSearch: false, + form: { + component: 'InputNumber', + }, + isTable: true, + tableForm: { + type: 'InputNumber', + }, }, { - label: '创建时间', - field: 'createTime', + label: '预计分钟', + field: 'estimatedMinutes', sort: 'custom', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', + table: { + width: '150', + }, + isSearch: false, + isTable: true, + form: { + component: 'Input', + }, + }, + { + label: '实际分钟', + field: 'actualMinutes', + sort: 'custom', + table: { + width: '150', + }, + isSearch: false, + isTable: true, + form: { + component: 'Input', + }, + }, + { + label: '责任人多选', + field: 'chargePeoples', + sort: 'custom', + table: { + width: '150', + }, + tableForm: { + type: 'Select', + initOptions: userList, + multiple:true, + collapseTags:true, + collapseTagsTooltip:true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + }, + api: () => dutyUserList, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + + return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') + }, + form: { + component: 'Select', + api: () => dutyUserList, componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + disabled: false, + optionsAlias: { + labelField: 'name', + valueField: 'id' + }, + placeholder: "请选择责任人", + multiple: true, + }, + } + }, + { + label: '是否完成', + field: 'status', + sort: 'custom', + table: { + width: '150', + }, + isSearch: false, + isTable: true, + dictType: DICT_TYPE.JX_DETAILS_STATUS, + dictClass: 'string', + form: { + component: 'Select', + componentProps: { + disabled: false, + } + }, + tableForm: { + type: 'Select', + componentProps: { + disabled: false, } }, - isForm: false, }, { - label: '地点ID', - field: 'siteId', + label: '未完成原因', + field: 'uncompleted', sort: 'custom', + isSearch: false, + isTable: true, + form: { + component: 'Input', + componentProps: { + type:'textarea' + } + } }, { - label: '是否可用', - field: 'available', + label: '维修内容', + field: 'contents', sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + disabled: true, + } + } }, { - label: '并发乐观锁', - field: 'concurrencyStamp', + label: '备件', + field: 'itemNumbers1', sort: 'custom', + table: { + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择备件', + searchField: 'itemNumbers1', + searchTitle: '备件', + multiple:true, + searchAllSchemas: ItemSearchTable.allSchemas, + searchPage: ItemApi.getItemList, + tableSelectionChange: (value) => { + console.log('value', value) + // tableData.value.itemNumbers1 = value.map(item => item.itemNumber) + }, + searchCondition: [{ + key: 'moldNumber', + value: 'moldNumber', + message: '请选择设备模具编号!', + isMainValue: true + }] + }, form: { - component: 'InputNumber', - value: 0 + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择备件', // 输入框占位文本 + searchField: 'itemNumbers1', // 查询弹窗赋值字段 + searchTitle: '备件', // 查询弹窗标题 + multiple:true, + searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类 + searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'moldNumber', + value: 'moldNumber', + message: '请选择设备模具编号!', + isMainValue: true + }] + } + }, + isSearch: false, + }, + { + label: '备件1', + field: 'itemNumbers', + sort: 'custom', + table: { }, + isForm:false, + isDetail:false, + isTable:false, + isSearch: false, + isTableForm: false, + }, + { + 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: 'engineer', + sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + type:'TextArea' + } + } }, { label: '操作', @@ -172,6 +512,9 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ table: { width: 150, fixed: 'right' - } + }, + isDetail: false, + isTableForm: false, } ])) + diff --git a/src/views/eam/mold/moldMaintainPlan/moldMaintainPlan.data.ts b/src/views/eam/mold/moldMaintainPlan/moldMaintainPlan.data.ts index b992252..509ecbd 100644 --- a/src/views/eam/mold/moldMaintainPlan/moldMaintainPlan.data.ts +++ b/src/views/eam/mold/moldMaintainPlan/moldMaintainPlan.data.ts @@ -23,70 +23,75 @@ export const MoldMaintainPlan = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, - { - label: '保养类型', - field: 'maintenanceType', - sort: 'custom', - form: { - component: 'Select' - }, - }, + // { + // label: '保养类型', + // field: 'maintenanceType', + // sort: 'custom', + // form: { + // component: 'Select' + // }, + // }, { label: '设备执行周期、半年、年', field: 'cycle', sort: 'custom', + dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE, + dictClass: 'string', }, - { - label: '次数', - field: 'times', - sort: 'custom', - form: { - component: 'InputNumber', - value: 0 - }, - }, + // { + // label: '次数', + // field: 'times', + // sort: 'custom', + // form: { + // component: 'InputNumber', + // value: 0 + // }, + // }, { label: '类型', field: 'type', sort: 'custom', isSearch: true, - form: { - component: 'Select' - }, - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - }, - { - label: '地点ID', - field: 'siteId', - sort: 'custom', - }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', form: { - component: 'InputNumber', - value: 0 + component: 'Select' }, + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } + // { + // label: '创建时间', + // field: 'createTime', + // sort: 'custom', + // formatter: dateFormatter, + // isForm: false, + // }, + // { + // label: '地点ID', + // field: 'siteId', + // sort: 'custom', + // }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // }, + // { + // label: '并发乐观锁', + // field: 'concurrencyStamp', + // sort: 'custom', + // form: { + // component: 'InputNumber', + // value: 0 + // }, + // }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // }, + // isTable: false + // } ])) diff --git a/src/views/eam/mold/moldMaintenanceMain/index.vue b/src/views/eam/mold/moldMaintenanceMain/index.vue index d12672c..1a56556 100644 --- a/src/views/eam/mold/moldMaintenanceMain/index.vue +++ b/src/views/eam/mold/moldMaintenanceMain/index.vue @@ -1,18 +1,22 @@