浏览代码

Merge branch 'dev' of http://192.168.1.41:3000/lanjianrong/financial_audit_console into dev

outaozhen 3 年之前
父节点
当前提交
4969ec0bd2
共有 1 个文件被更改,包括 18 次插入15 次删除
  1. 18 15
      src/pages/Project/Verification/Detail/Flow/components/Drawer/index.tsx

+ 18 - 15
src/pages/Project/Verification/Detail/Flow/components/Drawer/index.tsx

@@ -88,22 +88,25 @@ const FlowDrawer = () => {
       approvalWay: state.approvalWay,
       accounts: state.accounts
     }
-    const { code = -1 } = await saveApprovalParticipant({
-      ID: dataID,
-      segmentID: nodeID,
-      participantInfo
-    })
-    if (code === consts.RET_CODE.SUCCESS) {
-      message.success('保存成功')
-      setTimeout(() => {
-        dispatch({
-          type: Actions.SET_FLOW_NODE,
-          payload
-        })
-      }, 80)
-      handleCancel()
+    try {
+      const { code = -1 } = await saveApprovalParticipant({
+        ID: dataID,
+        segmentID: nodeID,
+        participantInfo
+      })
+      if (code === consts.RET_CODE.SUCCESS) {
+        message.success('保存成功')
+        setTimeout(() => {
+          dispatch({
+            type: Actions.SET_FLOW_NODE,
+            payload
+          })
+        }, 80)
+        handleCancel()
+      }
+    } finally {
+      setState({ ...state, loading: false })
     }
-    setState({ ...state, loading: false })
   }
 
   // 添加用户-参与者卡片