Răsfoiți Sursa

作业管理流程设计 其他节点不设置表单必填

wyn 4 luni în urmă
părinte
comite
1ff4bc0c92
1 a modificat fișierele cu 8 adăugiri și 3 ștergeri
  1. 8 3
      src/components/IsolationWork.tsx

+ 8 - 3
src/components/IsolationWork.tsx

@@ -1285,8 +1285,9 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
       return false;
     }
     
-    // 业务表单必填(创建作业节点除外)
-    if (nodeType !== 'createJob' && !config.submitForm) {
+    // 业务表单必填(只有确认节点、审核节点、录入信息节点需要必填)
+    const formRequiredNodeTypes = ['confirm', 'review', 'inputInfo'];
+    if (formRequiredNodeTypes.includes(nodeType) && !config.submitForm) {
       return false;
     }
     
@@ -3555,7 +3556,11 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
                               <div className="space-y-5">
                                 <div>
                                   <label className="block text-sm font-medium text-gray-700 mb-2">
-                                    业务表单 <span className="text-red-500" style={{ color: '#ef4444' }}>*</span>
+                                    业务表单 
+                                    {/* 只有确认节点、审核节点、录入信息节点显示必填标记 */}
+                                    {['confirm', 'review', 'inputInfo'].includes(selectedWorkflowNode.data?.type || '') && (
+                                      <span className="text-red-500" style={{ color: '#ef4444' }}>*</span>
+                                    )}
                                   </label>
                                   <Select
                                     value={workflowNodeConfig.submitForm || undefined}