| | |
| | | col.required = col.required || 'true' |
| | | col.type = col.type || 'Nvarchar(50)' |
| | | col.import = col.import || 'true' |
| | | col.required = col.required || 'true' |
| | | |
| | | if (col.type === 'text' || col.type === 'image') { |
| | | col.type = 'Nvarchar(50)' |
| | |
| | | |
| | | let _columns = JSON.parse(JSON.stringify(verify.columns)) |
| | | |
| | | let _cols = _columns.map(col => col.Column ) |
| | | let _cols = _columns.map(col => col.Column) |
| | | |
| | | columns.forEach(col => { |
| | | if (col.field && !_cols.includes(col.field)) { |
| | |
| | | const { verify } = this.state |
| | | |
| | | columns = columns.map(col => { |
| | | col.type = col.type || 'Nvarchar(50)' |
| | | if (col.type === 'text' || col.type === 'image') { |
| | | col.type = 'Nvarchar(50)' |
| | | } else if (col.type === 'number') { |
| | | col.type = 'Decimal(18,2)' |
| | | } |
| | | |
| | | if (/^Nvarchar/ig.test(col.type)) { |
| | | col.limit = col.type.match(/\d+/) ? col.type.match(/\d+/)[0] : '20000' |
| | | } else if (/^Decimal/ig.test(col.type)) { |
| | |
| | | col.limit = '' |
| | | } |
| | | |
| | | col.required = col.required || 'true' |
| | | col.import = col.import || 'true' |
| | | |
| | | return col |
| | | }) |
| | | |