|
@@ -3,7 +3,7 @@ import { Form, Input, Button, message } from 'antd';
|
3
|
3
|
import md5 from 'md5';
|
4
|
4
|
import { saveOrgUser, getOrgAdminDetail } from '@/services/org';
|
5
|
5
|
|
6
|
|
-export default (props)=>{
|
|
6
|
+export default (props) => {
|
7
|
7
|
const { id } = props;
|
8
|
8
|
const [adminForm] = Form.useForm();
|
9
|
9
|
const [adminFormData, setAdminFormData] = useState()
|
|
@@ -36,49 +36,49 @@ export default (props)=>{
|
36
|
36
|
}, [id])
|
37
|
37
|
return (
|
38
|
38
|
<div style={{ maxWidth: '600px' }}>
|
39
|
|
- <Form
|
40
|
|
- form={adminForm}
|
41
|
|
- labelCol={{ span: 8 }}
|
42
|
|
- wrapperCol={{ span: 16 }}
|
43
|
|
- initialValues={adminFormData}
|
44
|
|
- onFinish={onAdminFinish}
|
45
|
|
- >
|
46
|
|
- <Form.Item
|
47
|
|
- label="姓名"
|
48
|
|
- name="userName"
|
49
|
|
- rules={[{ required: true, message: '请填写管理员姓名!' }]}
|
50
|
|
- >
|
51
|
|
- <Input />
|
52
|
|
- </Form.Item>
|
53
|
|
- <Form.Item
|
54
|
|
- label="手机号"
|
55
|
|
- name="phone"
|
56
|
|
- rules={[{ required: true, message: '请填写手机号!' }]}
|
57
|
|
- >
|
58
|
|
- <Input maxLength={11} />
|
59
|
|
- </Form.Item>
|
60
|
|
- <Form.Item
|
61
|
|
- label="登录账号"
|
62
|
|
- name="loginName"
|
63
|
|
- rules={[{ required: true, message: '请填写登录账号!' }]}
|
64
|
|
- >
|
65
|
|
- <Input />
|
66
|
|
- </Form.Item>
|
67
|
|
- <Form.Item
|
68
|
|
- label="密码"
|
69
|
|
- name="password"
|
70
|
|
- rules={[{ required: true, message: '请填写密码!' }]}
|
71
|
|
- >
|
72
|
|
- <Input />
|
73
|
|
- </Form.Item>
|
74
|
|
- <Form.Item label=' ' colon={false} >
|
75
|
|
- <Button type="primary" htmlType="submit" loading={adminLoading}>
|
76
|
|
- 保存
|
77
|
|
- </Button>
|
78
|
|
- <Button style={{ marginLeft: '32px' }} onClick={() => { history.go(-1); }}>返回</Button>
|
79
|
|
- </Form.Item>
|
80
|
|
- </Form>
|
81
|
|
- </div>
|
|
39
|
+ <Form
|
|
40
|
+ form={adminForm}
|
|
41
|
+ labelCol={{ span: 8 }}
|
|
42
|
+ wrapperCol={{ span: 16 }}
|
|
43
|
+ initialValues={adminFormData}
|
|
44
|
+ onFinish={onAdminFinish}
|
|
45
|
+ >
|
|
46
|
+ <Form.Item
|
|
47
|
+ label="姓名"
|
|
48
|
+ name="userName"
|
|
49
|
+ rules={[{ required: true, message: '请填写管理员姓名!' }]}
|
|
50
|
+ >
|
|
51
|
+ <Input />
|
|
52
|
+ </Form.Item>
|
|
53
|
+ <Form.Item
|
|
54
|
+ label="手机号"
|
|
55
|
+ name="phone"
|
|
56
|
+ rules={[{ required: true, message: '请填写手机号!' }]}
|
|
57
|
+ >
|
|
58
|
+ <Input maxLength={11} />
|
|
59
|
+ </Form.Item>
|
|
60
|
+ <Form.Item
|
|
61
|
+ label="登录账号"
|
|
62
|
+ name="loginName"
|
|
63
|
+ rules={[{ required: true, message: '请填写登录账号!' }]}
|
|
64
|
+ >
|
|
65
|
+ <Input />
|
|
66
|
+ </Form.Item>
|
|
67
|
+ <Form.Item
|
|
68
|
+ label="密码"
|
|
69
|
+ name="password"
|
|
70
|
+ rules={[{ required: true, message: '请填写密码!' }]}
|
|
71
|
+ >
|
|
72
|
+ <Input />
|
|
73
|
+ </Form.Item>
|
|
74
|
+ <Form.Item label=' ' colon={false} >
|
|
75
|
+ <Button type="primary" htmlType="submit" loading={adminLoading}>
|
|
76
|
+ 保存
|
|
77
|
+ </Button>
|
|
78
|
+ <Button style={{ marginLeft: '32px' }} onClick={() => { history.go(-1); }}>返回</Button>
|
|
79
|
+ </Form.Item>
|
|
80
|
+ </Form>
|
|
81
|
+ </div>
|
82
|
82
|
|
83
|
83
|
)
|
84
|
84
|
}
|