From cd49c7caada72872817b36712db7bd9e338a081f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 18 二月 2021 18:33:47 +0800
Subject: [PATCH] 2021-02-18

---
 src/views/mobmanage/mutilform/index.jsx |   53 ++++++++++-------------------------------------------
 1 files changed, 10 insertions(+), 43 deletions(-)

diff --git a/src/views/mobmanage/mutilform/index.jsx b/src/views/mobmanage/mutilform/index.jsx
index dbdf288..0dca07e 100644
--- a/src/views/mobmanage/mutilform/index.jsx
+++ b/src/views/mobmanage/mutilform/index.jsx
@@ -1,10 +1,11 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Select, Radio } from 'antd'
+import { Form, Row, Col, Input } from 'antd'
 import './index.scss'
 
 class MainSearch extends Component {
   static propTpyes = {
+    type: PropTypes.any,         // 缂栬緫绫诲瀷
     card: PropTypes.any,         // 缂栬緫搴旂敤
     inputSubmit: PropTypes.func  // input鍥炶溅鎻愪氦
   }
@@ -33,7 +34,7 @@
   }
 
   render() {
-    const { card } = this.props
+    const { card, type } = this.props
     const { getFieldDecorator } = this.props.form
     const formItemLayout = {
       labelCol: {
@@ -50,8 +51,8 @@
         <Row gutter={24}>
           <Col span={24}>
             <Form.Item label="搴旂敤鍚�">
-              {getFieldDecorator('name', {
-                initialValue: card ? card.name : '',
+              {getFieldDecorator('remark', {
+                initialValue: card ? card.remark : '',
                 rules: [{
                   required: true,
                   message: '璇疯緭鍏ュ簲鐢ㄥ悕!'
@@ -63,27 +64,9 @@
             </Form.Item>
           </Col>
           <Col span={24}>
-            <Form.Item label="搴旂敤绫诲瀷">
-              {getFieldDecorator('type', {
-                initialValue: card ? card.type : 'mob',
-                rules: [
-                  {
-                    required: true,
-                    message: '璇烽�夋嫨搴旂敤绫诲瀷!'
-                  }
-                ]
-              })(
-                <Select>
-                  <Select.Option value="mob">绉诲姩绔�</Select.Option>
-                  <Select.Option value="pc">PC绔�</Select.Option>
-                </Select>
-              )}
-            </Form.Item>
-          </Col>
-          <Col span={24}>
             <Form.Item label="搴旂敤缂栫爜">
-              {getFieldDecorator('keiNo', {
-                initialValue: card ? card.keiNo : '',
+              {getFieldDecorator('kei_no', {
+                initialValue: card ? card.kei_no : '',
                 rules: [{
                   required: true,
                   message: '璇疯緭鍏ュ簲鐢ㄧ紪鐮�!'
@@ -91,26 +74,10 @@
                   pattern: /^[a-zA-Z_]*$/ig,
                   message: '搴旂敤缂栫爜鍙厑璁稿寘鍚ぇ灏忓啓瀛楁瘝鍙奯!'
                 }, {
-                  max: 20,
-                  message: '搴旂敤缂栫爜涓嶅彲瓒呰繃20涓瓧绗�!'
+                  max: 10,
+                  message: '搴旂敤缂栫爜涓嶅彲瓒呰繃10涓瓧绗�!'
                 }]
-              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)}
-            </Form.Item>
-          </Col>
-          <Col span={24}>
-            <Form.Item label="鏉冮檺绠$悊">
-              {getFieldDecorator('role_manage', {
-                initialValue: card ? card.role_manage || 'false' : 'false',
-                rules: [{
-                  required: true,
-                  message: '璇烽�夋嫨鏄惁鍚敤鏉冮檺绠$悊!'
-                }]
-              })(
-                <Radio.Group>
-                  <Radio value="true">鍚敤</Radio>
-                  <Radio value="false">涓嶅惎鐢�</Radio>
-                </Radio.Group>
-              )}
+              })(<Input placeholder="" disabled={type === 'edit'} autoComplete="off" onPressEnter={this.handleSubmit} />)}
             </Form.Item>
           </Col>
         </Row>

--
Gitblit v1.8.0