From 99f84149bcd61a6bd97125ca09c44a9d0742c0b4 Mon Sep 17 00:00:00 2001
From: pengm <674192343@qq.com>
Date: Thu, 2 Apr 2026 16:32:40 +0800
Subject: [PATCH] 1.切换手动增加一个切换原因的必填项
---
src/mes/indexMes/index.js | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/mes/indexMes/index.js b/src/mes/indexMes/index.js
index c5409f9..0f945fd 100644
--- a/src/mes/indexMes/index.js
+++ b/src/mes/indexMes/index.js
@@ -894,17 +894,34 @@ const SystemFunComponent = () => {
夜班
+ {sProName === "sp_ResetDailyReport" && (
+
+
+
+ )}
),
wrapClassName: "mesCommonModal mesLoginForm",
cancelText: "取消",
okText: "确定",
- onOk() {
+ onOk: async () => {
const values = form.getFieldsValue();
const tReportDate = values?.tReportDate.format("YYYY-MM-DD") || "";
const sTeamType = values.sTeamType?.value || '';
- resolve({ tReportDate, sTeamType });
+ const sReportReason = values?.sReportReason || '';
+
+ if (sProName === "sp_ResetDailyReport") {
+ if (!sReportReason) {
+ message.warning('请输入切换原因');
+ return Promise.reject(); // 关键!阻止弹窗关闭
+ }
+ }
+ resolve({ tReportDate, sTeamType, sReportReason });
},
onCancel() {
resolve(false);
@@ -926,7 +943,7 @@ const SystemFunComponent = () => {
changeValue: {},
sButtonParam: {
sproName: sProName,
- inMap: "userinfo.sMachineGuid,userinfo.sTeamId,userinfo.tReportDate,userinfo.sTeamType"
+ inMap: sProName === "sp_ResetDailyReport" ? "userinfo.sMachineGuid,userinfo.sTeamId,userinfo.tReportDate,userinfo.sTeamType,userinfo.sReportReason" : "userinfo.sMachineGuid,userinfo.sTeamId,userinfo.tReportDate,userinfo.sTeamType"
},
params: [
{
--
libgit2 0.22.2