| | |
| | | _fieldlen = item.fieldlength || 512 |
| | | } else if (item.type === 'number') { |
| | | _fieldlen = item.decimal ? item.decimal : 0 |
| | | item.initval = item.initval || 0 |
| | | } |
| | | |
| | | datatype[item.field] = item.type |
| | |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'number') { // 数字 |
| | | let _initval = item.initval |
| | | let precision = (item.decimal || item.decimal === 0) ? item.decimal : null |
| | | |
| | | fields.push( |
| | |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.field, { |
| | | initialValue: _initval, |
| | | initialValue: item.initval, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | } |
| | | } else if (values.type === 'funcvar') { // 函数变量为只读元素 |
| | | values.readonly = 'true' |
| | | } else if (values.type === 'number' && (values.min || values.min === 0) && (values.max || values.max === 0)) { // 数值型验证最小最大值 |
| | | if (values.min > values.max) { |
| | | } else if (values.type === 'number') { // 数值型验证最小最大值 |
| | | values.required = 'true' |
| | | if ((values.min || values.min === 0) && (values.max || values.max === 0) && values.min > values.max) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '最小值不可大于最大值!', |