| | |
| | | columns: [], |
| | | cols: [ |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | ], |
| | | scripts: [], |
| | | submit: {intertype: 'system', default: 'true', innerFunc: '', execSuccess: 'grid', execError: 'never', scripts: [], uniques: []}, |
| | |
| | | |
| | | if (_card.mergeCol) { |
| | | let col = _card.cols[_card.mergeCol[0]] |
| | | _card.cols.splice(_card.mergeCol[0], 1, ...col.pops) |
| | | if (col.pops) { |
| | | _card.cols.splice(_card.mergeCol[0], 1, ...col.pops) |
| | | } |
| | | } |
| | | |
| | | if (_card.wrap.commit === 'simple') { |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_cl |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | addSearch = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('plusSearch', card.uuid, {uuid: Utils.getuuid(), focus: true, label: 'label', type: 'text', match: '='}, 'simple') |
| | | let ratio = 6 |
| | | |
| | | if (card.search.length) { |
| | | ratio = card.search[card.search.length - 1].ratio |
| | | } |
| | | |
| | | MKEmitter.emit('plusSearch', card.uuid, {uuid: Utils.getuuid(), focus: true, label: 'label', type: 'text', match: '=', ratio}, 'simple') |
| | | } |
| | | |
| | | addButton = () => { |
| | |
| | | res.borderRadius = card.wrap.borderRadius || 0 |
| | | res.resetContrl = card.wrap.resetContrl || 'init' |
| | | |
| | | if (res.commit === 'check' && !res.tableType) { |
| | | res.tableType = 'radio' |
| | | } |
| | | |
| | | let _card = {...card, wrap: res} |
| | | |
| | | if (res.tableType) { |
| | |
| | | updatecolumn = (config) => { |
| | | config.absFields = [] |
| | | config.mergeCol = false |
| | | config.hasExtend = false |
| | | config.parCtrl = false |
| | | |
| | | let mapCol = (cols) => { |
| | | cols.forEach(col => { |
| | | if (col.type === 'number') { |
| | | if (col.format === 'abs') { |
| | | config.absFields.push(col.field) |
| | | } |
| | | } else if (col.type === 'extend') { |
| | | config.hasExtend = true |
| | | if (col.supField) { |
| | | config.parCtrl = true |
| | | } |
| | | } else if (col.type === 'colspan' && col.subcols) { |
| | | mapCol(col.subcols) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | config.cols.forEach((col, index) => { |
| | | delete col.pops |
| | |
| | | if (col.format === 'abs') { |
| | | config.absFields.push(col.field) |
| | | } |
| | | } else if (col.type === 'extend') { |
| | | config.hasExtend = true |
| | | if (col.supField) { |
| | | config.parCtrl = true |
| | | } |
| | | } else if (col.type === 'colspan' && col.subcols) { |
| | | col.subcols.forEach(scol => { |
| | | if (scol.type === 'number') { |
| | | if (scol.format === 'abs') { |
| | | config.absFields.push(scol.field) |
| | | } |
| | | } |
| | | }) |
| | | mapCol(col.subcols) |
| | | } else if (col.type === 'text') { |
| | | if (col.editable === 'true' && col.editType === 'popSelect' && /^tab:/.test(col.initval)) { |
| | | config.mergeCol = config.mergeCol || [] |