Yansen 2 jaren geleden
bovenliggende
commit
93a4493e01

+ 1
- 1
src/components/PowerList/index.jsx Bestand weergeven

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

+ 5
- 0
src/layouts/index.jsx Bestand weergeven

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

+ 38
- 20
src/pages/apply/verify/index.jsx Bestand weergeven

6
 import Uploader from '@/components/Uploader/index';
6
 import Uploader from '@/components/Uploader/index';
7
 import { putTaIssueApply, getTaIssueApplyById } from '@/services/taissueapply';
7
 import { putTaIssueApply, getTaIssueApplyById } from '@/services/taissueapply';
8
 import { warn } from '@/utils/message';
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
 import Issue from '../components/Issue';
10
 import Issue from '../components/Issue';
11
 import useTitle from '../useTitle';
11
 import useTitle from '../useTitle';
12
 import { getTaOrgIssueByIssueId } from '@/services/taorgissue';
12
 import { getTaOrgIssueByIssueId } from '@/services/taorgissue';
93
           </CellGroup>
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
       <CellGroup style={{marginTop: '20px'}}>
135
       <CellGroup style={{marginTop: '20px'}}>
118
         <Cell
136
         <Cell
119
           title="审批结果"
137
           title="审批结果"

+ 1
- 1
src/pages/home/components/Head.jsx Bestand weergeven

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

+ 3
- 2
src/pages/home/index.jsx Bestand weergeven

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

+ 1
- 1
src/pages/issue/edit/components/Edit.jsx Bestand weergeven

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

+ 24
- 9
src/pages/org/issue/detail/components/Apply.jsx Bestand weergeven

56
   const onSubmit = () => {
56
   const onSubmit = () => {
57
     try {
57
     try {
58
       warn(!orgIssue || !orgIssue.issueId, '未找到问题单');
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
       warn(applyType == PROCESS_APPLY_DELAY && !formData.content, '请设置延期时间');
65
       warn(applyType == PROCESS_APPLY_DELAY && !formData.content, '请设置延期时间');
66
+      warn(applyType == PROCESS_APPLY_REJECT && !formData.remark, '请填写驳回理由');
63
     } catch (e) {
67
     } catch (e) {
64
       return ;
68
       return ;
65
     }
69
     }
70
       ...formData
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
       postTaIssueApply(data).then(() => {
93
       postTaIssueApply(data).then(() => {
78
         Taro.navigateBack({delta: 1});
94
         Taro.navigateBack({delta: 1});
79
         setSubmitting(false);
95
         setSubmitting(false);
80
       }).catch(() => {
96
       }).catch(() => {
81
         setSubmitting(false);
97
         setSubmitting(false);
82
       })
98
       })
83
-    }).catch(() => {
84
-      setSubmitting(false);
85
-    })
99
+    }
86
   }
100
   }
101
+
87
   
102
   
88
   return (
103
   return (
89
     <>
104
     <>