| | |
| | | { value: 'Decimal(18,2)', text: 'Decimal(18,2)' }, |
| | | { value: 'Decimal(18,4)', text: 'Decimal(18,4)' }, |
| | | { value: 'Decimal(18,6)', text: 'Decimal(18,6)' }, |
| | | { value: 'Decimal(18,8)', text: 'Decimal(18,8)' }, |
| | | { value: 'Decimal(18,10)', text: 'Decimal(18,10)' }, |
| | | { value: 'date', text: 'date' }, |
| | | { value: 'datetime', text: 'datetime' } |
| | | ] |
| | |
| | | unlimit: true, |
| | | editable: true, |
| | | keyVals: ['Int', 'Decimal(18,0)', 'Decimal(18,2)', 'Decimal(18,4)', 'Decimal(18,6)'], |
| | | render: (text, record) => /^Decimal/ig.test(record.type) || /^int/ig.test(record.type) ? text : '' |
| | | render: (text, record) => record.required === 'true' && (/^Decimal/ig.test(record.type) || /^int/ig.test(record.type)) ? text : '' |
| | | |
| | | }, |
| | | { |
| | |
| | | unlimit: true, |
| | | editable: true, |
| | | keyVals: ['Int', 'Decimal(18,0)', 'Decimal(18,2)', 'Decimal(18,4)', 'Decimal(18,6)'], |
| | | render: (text, record) => /^Decimal/ig.test(record.type) || /^int/ig.test(record.type) ? text : '' |
| | | render: (text, record) => record.required === 'true' && (/^Decimal/ig.test(record.type) || /^int/ig.test(record.type)) ? text : '' |
| | | } |
| | | ], |
| | | uniqueColumns: [ |
| | |
| | | |
| | | clearField = () => { |
| | | const { verify } = this.state |
| | | const _this = this |
| | | const that = this |
| | | |
| | | confirm({ |
| | | content: `确定清空Excel列吗?`, |
| | | onOk() { |
| | | _this.setState({ |
| | | that.setState({ |
| | | verify: { |
| | | ...verify, |
| | | columns: [] |
| | | } |
| | | }, () => { |
| | | _this.resetUniqueColumns() |
| | | that.resetUniqueColumns() |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | columnChange = (values, callback) => { |
| | | let verify = JSON.parse(JSON.stringify(this.state.verify)) |
| | | |
| | | let fields = verify.columns.map(item => item.Column) |
| | | if (fields.includes(values.Column)) { |
| | | let fields = verify.columns.map(item => item.Column.toLowerCase()) |
| | | if (fields.includes(values.Column.toLowerCase())) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: values.Column + '字段已存在!', |
| | |
| | | <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}> |
| | | 清空Excel列 |
| | | </Button> |
| | | <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:数值类型(int 或 decimal),内容为必填;最大值和最小值在类型为数值时有效。导入-初始化:用于excel中不存在,导入时需要初始化的字段</Col> |
| | | <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:数值类型(int 或 decimal),内容为必填;最大值和最小值在类型为数值时(必填)有效。导入-初始化:用于excel中不存在,导入时需要初始化的字段</Col> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del', 'extra:required:是否必填']} searchKey={searchKey} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/> |
| | | </TabPane> |
| | | {card.intertype === 'system' ? <TabPane tab={ |