Yansen пре 2 година
родитељ
комит
93a4493e01

+ 1
- 1
src/components/PowerList/index.jsx Прегледај датотеку

@@ -55,7 +55,7 @@ export default (props) => {
55 55
   React.useEffect(() => {
56 56
     pageNumRef.current = 1;
57 57
     queryData({pageNum : pageNumRef.current});
58
-  }, [queryData])
58
+  }, [queryData]);
59 59
   
60 60
   return (
61 61
     <PowerScrollView

+ 5
- 0
src/layouts/index.jsx Прегледај датотеку

@@ -26,6 +26,11 @@ export default (props) => {
26 26
     }
27 27
   }, [person, user]);
28 28
 
29
+
30
+  Taro.useDidShow(() => {
31
+    console.log('--------useDidShow-----')
32
+  });
33
+
29 34
   return (
30 35
     <View className={laySty['page-wrapper']}>
31 36
       <Notify id="vanNotify" />

+ 38
- 20
src/pages/apply/verify/index.jsx Прегледај датотеку

@@ -6,7 +6,7 @@ import { Cell, CellGroup, Field, Button, Radio, RadioGroup } from '@antmjs/vantu
6 6
 import Uploader from '@/components/Uploader/index';
7 7
 import { putTaIssueApply, getTaIssueApplyById } from '@/services/taissueapply';
8 8
 import { warn } from '@/utils/message';
9
-import { APPLY_PASS, APPLY_REJECT, PROCESS_APPLY_DELAY } from '@/utils/biz';
9
+import { APPLY_PASS, APPLY_REJECT, PROCESS_APPLY_DELAY, PROCESS_APPLY_REJECT } from '@/utils/biz';
10 10
 import Issue from '../components/Issue';
11 11
 import useTitle from '../useTitle';
12 12
 import { getTaOrgIssueByIssueId } from '@/services/taorgissue';
@@ -93,27 +93,45 @@ export default (props) => {
93 93
           </CellGroup>
94 94
         )
95 95
      }
96
-     
97
-      <CellGroup style={{marginTop: '20px'}}>
98
-        <Cell title="整改结果" />
99
-        <Field
100
-          readonly
101
-          type="textarea"
102
-          autosize={{ minHeight: '120px' }}
103
-          value={orgIssue.result}
104
-        />
105 96
 
106
-        <Cell title="整改照片" border={false} />
107
-        <Cell
108
-          renderTitle={
109
-            <Uploader
110
-              disabled
111
-              value={orgIssue.attachList}
97
+     {
98
+        applyInfo.applyType == PROCESS_APPLY_REJECT && (
99
+          <CellGroup style={{marginTop: '20px'}}>
100
+            <Cell title="申请说明" />
101
+            <Field
102
+              readonly
103
+              type="textarea"
104
+              autosize={{ minHeight: '120px' }}
105
+              value={applyInfo.remark}
112 106
             />
113
-          }
114
-        />
115
-      </CellGroup>
116
-     
107
+          </CellGroup>
108
+        )
109
+     }
110
+
111
+     {
112
+        applyInfo.applyType != PROCESS_APPLY_DELAY && applyInfo.applyType != PROCESS_APPLY_REJECT && (
113
+          <CellGroup style={{marginTop: '20px'}}>
114
+            <Cell title="整改结果" />
115
+            <Field
116
+              readonly
117
+              type="textarea"
118
+              autosize={{ minHeight: '120px' }}
119
+              value={orgIssue.result}
120
+            />
121
+    
122
+            <Cell title="整改照片" border={false} />
123
+            <Cell
124
+              renderTitle={
125
+                <Uploader
126
+                  disabled
127
+                  value={orgIssue.attachList}
128
+                />
129
+              }
130
+            />
131
+          </CellGroup>
132
+        )
133
+     }
134
+          
117 135
       <CellGroup style={{marginTop: '20px'}}>
118 136
         <Cell
119 137
           title="审批结果"

+ 1
- 1
src/pages/home/components/Head.jsx Прегледај датотеку

@@ -27,7 +27,7 @@ export default (props) => {
27 27
   }, [dutyList]);
28 28
 
29 29
   const onClick = () => {
30
-    if (dutyList.length < 1) return;
30
+    if (dutyList.length < 2) return;
31 31
     setShow(true);
32 32
   }
33 33
 

+ 3
- 2
src/pages/home/index.jsx Прегледај датотеку

@@ -4,7 +4,7 @@ import Page from '@/layouts/index';
4 4
 import { useModel } from '@/store';
5 5
 import MenuIcon from '@/components/MenuIcon';
6 6
 import { ROLE_CITIZEN, ROLE_INSPECTOR, ROLE_MANAGER, ROLE_ORG_USER, ROLE_QUERY_PERSON } from '@/utils/user';
