From ff045a6a19e2e0bd5c2433aae71145401627c22d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 19 十二月 2019 19:08:32 +0800
Subject: [PATCH] 2019-12-19

---
 src/tabviews/commontable/mainAction/index.jsx |   40 +++++++++++++++++++++++++++++-----------
 1 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/commontable/mainAction/index.jsx b/src/tabviews/commontable/mainAction/index.jsx
index 096c27c..144b880 100644
--- a/src/tabviews/commontable/mainAction/index.jsx
+++ b/src/tabviews/commontable/mainAction/index.jsx
@@ -32,11 +32,15 @@
     this.props.refreshdata(item, type)
   }
   
-  actionTrigger = (item) => {
+  actionTrigger = (item, record) => {
     const { setting } = this.props
 
     let _this = this
     let data = this.props.gettableselected() || []
+    
+    if (record) { // 琛ㄦ牸涓Е鍙戞寜閽�
+      data = [record]
+    }
 
     if (item.Ot !== 'notRequired' && data.length === 0) {
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
@@ -88,6 +92,7 @@
         this.improveAction(item)
       })
     } else if (item.OpenType === 'excelOut') {
+      this.setState({loadingUuid: item.uuid})
       this.refreshdata(item, 'excelOut')
     } else {
       notification.warning({
@@ -497,11 +502,17 @@
   }
 
   execSuccess = (btn) => {
-    notification.success({
-      top: 92,
-      message: this.props.dict['main.action.confirm.success'],
-      duration: 2
-    })
+    if (btn.OpenType === 'excelOut') {
+      this.setState({
+        loadingUuid: ''
+      })
+    } else {
+      notification.success({
+        top: 92,
+        message: this.props.dict['main.action.confirm.success'],
+        duration: 2
+      })
+    }
     
     if (btn.OpenType === 'pop' && btn.setting && btn.setting.finish !== 'unclose') {
       this.setState({
@@ -512,11 +523,18 @@
   }
 
   execError = (res, btn) => {
-    notification.error({
-      top: 92,
-      message: res.message,
-      duration: 15
-    })
+    if (!res.ErrCode || res.ErrCode === 'E') {
+      notification.error({
+        top: 92,
+        message: res.message || res.ErrMesg,
+        duration: 15
+      })
+    } else if (res.ErrCode === 'E') {
+      Modal.error({
+        title: res.message || res.ErrMesg
+      })
+    }
+    
     this.refreshdata(btn, 'error')
   }
 

--
Gitblit v1.8.0