From eb0482b3fc2e91a626baa6ac73e75e0b0038f552 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 03 十一月 2023 01:25:59 +0800
Subject: [PATCH] 2023-11-03

---
 src/tabviews/custom/components/module/voucher/voucherTable/index.jsx |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
index ff923d4..ba436ea 100644
--- a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
+++ b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
@@ -237,9 +237,9 @@
 
     setTimeout(() => {
       if (col.field === 'debit' && (line.debit || line.debit === 0)) {
-        MKEmitter.emit('nextLine', col, record)
+        MKEmitter.emit('nextVoucher', col, record)
       } else if (col.field === 'credit') {
-        MKEmitter.emit('nextLine', col, record)
+        MKEmitter.emit('nextVoucher', col, record)
       } else {
         let cl = {subject_voucher_text: 'subject_code', subject_code: 'debit', debit: 'credit'}
         MKEmitter.emit('tdFocus', cl[col.uuid] + record.uuid)
@@ -327,10 +327,10 @@
     MKEmitter.emit('plusLine', col.tableId, record)
   }
 
-  delRecord = () => {
+  delVoucher = () => {
     const { col, record } = this.props
 
-    MKEmitter.emit('delRecord', col.tableId, record)
+    MKEmitter.emit('delVoucher', col.tableId, record)
   }
 
   onSelectBlur = () => {
@@ -936,7 +936,7 @@
         </div>
       }
     } else if (col.field === 'credit') {
-      extra = <CloseOutlined onClick={this.delRecord}/>
+      extra = <CloseOutlined onClick={this.delVoucher}/>
 
       if (editing) {
         children = <InputNumber id={col.uuid + record.uuid} precision={2} defaultValue={record.credit} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress} onBlur={this.onBlur}/>
@@ -1049,10 +1049,10 @@
   }
 
   componentDidMount () {
-    MKEmitter.addListener('nextLine', this.nextLine)
     MKEmitter.addListener('plusLine', this.plusLine)
-    MKEmitter.addListener('delRecord', this.delRecord)
+    MKEmitter.addListener('delVoucher', this.delVoucher)
     MKEmitter.addListener('cleartable', this.cleartable)
+    MKEmitter.addListener('nextVoucher', this.nextVoucher)
     MKEmitter.addListener('changeRecord', this.changeRecord)
   }
 
@@ -1063,10 +1063,10 @@
     this.setState = () => {
       return
     }
-    MKEmitter.removeListener('nextLine', this.nextLine)
     MKEmitter.removeListener('plusLine', this.plusLine)
-    MKEmitter.removeListener('delRecord', this.delRecord)
+    MKEmitter.removeListener('delVoucher', this.delVoucher)
     MKEmitter.removeListener('cleartable', this.cleartable)
+    MKEmitter.removeListener('nextVoucher', this.nextVoucher)
     MKEmitter.removeListener('changeRecord', this.changeRecord)
   }
 
@@ -1240,7 +1240,7 @@
     return ChineseStr
   }
 
-  nextLine = (col, record) => {
+  nextVoucher = (col, record) => {
     const { edData, tableId } = this.state
 
     if (col.tableId !== tableId) return
@@ -1278,7 +1278,7 @@
     this.props.onChange(_data)
   }
 
-  delRecord = (id, record) => {
+  delVoucher = (id, record) => {
     const { tableId, edData } = this.state
 
     if (id !== tableId) return

--
Gitblit v1.8.0