7
-import { PROCESS_APPLY_DELAY, PROCESS_APPLY_END, PROCESS_ASSIGNED, PROCESS_END, PROCESS_START } from '@/utils/biz';
7
+import { PROCESS_APPLY_DELAY, PROCESS_APPLY_END, PROCESS_APPLY_REJECT, PROCESS_ASSIGNED, PROCESS_END, PROCESS_START } from '@/utils/biz';
8 8
 import Head from './components/Head';
9 9
 import Banner from './components/Banner';
10 10
 import StatCard from './components/StatCard';
@@ -26,6 +26,7 @@ const menus = {
26 26
     { icon: 'icon4', text: '消单申请', link: `/pages/apply/list/index?title=消单申请&applyType=${PROCESS_APPLY_END}` },
27 27
     { icon: 'icon5', text: '逾期警告', link: `/pages/issue/list2/index?title=逾期警告&bizStatus=expired` },
28 28
     { icon: 'icon6', text: '延期申请', link: `/pages/apply/list/index?title=延期申请&applyType=${PROCESS_APPLY_DELAY}` },
29
+    { icon: 'icon12', text: '驳回申请', link: `/pages/apply/list/index?title=驳回申请&applyType=${PROCESS_APPLY_REJECT}` },
29 30
     { icon: 'icon7', text: '统计查询', link: '/subpkg1/pages/statistics/index' },
30 31
     { icon: 'icon9', text: '我的上报', link: '/pages/issue/list2/index?title=我的上报&mine=true' },
31 32
     { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index' },
@@ -35,7 +36,7 @@ const menus = {
35 36
   [ROLE_ORG_USER]: [
36 37
     { icon: 'icon2', text: '处 理 中', link: `/pages/org/issue/list/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}` },
37 38
     { icon: 'icon3', text: '已 办 结', link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}` },
38
-    { icon: 'icon5', text: '已 逾 期', link: '' },
39
+    { icon: 'icon5', text: '已 逾 期', link: '/pages/org/issue/list/index?title=已办结&bizStatus=expired' },
39 40
     { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index' },
40 41
   ],
41 42
 

+ 1
- 1
src/pages/issue/edit/components/Edit.jsx Прегледај датотеку

@@ -24,7 +24,7 @@ export default (props) => {
24 24
     }
25 25
 
26 26
     setLoading(true)
27
-    putTaIssue(issue.issueId, { ...issue, formData }).then(() => {
27
+    putTaIssue(issue.issueId, { ...issue, ...formData }).then(() => {
28 28
       setLoading(false);
29 29
       Taro.navigateBack({
30 30
         delta: 1,

+ 24
- 9
src/pages/org/issue/detail/components/Apply.jsx Прегледај датотеку

@@ -56,10 +56,14 @@ export default (props) => {
56 56
   const onSubmit = () => {
57 57
     try {
58 58
       warn(!orgIssue || !orgIssue.issueId, '未找到问题单');
59
-      warn(!orgIssue.attachList || !orgIssue.attachList.length, '请上传照片');
60
-      warn(!orgIssue.result, '请填写整改结果');
59
+
60
+      if (applyType == PROCESS_APPLY_VERIFY || applyType == PROCESS_APPLY_END) {
61
+        warn(!orgIssue.attachList || !orgIssue.attachList.length, '请上传照片');
62
+        warn(!orgIssue.result, '请填写整改结果');
63
+      }
61 64
 
62 65
       warn(applyType == PROCESS_APPLY_DELAY && !formData.content, '请设置延期时间');
66
+      warn(applyType == PROCESS_APPLY_REJECT && !formData.remark, '请填写驳回理由');
63 67
     } catch (e) {
64 68
       return ;
65 69
     }
@@ -70,20 +74,31 @@ export default (props) => {
70 74
       ...formData
71 75
     }
72 76
 
73
-    // 先保存数据
74
-    setSubmitting(true);
75
-    putTaOrgIssue(orgIssue.orgIssueId, orgIssue).then(() => {
76
-      // 再调用申请接口
77
+    if (applyType == PROCESS_APPLY_VERIFY || applyType == PROCESS_APPLY_END) {
78
+      // 先保存数据
79
+      setSubmitting(true);
80
+      putTaOrgIssue(orgIssue.orgIssueId, orgIssue).then(() => {
81
+        // 再调用申请接口
82
+        postTaIssueApply(data).then(() => {
83
+          Taro.navigateBack({delta: 1});
84
+          setSubmitting(false);
85
+        }).catch(() => {
86
+          setSubmitting(false);
87
+        })
88
+      }).catch(() => {
89
+        setSubmitting(false);
90
+      })
91
+    } else {
92
+      // 直接调用申请接口
77 93
       postTaIssueApply(data).then(() => {
78 94
         Taro.navigateBack({delta: 1});
79 95
         setSubmitting(false);
80 96
       }).catch(() => {
81 97
         setSubmitting(false);
82 98
       })
83
-    }).catch(() => {
84
-      setSubmitting(false);
85
-    })
99
+    }
86 100
   }
101
+
87 102
   
88 103
   return (
89 104
     <>