From 6c2d1d9e4869c95d4ad79abc611239da178c72f2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 10 六月 2023 16:04:18 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
index 47fb9f2..ec88944 100644
--- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
+++ b/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>
       </>
     )

--
Gitblit v1.8.0