| | |
| | | const { col, record } = this.props |
| | | |
| | | if (id !== col.uuid + record.$$uuid) return |
| | | |
| | | if (col.ctrlField && col.ctrlValue.includes(record[col.ctrlField])) return |
| | | |
| | | this.focus() |
| | | } |
| | | |
| | |
| | | |
| | | if (!col) return (<td {...resProps} className={className} style={style}/>) |
| | | |
| | | let disabled = false |
| | | if (col.ctrlField) { |
| | | disabled = col.ctrlValue.includes(record[col.ctrlField]) |
| | | } |
| | | |
| | | let children = null |
| | | if (col.type === 'text') { |
| | | let content = '' |
| | |
| | | } |
| | | } |
| | | |
| | | if (col.editable === 'true') { |
| | | if (col.editable === 'true' && !disabled) { |
| | | if (editing) { |
| | | if (!col.editType || col.editType === 'text') { |
| | | return (<td className="editing_table_cell"> |
| | |
| | | } |
| | | } |
| | | |
| | | if (col.editable === 'true') { |
| | | if (col.editable === 'true' && !disabled) { |
| | | if (editing) { |
| | | return (<td className="editing_table_cell"> |
| | | <InputNumber id={col.uuid + record.$$uuid} defaultValue={value} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress} onBlur={this.onBlur}/> |
| | |
| | | let { col, config, record, style, className } = this.props |
| | | const { err } = this.state |
| | | |
| | | let disabled = false |
| | | if (col.ctrlField) { |
| | | disabled = col.ctrlValue.includes(record[col.ctrlField]) |
| | | } |
| | | |
| | | let children = null |
| | | if (col.type === 'text') { |
| | | if (col.editable === 'true') { |
| | | if (col.editable === 'true' && !disabled) { |
| | | let _value = '' |
| | | if (col.editField) { |
| | | _value = record[col.editField] !== undefined ? record[col.editField] : '' |
| | |
| | | children = content |
| | | } |
| | | } else if (col.type === 'number') { |
| | | if (col.editable === 'true') { |
| | | if (col.editable === 'true' && !disabled) { |
| | | let _value = record[col.field] !== undefined ? record[col.field] : '' |
| | | children = (<> |
| | | <InputNumber id={col.uuid + record.$$uuid} defaultValue={_value} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress}/> |
| | |
| | | _forms[item.field] = item |
| | | if (!initEditLine) { |
| | | initEditLine = item |
| | | } |
| | | |
| | | if (item.ctrlField) { |
| | | item.ctrlValue = item.ctrlValue.split(',') |
| | | } |
| | | } |
| | | |
| | |
| | | pageSizeOptions: pageOptions, |
| | | showSizeChanger: true, |
| | | total: this.props.total || 0, |
| | | showTotal: (total, range) => `${range[0]}-${range[1]} ${this.state.dict['main.pagination.of']} ${total} ${this.state.dict['main.pagination.items']}` |
| | | showTotal: (total, range) => `${range[0]}-${range[1]} 共 ${total} 条` |
| | | } |
| | | } |
| | | |