fangmingyue 2 anos atrás
pai
commit
7fa144686a

+ 14
- 1
src/pages/apply/components/Issue.jsx Ver arquivo

@@ -4,12 +4,14 @@ import { View } from '@tarojs/components';
4 4
 import { Cell, CellGroup, Field, Button } from '@antmjs/vantui';
5 5
 import Uploader from '@/components/Uploader/index';
6 6
 import { getTaIssueById } from '@/services/taissue';
7
+import { getSysOrgById } from '@/services/sysorg';
7 8
 import { getDtStr } from '@/utils/date';
8 9
 
9 10
 export default (props) => {
10 11
   const { issueId, onLoading } = props;
11 12
 
12 13
   const [issue, setIssue] = React.useState({});
14
+  const [org, setOrg] = React.useState({});
13 15
 
14 16
   const setLoading = (val) => {
15 17
     if (onLoading) {
@@ -22,6 +24,17 @@ export default (props) => {
22 24
       setLoading(true);
23 25
       getTaIssueById(issueId).then((res) => {
24 26
         setIssue(res);
27
+        //拿到机构ID
28
+        if (res.orgId) {
29
+          // console.log('res.orgId', res.orgId)
30
+          setLoading(true);
31
+          getSysOrgById(res.orgId).then((r) => {
32
+            setOrg(r);
33
+            setLoading(false);
34
+          }).catch(() => {
35
+            setLoading(false);
36
+          });
37
+        }
25 38
         setLoading(false);
26 39
       }).catch(() => {
27 40
         setLoading(false);
@@ -35,7 +48,7 @@ export default (props) => {
35 48
         <Cell title="ID" value={issue?.issueId} />
36 49
         <Cell title="上报时间" value={getDtStr(issue?.createDate)} />
37 50
         <Cell title="办结时间" value={issue?.expireDate} />
38
-        <Cell title="交办单位" value={issue?.locName} />
51
+        <Cell title="交办单位" value={org?.name} />
39 52
         <Cell title="交办次数" value={issue?.processNum || 0} />
40 53
       </CellGroup>
41 54
       <CellGroup style={{ marginTop: '20px' }}>

+ 22
- 4
src/pages/apply/verify/index.jsx Ver arquivo

@@ -53,9 +53,27 @@ export default (props) => {
53 53
     }
54 54
 
55 55
     setSubmitting(true);
56
-    putTaIssueApply(data.applyId, data).then(() => {
57
-      Taro.navigateBack({ delta: 1 });
58
-      setSubmitting(false);
56
+    putTaIssueApply(data.applyId, data).then((res) => {
57
+      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 });
75
+        setSubmitting(false);
76
+      }
59 77
     }).catch(() => {
60 78
       setSubmitting(false);
61 79
     })
@@ -107,7 +125,7 @@ export default (props) => {
107 125
       message: '确认复制当前问题单?',
108 126
       selector: dialogId,
109 127
     }).then((value) => {
110
-      console.log('2value', value);
128
+      // console.log('2value', value);
111 129
       if ('confirm' === value) {
112 130
         setLoading2(true)
113 131
         copyTaIssue(issue.issueId).then(res => {