From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 四月 2022 19:23:18 +0800
Subject: [PATCH] 2022-04-26

---
 src/tabviews/zshare/actionList/printbutton/index.jsx |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index 90ae0dd..6c14dd2 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -54,7 +54,7 @@
 
     if (btn.controlField && selectedData && selectedData.length > 0) { // 琛ㄦ牸涓寜閽殣钘忔帶鍒�
       selectedData.forEach(item => {
-        let s = item[btn.controlField] + ''
+        let s = item[btn.controlField] !== undefined ? item[btn.controlField] + '' : ''
         if (s === btn.controlVal || (btn.controlVal && btn.controlVal.split(',').includes(s))) {
           disabled = true
         }
@@ -99,7 +99,7 @@
     if (btn.controlField && !is(fromJS(nextProps.selectedData || []), fromJS(selectedData || []))) {
       if (nextProps.selectedData && nextProps.selectedData.length > 0) { // 琛ㄦ牸涓寜閽殣钘忔帶鍒�
         nextProps.selectedData.forEach(item => {
-          let s = item[btn.controlField] + ''
+          let s = item[btn.controlField] !== undefined ? item[btn.controlField] + '' : ''
           if (s === btn.controlVal || (btn.controlVal && btn.controlVal.split(',').includes(s))) {
             disabled = true
           }
@@ -1269,7 +1269,7 @@
     const { btn } = this.props
     const { autoMatic } = this.state
 
-    if ((res && res.ErrCode === 'S') || autoMatic) { // 鎵ц鎴愬姛
+    if ((res && (res.ErrCode === 'S' || !res.ErrCode)) || autoMatic) { // 鎵ц鎴愬姛
       notification.success({
         top: 92,
         message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
@@ -1618,6 +1618,7 @@
           icon={btn.icon}
           loading={loading}
           disabled={disabled}
+          title={disabled ? (btn.reason || '') : ''}
           className={'mk-btn mk-' + btn.class}
           onClick={() => {this.actionTrigger()}}
         >{loadingNumber ? `(${loadingNumber})` : '' + btn.label}</Button>
@@ -1643,7 +1644,7 @@
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         <Button
           type="link"
-          title={show === 'icon' ? btn.label : ''}
+          title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')}
           loading={loading}
           disabled={disabled}
           style={btn.style}

--
Gitblit v1.8.0