| | |
| | | const { config } = this.props |
| | | const { value, err } = this.state |
| | | |
| | | return ( |
| | | <InputNumber |
| | | title={err} |
| | | className={err ? 'has-error' : ''} |
| | | ref={ref => this.node = ref} |
| | | precision={config.decimal || 0} |
| | | value={value} |
| | | onChange={(value) => this.onChange(value)} |
| | | onPressEnter={this.enterPress} |
| | | onFocus={this.onFocus} |
| | | onBlur={this.onBlur} |
| | | /> |
| | | ) |
| | | if (!config.decimal && config.decimal !== 0) { |
| | | return ( |
| | | <InputNumber |
| | | title={err} |
| | | className={err ? 'has-error' : ''} |
| | | ref={ref => this.node = ref} |
| | | value={value} |
| | | onChange={(value) => this.onChange(value)} |
| | | onPressEnter={this.enterPress} |
| | | onFocus={this.onFocus} |
| | | onBlur={this.onBlur} |
| | | /> |
| | | ) |
| | | } else { |
| | | return ( |
| | | <InputNumber |
| | | title={err} |
| | | className={err ? 'has-error' : ''} |
| | | ref={ref => this.node = ref} |
| | | precision={config.decimal} |
| | | value={value} |
| | | onChange={(value) => this.onChange(value)} |
| | | onPressEnter={this.enterPress} |
| | | onFocus={this.onFocus} |
| | | onBlur={this.onBlur} |
| | | /> |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | _item.datatype = _item.declareType || 'datetime' |
| | | } else { |
| | | _item.datatype = item.datatype |
| | | } |
| | | if (_item.type === 'number' && item.type === 'number') { |
| | | _item.decimal = item.decimal || 0 |
| | | } |
| | | |
| | | forms.push(_item) |
| | |
| | | loading: true |
| | | }) |
| | | |
| | | if (submit.intertype === 'system' && window.backend && window.GLOB.CacheData.has('sql_' + submit.$menuId)) { |
| | | let ex = window.GLOB.CacheData.get('sql_' + submit.$menuId) |
| | | if (submit.intertype === 'system' && window.backend && window.GLOB.CacheData.has('sql_submit_' + submit.$menuId)) { |
| | | let ex = window.GLOB.CacheData.get('sql_submit_' + submit.$menuId) |
| | | let param = this.getExps(ex, submit, data, forms) |
| | | |
| | | Api.genericInterface(param).then((res) => { |