|  | @@ -1,10 +1,20 @@
 | 
	
		
			
				|  |  |  import React, { useState, useEffect } from 'react';
 | 
	
		
			
				|  |  | -import { Form, Modal, TreeSelect, Table, Button, Input } from 'antd';
 | 
	
		
			
				|  |  | +import { Form, Modal, TreeSelect, Table, Button, Input, Tabs } from 'antd';
 | 
	
		
			
				|  |  |  import { connect } from 'dva';
 | 
	
		
			
				|  |  |  const { TreeNode } = TreeSelect;
 | 
	
		
			
				|  |  | +const { TabPane } = Tabs;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +//状态
 | 
	
		
			
				|  |  | +const STATUS = [
 | 
	
		
			
				|  |  | +  { value: 1, label: '售前' },
 | 
	
		
			
				|  |  | +  { value: 2, label: '执行' },
 | 
	
		
			
				|  |  | +  { value: 4, label: '运营' },
 | 
	
		
			
				|  |  | +  { value: 6, label: '质保' },
 | 
	
		
			
				|  |  | +];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function MemberModal(props) {
 | 
	
		
			
				|  |  |    const { visible, onClose, currentItem, loading, depUserTree, dataSource, dispatch } = props;
 | 
	
		
			
				|  |  | +  const [type, setType] = useState('1');
 | 
	
		
			
				|  |  |    const [form] = Form.useForm();
 | 
	
		
			
				|  |  |    const [currentMember, setCurrentMember] = useState({});
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -42,7 +52,7 @@ function MemberModal(props) {
 | 
	
		
			
				|  |  |        onOk() {
 | 
	
		
			
				|  |  |          dispatch({
 | 
	
		
			
				|  |  |            type: 'approval/deleteMember',
 | 
	
		
			
				|  |  | -          payload: { project_code_id: currentItem.id, user_id: item.ID },
 | 
	
		
			
				|  |  | +          payload: { project_code_id: currentItem.id, user_id: item.ID, flow_id: Number(type) },
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      });
 | 
	
	
		
			
				|  | @@ -55,6 +65,7 @@ function MemberModal(props) {
 | 
	
		
			
				|  |  |          payload: {
 | 
	
		
			
				|  |  |            project_code_id: currentItem.id,
 | 
	
		
			
				|  |  |            user_id: Number(memberID.split('||')[0]),
 | 
	
		
			
				|  |  | +          flow_id: Number(type),
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          callback: () => {
 | 
	
		
			
				|  |  |            form.resetFields();
 | 
	
	
		
			
				|  | @@ -64,6 +75,20 @@ function MemberModal(props) {
 | 
	
		
			
				|  |  |      // form.resetFields();
 | 
	
		
			
				|  |  |    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +  const handleChange = type => {
 | 
	
		
			
				|  |  | +    setType(type);
 | 
	
		
			
				|  |  | +    dispatch({
 | 
	
		
			
				|  |  | +      type: 'approval/queryMember',
 | 
	
		
			
				|  |  | +      payload: { project_code_id: currentItem.id, flow_id: Number(type) },
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +  };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  useEffect(() => {
 | 
	
		
			
				|  |  | +    if (currentItem?.id) {
 | 
	
		
			
				|  |  | +      handleChange('1');
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }, [currentItem]);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    return (
 | 
	
		
			
				|  |  |      <Modal
 | 
	
		
			
				|  |  |        title="成员管理"
 | 
	
	
		
			
				|  | @@ -75,6 +100,14 @@ function MemberModal(props) {
 | 
	
		
			
				|  |  |        footer={null}
 | 
	
		
			
				|  |  |        width="70%"
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  | +      <Tabs activeKey={type} onChange={type => handleChange(type)}>
 | 
	
		
			
				|  |  | +        {STATUS.map(
 | 
	
		
			
				|  |  | +          item =>
 | 
	
		
			
				|  |  | +            currentItem.flow_id >= item.value && (
 | 
	
		
			
				|  |  | +              <TabPane tab={item.label} key={item.value}></TabPane>
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +        )}
 | 
	
		
			
				|  |  | +      </Tabs>
 | 
	
		
			
				|  |  |        <Form
 | 
	
		
			
				|  |  |          labelCol={{ span: 6 }}
 | 
	
		
			
				|  |  |          wrapperCol={{ span: 10 }}
 |