king
2023-06-10 f155ee9b2db0f4eee687b53fd2f09bd3ebb02677
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -119,7 +119,7 @@
    this.setState({editing: false})
    setTimeout(() => {
      if (col.enter === '$next') {
      if (/\$next/.test(col.enter)) {
        MKEmitter.emit('nextLine', col, record.$$uuid)
      } else if (col.enter === '$sub') {
        MKEmitter.emit('subLine', col, record)
@@ -208,7 +208,7 @@
    this.setState({editing: false})
    setTimeout(() => {
      if (col.enter === '$next') {
      if (/\$next/.test(col.enter)) {
        MKEmitter.emit('nextLine', col, record.$$uuid)
      } else if (col.enter === '$sub') {
        MKEmitter.emit('subLine', col, record)
@@ -240,7 +240,7 @@
    this.setState({editing: false})
    setTimeout(() => {
      if (col.enter === '$next') {
      if (/\$next/.test(col.enter)) {
        MKEmitter.emit('nextLine', col, record.$$uuid)
      } else if (col.enter === '$sub') {
        MKEmitter.emit('subLine', col, record)
@@ -542,7 +542,7 @@
    this.onBlur()
    setTimeout(() => {
      if (col.enter === '$next') {
      if (/\$next/.test(col.enter)) {
        MKEmitter.emit('nextLine', col, record.$$uuid)
      } else if (col.enter === '$sub') {
        MKEmitter.emit('subLine', col, record)
@@ -602,7 +602,7 @@
    const { col, record } = this.props
    setTimeout(() => {
      if (col.enter === '$next') {
      if (/\$next/.test(col.enter)) {
        MKEmitter.emit('nextLine', col, record.$$uuid)
      } else if (col.enter === '$sub') {
        MKEmitter.emit('subLine', col, record)
@@ -638,7 +638,7 @@
    }
    setTimeout(() => {
      if (col.enter === '$next') {
      if (/\$next/.test(col.enter)) {
        MKEmitter.emit('nextLine', col, record.$$uuid)
      } else if (col.enter === '$sub') {
        MKEmitter.emit('subLine', col, record)
@@ -1297,7 +1297,12 @@
    let next = edData[index + 1] || null
    
    if (next) {
      let node = document.getElementById(setting.initId + next.$$uuid)
      let nextId = setting.initId + next.$$uuid
      if (/^\$next_/.test(col.enter)) {
        nextId = col.enter.split('_')[1] + next.$$uuid
      }
      let node = document.getElementById(nextId)
      if (node) {
        if (setting.editType === 'multi') {
          if (setting.triType === 'click') {
@@ -1894,9 +1899,9 @@
    return (
      <>
        <div className="edit-custom-table-btn-wrap" style={submit.wrapStyle}>
        {setting.hasSubmit ? <div className="edit-custom-table-btn-wrap" style={submit.wrapStyle}>
          <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">提交</Button>
        </div>
        </div> : null}
        <div className={`edit-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'}`} id={tableId}>
          <Table
            rowKey="$$uuid"
@@ -1919,7 +1924,7 @@
            onChange={this.changeTable}
            pagination={_pagination}
          />
          {_data.length > 10 ? <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-footer-table" type="link">提交</Button> : null}
          {setting.hasSubmit && _data.length > 10 ? <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-footer-table" type="link">提交</Button> : null}
        </div>
      </>
    )