king
2020-03-02 ba7c54e0029456e6b1bf7f0e0d31af69a3d74db3
src/templates/ushare/modalform/index.jsx
@@ -13,7 +13,8 @@
    dict: PropTypes.object,    // 字典项
    optionLibs: PropTypes.any, // 自定义下拉集
    formlist: PropTypes.any,
    card: PropTypes.object
    card: PropTypes.object,
    inputSubmit: PropTypes.any
  }
  state = {
@@ -257,6 +258,14 @@
    }
  }
  handleSubmit = (e) => {
    e.preventDefault()
    if (this.props.inputSubmit) {
      this.props.inputSubmit()
    }
  }
  getFields() {
    const { getFieldDecorator } = this.props.form
    const fields = []
@@ -299,7 +308,7 @@
                  },
                  ...rules
                ]
              })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)}
              })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
        )
@@ -316,7 +325,7 @@
                      message: this.props.dict['form.required.input'] + item.label + '!'
                    }
                  ]
                })(<InputNumber min={0} max={18} precision={0} />)}
                })(<InputNumber min={0} max={18} precision={0} onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
          )
@@ -332,7 +341,7 @@
                      message: this.props.dict['form.required.input'] + item.label + '!'
                    }
                  ]
                })(<InputNumber min={1} precision={0} />)}
                })(<InputNumber min={1} precision={0} onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
          )
@@ -348,7 +357,7 @@
                      message: this.props.dict['form.required.input'] + item.label + '!'
                    }
                  ]
                })(<InputNumber />)}
                })(<InputNumber onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
          )