king
2020-11-10 5df578ff69f6b02e821d59a8883bc75d78695a62
src/menu/menuform/index.jsx
@@ -1,5 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Input, Select, notification } from 'antd'
import Api from '@/api'
@@ -14,6 +15,7 @@
    MenuName: PropTypes.string,
    MenuNo: PropTypes.string,
    parentId: PropTypes.string,
    initMenuList: PropTypes.func,
    updateConfig: PropTypes.func
  }
@@ -55,6 +57,8 @@
            smenulist = item.options
          }
        })
        this.props.initMenuList({fstMenuList: fromJS(menulist).toJS(), fstMenuId: result.FstIDSeleted})
        this.setState({
          fstMenuId: result.FstIDSeleted,
@@ -101,8 +105,8 @@
      }, () => {
        let _id = smenulist[0] ? smenulist[0].value : ''
        this.props.form.setFieldsValue({parentId: _id})
        this.props.updateConfig({...config, fstMenuId: value, parentId: _id})
      })
      this.props.updateConfig({...config, fstMenuId: value})
    } else if (key === 'parentId') {
      this.props.updateConfig({...config, parentId: value})
    }
@@ -124,7 +128,7 @@
  }
  render() {
    const { dict, MenuName, MenuNo } = this.props
    const { dict, MenuName, MenuNo, config } = this.props
    const { menulist, smenulist } = this.state
    const { getFieldDecorator } = this.props.form
    const formItemLayout = {
@@ -212,7 +216,7 @@
          <Col span={24}>
            <Form.Item label={dict['mob.menu.easycode']}>
              {getFieldDecorator('easyCode', {
                initialValue: ''
                initialValue: config.easyCode
              })(<Input placeholder="" autoComplete="off" onChange={this.changeEasyCode}/>)}
            </Form.Item>
          </Col>