| 
					
				 | 
			
			
				@@ -220,19 +220,26 @@ const Contact: React.FC = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         onVisibleChange={show => setState({ ...state, visible: show })} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         title={state.type === modalType.CREATE ? '创建商机角色' : '更新商机角色'} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         onFinish={async value => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (state.type === modalType.CREATE) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            await tryAddBusinessgroup({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              ...value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              stageSettings: JSON.stringify(value.stageSettings) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            await tryUpdateBusinessGroup({ ...value }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (state.type === modalType.CREATE) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              await tryAddBusinessgroup({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ...value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                stageSettings: JSON.stringify(value.stageSettings) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              await tryUpdateBusinessGroup({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ...value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                stageSettings: JSON.stringify(value.stageSettings) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            message.error(`${state.type === modalType.CREATE ? '创建' : '更新'}失败,请重试`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          return true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <ProFormText name="name" label="组名称" required /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <ProFormText name="id" hidden /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        {/* <ProFormText name="department" label="应用部门" required /> */} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <ProForm.Item name="departmentIds" label="应用部门" required> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <TreeSelect treeData={department} multiple={true} /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </ProForm.Item> 
			 |