| | |
| | | } |
| | | |
| | | handleSubmit = () => { |
| | | // const { columns } = this.props |
| | | // 表单提交时检查输入值是否正确 |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | // if (values.field && columns.filter(col => col.field && col.uuid !== values.uuid && col.field === values.field).length > 0) { |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: '字段已添加!', |
| | | // duration: 5 |
| | | // }) |
| | | // return |
| | | // } |
| | | if (values.type === 'number' && values.editable === 'true') { |
| | | if (typeof(values.max) === 'number' && typeof(values.min) === 'number' && values.max < values.min) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '最大值不可小于最小值!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | this.setState({visible: false, formlist: null}) |
| | | this.props.submitCol(values) |
| | | |