From 10c86c1fab41f01c7bf7fcb9d2f8b624142f6a54 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 13 九月 2022 14:42:33 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/zshare/actionList/printbutton/index.jsx |   27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index d2bfa95..ba05bff 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -38,6 +38,7 @@
     formdata: null,
     selines: null,
     btnconfig: null,
+    confirmLoading: false,
     loading: false,
     disabled: false,
     hidden: false,
@@ -1347,7 +1348,7 @@
    */
   execSuccess = (res) => {
     const { btn } = this.props
-    const { autoMatic } = this.state
+    const { autoMatic, btnconfig } = this.state
 
     if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 鎵ц鎴愬姛
       notification.success({
@@ -1363,8 +1364,15 @@
 
     }
 
+    if (autoMatic || !btnconfig || btnconfig.setting.finish !== 'unclose') {
+      this.setState({
+        visible: false
+      })
+    }
+
     this.setState({
-      loading: false
+      loading: false,
+      confirmLoading: false
     })
 
     if (autoMatic) {
@@ -1409,7 +1417,8 @@
     }
     
     this.setState({
-      loading: false
+      loading: false,
+      confirmLoading: false
     })
 
     if (autoMatic) {
@@ -1529,16 +1538,10 @@
    * @description 妯℃�佹锛堣〃鍗曪級锛岀‘璁�
    */
   handleOk = () => {
-    const { btnconfig, autoMatic } = this.state
-
     if (!this.formRef) return
 
     this.formRef.handleConfirm().then(res => {
-      if (btnconfig.setting.finish !== 'unclose' || autoMatic) {
-        this.setState({
-          visible: false
-        })
-      }
+      this.setState({ confirmLoading: true })
       this.triggerPrint(this.state.selines, res)
     })
   }
@@ -1549,7 +1552,8 @@
   handleCancel = () => {
     this.setState({
       loading: false,
-      visible: false
+      visible: false,
+      confirmLoading: false
     })
   }
 
@@ -1679,6 +1683,7 @@
         getContainer={container}
         wrapClassName='action-modal'
         visible={this.state.visible}
+        confirmLoading={this.state.confirmLoading}
         width={width}
         onOk={this.handleOk}
         onCancel={this.handleCancel}

--
Gitblit v1.8.0