fangmingyue 2 years ago
parent
commit
b44aa1cc0b
1 changed files with 22 additions and 17 deletions
  1. 22
    17
      src/pages/apply/verify/index.jsx

+ 22
- 17
src/pages/apply/verify/index.jsx View File

@@ -54,24 +54,28 @@ export default (props) => {
54 54
 
55 55
     setSubmitting(true);
56 56
     putTaIssueApply(data.applyId, data).then((res) => {
57
+
57 58
       if (formData.verifyStatus == 'pass') {
58
-        // Dialog 有 bug,
59
-        // 使用 setTimeout 延迟一会规避一下
60
-        const t = setTimeout(() => {
61
-          clearTimeout(t);
62
-          Dialog.confirm({
63
-            title: '审批通过',
64
-            message: `确定要跳转问题单详情页吗?`,
65
-            selector: dialogId,
66
-          }).then((value2) => {
67
-            if ('confirm' === value2) {
68
-              Taro.navigateTo({
69
-                url: `/pages/issue/edit/index?id=${res.issueId}`
70
-              })
71
-            }
72
-          });
73
-        }, 500);
74
-        // Taro.navigateBack({ delta: 1 });
59
+        if (applyInfo.applyType == '0201') {
60
+          // Dialog 有 bug,
61
+          // 使用 setTimeout 延迟一会规避一下
62
+          const t = setTimeout(() => {
63
+            clearTimeout(t);
64
+            Dialog.confirm({
65
+              title: '审批通过',
66
+              message: `确定要跳转问题单详情页吗?`,
67
+              selector: dialogId,
68
+            }).then((value2) => {
69
+              if ('confirm' === value2) {
70
+                Taro.navigateTo({
71
+                  url: `/pages/issue/edit/index?id=${res.issueId}`
72
+                })
73
+              }
74
+            });
75
+          }, 500);
76
+        } else {
77
+          Taro.navigateBack({ delta: 1 });
78
+        }
75 79
         setSubmitting(false);
76 80
       }
77 81
     }).catch(() => {
@@ -153,6 +157,7 @@ export default (props) => {
153 157
       }
154 158
     })
155 159
   }
160
+  console.log('applyInfo', applyInfo);
156 161
 
157 162
   return (
158 163
     <Page loading={loading}>