傅行帆 5 年前
父节点
当前提交
beba0cff5f
共有 1 个文件被更改,包括 39 次插入6 次删除
  1. 39
    6
      src/pages/UserManage/Editor/Advanced.jsx

+ 39
- 6
src/pages/UserManage/Editor/Advanced.jsx 查看文件

@@ -79,6 +79,11 @@ const Advanced = (props) => {
79 79
   )
80 80
 
81 81
   const handleSubmit = () => {
82
+    props.form.validateFields((err, values) => {
83
+      if (err) {
84
+        return
85
+      }
86
+    });
82 87
     const data = {
83 88
       orgId: user.orgId,
84 89
       menus: checkOpts.checkedList,
@@ -115,16 +120,44 @@ const Advanced = (props) => {
115 120
       <Card title="支付配置" bordered={false}>
116 121
         <Form {...formItemLayout} >
117 122
             <Form.Item label="商户号">
118
-              {getFieldDecorator('mchId')(<Input />)}
123
+              {getFieldDecorator('mchId', {
124
+                rules: [
125
+                  {
126
+                    required: true,
127
+                    message: '请输入商户号',
128
+                  },
129
+                ],
130
+              })(<Input />)}
119 131
             </Form.Item>
120 132
             <Form.Item label="appid">
121
-              {getFieldDecorator('appid')(<Input />)}
133
+              {getFieldDecorator('appid', {
134
+                rules: [
135
+                  {
136
+                    required: true,
137
+                    message: '请输入appid',
138
+                  },
139
+                ],
140
+              })(<Input />)}
122 141
             </Form.Item>
123
-            <Form.Item label="key">
124
-              {getFieldDecorator('mchKey')(<Input />)}
142
+            <Form.Item label="API秘钥">
143
+              {getFieldDecorator('mchKey', {
144
+                rules: [
145
+                  {
146
+                    required: true,
147
+                    message: '请输入API秘钥',
148
+                  },
149
+                ],
150
+              })(<Input />)}
125 151
             </Form.Item>
126
-            <Form.Item label="API密钥">
127
-              {getFieldDecorator('apiPath')(<ImageUpload />)}
152
+            <Form.Item label="API证书">
153
+              {getFieldDecorator('apiPath', {
154
+                rules: [
155
+                  {
156
+                    required: true,
157
+                    message: '请上传API证书',
158
+                  },
159
+                ],
160
+              })(<ImageUpload />)}
128 161
             </Form.Item>
129 162
         </Form>
130 163
       </Card>