From ac2a598d2d516d2a2d75a5eebe83f414583d3dda Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Mon, 3 Jun 2024 16:01:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E4=BF=9D?= =?UTF-8?q?=E5=85=BB=E5=B7=A5=E5=8D=95=20=E5=AE=8C=E6=88=90=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20=20=20=E4=BF=9D=E5=85=BB=E8=AE=A1=E5=88=92=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E5=AE=8C=E6=88=90=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 | 7 +- src/api/eam/maintenance/index.ts | 11 + src/hooks/web/useMessage.ts | 15 +- src/utils/dict.ts | 1 + src/utils/disposition/defaultButtons.ts | 13 ++ .../equipmentMaintenanceMain.data.ts | 79 +++---- .../{finishForm.vue => finishForm1.vue} | 18 +- .../equipmentMaintenanceMain/finishForm2.vue | 215 ++++++++++++++++++ .../eam/equipmentMaintenanceMain/index.vue | 189 ++++++++------- src/views/eam/maintenance/audiForm.vue | 142 ++++++++++++ src/views/eam/maintenance/index.vue | 101 +++++++- src/views/eam/maintenance/maintenance.data.ts | 23 +- 12 files changed, 665 insertions(+), 149 deletions(-) rename src/views/eam/equipmentMaintenanceMain/{finishForm.vue => finishForm1.vue} (89%) create mode 100644 src/views/eam/equipmentMaintenanceMain/finishForm2.vue create mode 100644 src/views/eam/maintenance/audiForm.vue diff --git a/src/api/eam/equipmentMaintenanceMain/index.ts b/src/api/eam/equipmentMaintenanceMain/index.ts index 4037defac..1a0396846 100644 --- a/src/api/eam/equipmentMaintenanceMain/index.ts +++ b/src/api/eam/equipmentMaintenanceMain/index.ts @@ -95,7 +95,12 @@ export const updateMaintenanceOrder = async (data: EquipmentMainPartVO) => { return await request.post({ url: `/eam/equipment-maintenance-main/updateOrder`, data }) } -//执行保养工单 +//完成保养工单 export const executeMaintenanceOrder = async (data: EquipmentMainPartVO) => { return await request.post({ url: `/eam/equipment-maintenance-main/execute`, data }) } + +//验证不通过,打回保养工单 +export const backMaintenanceOrder = async (data: EquipmentMainPartVO) => { + return await request.post({ url: `/eam/equipment-maintenance-main/fallback`, data }) +} diff --git a/src/api/eam/maintenance/index.ts b/src/api/eam/maintenance/index.ts index e0605fa0d..dbba47884 100644 --- a/src/api/eam/maintenance/index.ts +++ b/src/api/eam/maintenance/index.ts @@ -1,5 +1,6 @@ import request from '@/config/axios' import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet"; +import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; export interface MaintenanceVO { id: number @@ -56,6 +57,11 @@ export const updateMaintenance = async (data: MaintenanceVO) => { return await request.put({ url: `/eam/maintenance/update`, data }) } +// 修改保养计划-审核 +export const updateMaintenanceAudi = async (data: MaintenanceVO) => { + return await request.post({ url: `/eam/maintenance/updateAudi`, data }) +} + // 删除保养计划 export const deleteMaintenance = async (id: number) => { return await request.delete({ url: `/eam/maintenance/delete?id=` + id }) @@ -75,3 +81,8 @@ export const importTemplate = () => { export const updateEnableCode = async (data: MaintenanceVO) => { return await request.post({ url: `/eam/maintenance/ables` , data }) } + +// 修改计划状态 +export const updateMaintenancePlan = async (data: MaintenanceVO) => { + return await request.post({ url: `/eam/maintenance/updatePlan`, data }) +} diff --git a/src/hooks/web/useMessage.ts b/src/hooks/web/useMessage.ts index 373f39245..8bd660bcb 100644 --- a/src/hooks/web/useMessage.ts +++ b/src/hooks/web/useMessage.ts @@ -59,11 +59,20 @@ export const useMessage = () => { type: 'warning' }) }, - // 确认窗体 + // 验证窗体 confirmPassword(content: string, tip?: string) { return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), { - confirmButtonText: t('通过'), - cancelButtonText: t('不通过'), + confirmButtonText: t('验证通过'), + cancelButtonText: t('验证不通过'), + type: 'warning' + }) + }, + // 审核窗体 + confirmAudi(content: string, tip?: string) { + return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), { + distinguishCancelAndClose: true, + confirmButtonText: t('审核通过'), + cancelButtonText: t('审核不通过'), type: 'warning' }) }, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index c529779a0..d3f2f9de3 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -355,5 +355,6 @@ export enum DICT_TYPE { IS_COMPLETED = 'is_completed', //是否完成 MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期 EAM_ORDER_STATUS = 'eam_order_status', + EAM_PLAN_STATUS = 'eam_plan_status', OFF_BACK_STATUS = 'off_back_status' } diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 15fd5aa63..77d1d6bb5 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -377,6 +377,19 @@ export function mainListValidateBtn(option:any) { }) } +// 主列表-审核按钮 +export function mainListAuditingBtn(option:any) { + return __defaultBtnOption(option,{ + label: t(`ts.审核`).replace('ts.', ''), + name: 'auditing', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 主列表-绑定 export function mainListBindBtn(option:any) { return __defaultBtnOption(option,{ diff --git a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts index 717f499ca..cd1c845de 100644 --- a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts +++ b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts @@ -49,6 +49,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'sources', sort: 'custom', isSearch: true, + isSearch: false, }, { label: '设备编号', @@ -82,12 +83,14 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ dictClass: 'string', sort: 'custom', isSearch: true, + isSearch: false, }, { label: '故障类型枚举', field: 'faultType', sort: 'custom', isSearch: true, + isSearch: false, }, { label: '保养计划工单号', @@ -100,7 +103,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'planStartTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -122,7 +125,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'planEndTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -144,7 +147,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'startTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -166,7 +169,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'endTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -187,19 +190,19 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ label: '保养班组', field: 'classType', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '验证人', field: 'verifyer', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '验证内容', field: 'verifyContent', sort: 'custom', - isSearch: true, + isSearch: false, form: { component: 'Editor', componentProps: { @@ -213,7 +216,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'verifyTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -234,42 +237,20 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ label: '保养人id', field: 'maintenancer', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '保养人联系电话', field: 'maintenancePhone', sort: 'custom', - isSearch: true, + isSearch: 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: 'maintenanceTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -286,6 +267,28 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ } }, }, + // { + // 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', @@ -316,19 +319,19 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ label: '直接生成记录', field: 'directCreateRecord', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '所属厂区编号', field: 'factoryAreaCode', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '车间编号', field: 'workshopCode', sort: 'custom', - isSearch: true, + isSearch: false, required: true, form: { // labelMessage: '信息提示说明!!!', @@ -352,7 +355,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'createTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -376,7 +379,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ label: '备注', field: 'remark', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '地点ID', diff --git a/src/views/eam/equipmentMaintenanceMain/finishForm.vue b/src/views/eam/equipmentMaintenanceMain/finishForm1.vue similarity index 89% rename from src/views/eam/equipmentMaintenanceMain/finishForm.vue rename to src/views/eam/equipmentMaintenanceMain/finishForm1.vue index 3834f8f70..c50b366ad 100644 --- a/src/views/eam/equipmentMaintenanceMain/finishForm.vue +++ b/src/views/eam/equipmentMaintenanceMain/finishForm1.vue @@ -19,23 +19,12 @@ - - - - - - - - - - - - + + diff --git a/src/views/eam/equipmentMaintenanceMain/index.vue b/src/views/eam/equipmentMaintenanceMain/index.vue index fb244e15a..4db1801b9 100644 --- a/src/views/eam/equipmentMaintenanceMain/index.vue +++ b/src/views/eam/equipmentMaintenanceMain/index.vue @@ -63,7 +63,8 @@ @onChange="onChange" /> - + + { const butttondata = (row) => { return [ defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceMain:update'}), // 编辑 - defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:maintenance:update'}), // 接单 - defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:maintenance:update'}), // 执行 - defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:maintenance:update'}), // 完成保养 - defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:maintenance:update'}), // 验证 - defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenance:update'}), - defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:maintenance: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'}), ] } @@ -212,7 +213,7 @@ const buttonTableClick = async (val, row) => { } else if (val == 'finish') { // 完成 handleFinish(row) } else if (val == 'validate') { // 验证 - handleValidate(row.id) + handleValidate(row) } } @@ -345,66 +346,68 @@ const handleExecute = async (id: number) => { } /** 完成按钮操作 */ -const finishFormRef = ref() +const finishForm2Ref = ref() const handleFinish = async (row) => { - let res = await EquipmentMaintenanceMainApi.getMaintenanceOrderConfig(); - //系统配置需要验证 - if(res.remark === 'TRUE'){ - try { - // 中止的二次确认 - await message.delConfirm('是否完成所选中工单?'); - const params = ref({ - id: '', - status:'', - }) - params.value.id = row.id - params.value.status = '5' - // 发起 - await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value) - message.success(t('工单已完成')) - // 刷新列表 - await getList() - } catch {} - } - //系统配置不需要验证 - if(res.remark === 'FALSE'){ - try { - // 中止的二次确认 - await message.delConfirm('是否完成所选中工单?'); + // 二次确认 + await message.delConfirm('是否完成所选中工单?'); - //打开提交表单 - finishFormRef.value.open('update', row); + //打开提交表单 + finishForm2Ref.value.open('update', row); - } catch {} - } + //let res = await EquipmentMaintenanceMainApi.getMaintenanceOrderConfig(); + //系统配置需要验证 + // if(res.remark === 'TRUE'){ + // try { + // + // + // // // 二次确认 + // // await message.delConfirm('是否完成所选中工单?'); + // // const params = ref({ + // // id: '', + // // status:'', + // // }) + // // params.value.id = row.id + // // params.value.status = '5' + // // // 发起 + // // await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value) + // // message.success(t('工单已完成')) + // // // 刷新列表 + // // await getList() + // } catch {} + // } + // //系统配置不需要验证 + // if(res.remark === 'FALSE'){ + // try { + // // 二次确认 + // await message.delConfirm('是否完成所选中工单?'); + // + // //打开提交表单 + // finishForm2Ref.value.open('update', row); + // + // } catch {} + // } } /** 验证按钮操作 */ -const handleValidate = async (id: number) => { - try { - const params = ref({ - id: '', - status:'', - }) - // 中止的二次确认 - message.confirmPassword(t('')).then(async () => { - params.value.id = id - params.value.status = '7' - await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value) - message.success(t('工单已流转')) - // 刷新列表 - await getList() - }).catch (async () => { - params.value.id = id - params.value.status = '5' - await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value) - message.success(t('工单已流转')) - // 刷新列表 - await getList() - }) +const finishForm1Ref = ref() +const handleValidate = async (row) => { + await message.delConfirm('是否验证所选中工单?'); + message.confirmPassword(t('')).then(async () => { + // 二次确认 + //打开提交表单 + finishForm1Ref.value.open('update', row); + }).catch (async () => { + const params = ref({id: '', status:''}) + params.value.id = row.id + params.value.status = '5' + await EquipmentMaintenanceMainApi.backMaintenanceOrder(params.value) + message.success(t('工单已打回')) + // 刷新列表 + await getList() + }) + - } catch {} } /** 启用 */ @@ -529,28 +532,60 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } -const getClosed=(val)=> { - //console.log('orderday-publishClosed-200',val) +//finishForm1 关闭按钮回传 +const getClosed1=(val)=> { nextTick?.(() => { console.log(val) getList() }) } -const getData=(val)=> { - nextTick?.(async () => { - console.log(val) - const params = ref({ - id: '', - status: '', +//finishForm1 提交按钮回传 +const getData1=(val)=> { + nextTick?.(async () => { + console.log(val) + + try { + const params = ref({ + id: '', + status:'', + }) + params.value.id = val + params.value.status = '7' + await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value) + message.success(t('工单已流转')) + // 刷新列表 + await getList() + } catch {} + + } + ) +} + +//finishForm2 关闭按钮回传 +const getClosed2=(val)=> { + nextTick?.(() => { + console.log(val) + getList() + }) +} + +//finishForm2 提交按钮回传 +const getData2=(val)=> { + nextTick?.(async () => { + console.log(val) + const params = ref({ + id: '', + status: '', + }) + params.value.id = val + params.value.status = '5' + // 发起 + await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value) + message.success(t('工单已完成')) + // 刷新列表 + await getList() }) - params.value.id = val - params.value.status = '5' - // 发起 - await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value) - message.success(t('工单已完成')) - // 刷新列表 - await getList()}) } /** 初始化 **/ diff --git a/src/views/eam/maintenance/audiForm.vue b/src/views/eam/maintenance/audiForm.vue new file mode 100644 index 000000000..fa8044e86 --- /dev/null +++ b/src/views/eam/maintenance/audiForm.vue @@ -0,0 +1,142 @@ + + + + diff --git a/src/views/eam/maintenance/index.vue b/src/views/eam/maintenance/index.vue index 4f958cab5..53e6c4c68 100644 --- a/src/views/eam/maintenance/index.vue +++ b/src/views/eam/maintenance/index.vue @@ -54,6 +54,8 @@ + + @@ -66,11 +68,13 @@ 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 AudiForm from '@/views/eam/maintenance/audiForm.vue' 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' }) const message = useMessage() // 消息弹窗 @@ -144,11 +148,20 @@ const isShowMainButton = (row,val) => { } } +const isShowStatusButton = (row,val) => { + if (val.indexOf(row.status) > -1) { + return false + } else { + return true + } +} + // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn({hasPermi:'eam:maintenance:update'}), // 编辑 - //defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicInspectionOption:delete'}), // 删除 + defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:maintenance:update'}), // 编辑 + defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:maintenance:update'}), // 审核 + defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:maintenance:update'}), // 完成保养 defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenance:update'}), defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:maintenance:update'}), ] @@ -164,12 +177,29 @@ const buttonTableClick = async (val, row) => { handleEnable(row.id) } else if (val == 'disable') { handleDisable(row.id) + } else if (val == 'auditing') { // 审核 + handleAuditing(row.id) + } else if (val == 'finish') { // 完成 + handleFinish(row) } } /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type == "create"){ + Maintenance.allSchemas.formSchema.forEach((item) => { + if(item.field == 'status'){ + item.componentProps.disabled = true + } + }) + }else{ + Maintenance.allSchemas.formSchema.forEach((item) => { + if(item.field == 'status'){ + item.componentProps.disabled = false + } + }) + } basicFormRef.value.open(type, row) } @@ -216,6 +246,45 @@ const handleDelete = async (id: number) => { } catch {} } +//完成按钮 +const handleFinish = async (row) => { + message.confirmAudi(t('')).then(async () => { + //打开提交表单 + audiFormRef.value.open('update', row); + }).catch(async (action: Action) => { + if(action === 'cancel'){ + const params = ref({ + id: '', + status:'', + }) + params.value.id = row.id + params.value.status = '5' + await MaintenanceApi.updateMaintenancePlan(params.value) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } + }) +} + +//审核按钮 +const audiFormRef = ref() +const handleAuditing = async (id: number) => { + await message.delConfirm('是否审核所选中工单?'); + try { + const params = ref({ + id: '', + status:'', + }) + params.value.id = id + params.value.status = '3' + await MaintenanceApi.updateMaintenancePlan(params.value) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} + /** 启用 */ const handleEnable = async (id: number) => { try { @@ -314,6 +383,34 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +//audiForm 关闭按钮回传 +const getClosed=(val)=> { + nextTick?.(() => { + getList() + }) +} + +//audiForm 提交按钮回传 +const getData=(val)=> { + nextTick?.(async () => { + + try { + const params = ref({ + id: '', + status:'', + }) + params.value.id = val + params.value.status = '4' + await MaintenanceApi.updateMaintenancePlan(params.value) + message.success(t('计划已流转')) + // 刷新列表 + await getList() + } catch {} + + } + ) +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/eam/maintenance/maintenance.data.ts b/src/views/eam/maintenance/maintenance.data.ts index 92afca62c..9bfea7d37 100644 --- a/src/views/eam/maintenance/maintenance.data.ts +++ b/src/views/eam/maintenance/maintenance.data.ts @@ -47,7 +47,7 @@ export const Maintenance = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_TYPE, dictClass: 'string', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '设备工装编号', @@ -112,7 +112,7 @@ export const Maintenance = useCrudSchemas(reactive([ field: 'startTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -134,7 +134,7 @@ export const Maintenance = useCrudSchemas(reactive([ field: 'endTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -156,26 +156,27 @@ export const Maintenance = useCrudSchemas(reactive([ field: 'status', sort: 'custom', isSearch: true, - + dictType: DICT_TYPE.EAM_PLAN_STATUS, + dictClass: 'string', }, { label: '审核人', field: 'approver', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '审核内容', field: 'approveContent', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '审核时间', field: 'approveTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -214,7 +215,7 @@ export const Maintenance = useCrudSchemas(reactive([ label: '直接生成记录', field: 'directCreateRecord', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '所属厂区编号', @@ -229,7 +230,7 @@ export const Maintenance = useCrudSchemas(reactive([ label: '车间编号', field: 'workshopCode', sort: 'custom', - isSearch: true, + isSearch: false, required: true, form: { // labelMessage: '信息提示说明!!!', @@ -253,7 +254,7 @@ export const Maintenance = useCrudSchemas(reactive([ field: 'createTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -277,7 +278,7 @@ export const Maintenance = useCrudSchemas(reactive([ label: '备注', field: 'remark', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '地点ID', From 093924c320a7591e93a605ac3c85d478266972e3 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Mon, 3 Jun 2024 17:03:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E7=94=B3=E8=AF=B7=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 4 ++ .../supplierinvoiceRequestMain.data.ts | 47 ++++++++++++++++++- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index e73881f59..bda6f6835 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -747,7 +747,11 @@ const genRecords = async (id: number) => { // 单据打印 handleDocumentPrint(res) + }).catch(err=>{ + console.log("发起处理",err) + getLoading?.close() }) + } }).catch(err => { console.log("自检报告校验异常",err) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 1ed0e3075..a5ca1b66f 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -1,5 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { accountantFormart } from '@/utils/formatter' import * as SupplierApi from '@/api/wms/supplier' @@ -138,6 +138,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + sortTableDefault:1, isSearch: true, form: { // labelMessage: '信息提示说明!!!', @@ -169,6 +170,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( table: { width: 180, }, + sortTableDefault:2, isForm: false }, { @@ -177,6 +179,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, dictClass: 'string', isTable: true, + sortTableDefault:10, isForm:false, sort: 'custom', table: { @@ -801,6 +804,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive Date: Mon, 3 Jun 2024 19:20:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E5=8E=BB=E6=8E=89=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/UserForm.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/system/user/UserForm.vue b/src/views/system/user/UserForm.vue index d673cdc96..c6ec91013 100644 --- a/src/views/system/user/UserForm.vue +++ b/src/views/system/user/UserForm.vue @@ -138,13 +138,13 @@ const formRules = reactive({ trigger: ['blur', 'change'] } ], - mobile: [ - { - pattern: /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/, - message: '请输入正确的手机号码', - trigger: 'blur' - } - ] + // mobile: [ + // { + // pattern: /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/, + // message: '请输入正确的手机号码', + // trigger: 'blur' + // } + // ] }) const formRef = ref() // 表单 Ref const deptList = ref([]) // 树形结构