فهرست منبع

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 })
   }
 
   // 添加用户-参与者卡片