From 4a849b44feaa5a0381c6474d56ae3273bfc160d5 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Thu, 12 Mar 2026 17:42:41 +0800 Subject: [PATCH] 1.更多功能增加误工登记,取消误工登记,走不同的过程 --- src/mes/indexMes/index.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/src/mes/indexMes/index.js b/src/mes/indexMes/index.js index 592a0f3..d93b944 100644 --- a/src/mes/indexMes/index.js +++ b/src/mes/indexMes/index.js @@ -29,6 +29,8 @@ import { } from "antd"; import { CloseOutlined, + ClockCircleOutlined, + CloseCircleOutlined, UserAddOutlined, SwapOutlined, AppstoreOutlined @@ -860,7 +862,7 @@ const SystemFunComponent = () => { // 调用通用过程 const [form] = Form.useForm(); - const handleProcedureCall = async (params, iFlag) => { + const handleProcedureCall = async (params, iFlag, sProName = "sp_ResetDailyReport") => { const shiftValue = String(props.app.sShift || '1'); const extraValues = await new Promise(resolve => { form.setFieldsValue({ @@ -870,8 +872,9 @@ const SystemFunComponent = () => { label: shiftValue === '1' ? '白班' : '夜班' } }); + const title = sProName === "sp_ResetDailyReport" ? "切换手动" : (sProName === "sp_mes_downtimeReport" ? "误工登记" : "取消误工登记"); Modal.confirm({ - title: "切换手动", + title: title, content: (
@@ -918,11 +921,11 @@ const SystemFunComponent = () => { const value = { sBtnName: "BtnEventAuto", - sProName: "sp_ResetDailyReport", + sProName: sProName, sProInParam: JSON.stringify({ changeValue: {}, sButtonParam: { - sproName: "sp_ResetDailyReport", + sproName: sProName, inMap: "userinfo.sMachineGuid,userinfo.sTeamId,userinfo.tReportDate,userinfo.sTeamType" }, params: [ @@ -1144,6 +1147,28 @@ const SystemFunComponent = () => { } }); break; + case "downtimeReport": + // 误工登记 + handleProcedureCall({ + onSuccess: () => { + message.success("误工登记成功, 请等待页面刷新", 2); + setTimeout(() => { + location.reload(); + }, 1500); + } + }, 1, "sp_mes_downtimeReport"); + break; + case "unDowntimeReport": + // 取消误工登记 + handleProcedureCall({ + onSuccess: () => { + message.success("取消误工登记成功, 请等待页面刷新", 2); + setTimeout(() => { + location.reload(); + }, 1500); + } + }, 0, "sp_mes_un_downtimeReport"); + break; default: break; } @@ -1211,6 +1236,24 @@ const SystemFunComponent = () => { 取消手动 +
{ + handleSystemFunClick("downtimeReport"); + }} + > + + 误工登记 +
+
{ + handleSystemFunClick("unDowntimeReport"); + }} + > + + 取消误工登记 +
} > -- libgit2 0.22.2