fangmingyue 2 年之前
父節點
當前提交
65fb1849f2
共有 3 個檔案被更改,包括 22 行新增8 行删除
  1. 1
    1
      src/pages/apply/verify/index.jsx
  2. 1
    0
      src/pages/home/index.jsx
  3. 20
    7
      src/utils/biz.js

+ 1
- 1
src/pages/apply/verify/index.jsx 查看文件

@@ -156,7 +156,7 @@ export default (props) => {
156 156
       }
157 157
     })
158 158
   }
159
-  console.log('applyInfo', applyInfo);
159
+  // console.log('applyInfo', applyInfo);
160 160
 
161 161
   return (
162 162
     <Page loading={loading}>

+ 1
- 0
src/pages/home/index.jsx 查看文件

@@ -61,6 +61,7 @@ const menus = {
61 61
     { icon: 'icon1', text: '未 处 理', link: `/pages/issue/list2/index?title=未处理&bizStatus=${PROCESS_START}` },
62 62
     { icon: 'icon2', text: '处 理 中', link: `/pages/issue/list2/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}` },
63 63
     { icon: 'icon3', text: '已 办 结', link: `/pages/issue/list2/index?title=已办结&bizStatus=${PROCESS_END}` },
64
+    { icon: 'icon5', text: '已 逾 期', link: '/pages/issue/list2/index?title=已逾期&bizStatus=expired' },
64 65
     { icon: 'icon7', text: '统计查询', link: '/subpkg1/pages/statistics/index' },
65 66
   ],
66 67
 

+ 20
- 7
src/utils/biz.js 查看文件

@@ -29,19 +29,30 @@ export const APPLY_PASS = "pass";
29 29
 export const APPLY_REJECT = "reject";
30 30
 
31 31
 
32
-export function getIssueStatus(taIssue) {
32
+export function getIssueStatus (taIssue) {
33
+
34
+  const isExpired = dayjs(taIssue.expireDate).add(1, 'day').format('YYYY-MM-DD') < dayjs().format('YYYY-MM-DD');
35
+
33 36
   if (taIssue.processStatus === APPLY_REJECT) {
34 37
     return {
35 38
       value: 4,
36 39
       label: '已打回',
37 40
     };
38 41
   } else if (taIssue.processNode === PROCESS_START) {
42
+
43
+    if (isExpired) {
44
+      return {
45
+        value: 3,
46
+        label: '已逾期',
47
+      };
48
+    }
49
+
39 50
     return {
40 51
       value: 0,
41 52
       label: '待交办',
42 53
     }
43 54
   } else if (taIssue.processNode === PROCESS_END) {
44
-    if (dayjs(taIssue.expireDate).add(1,'day').format('YYYY-MM-DD') < dayjs().format('YYYY-MM-DD')) {
55
+    if (dayjs(taIssue.expireDate).format('YYYY-MM-DD') < dayjs(taIssue.endDate).format('YYYY-MM-DD')) {
45 56
       return {
46 57
         value: 5,
47 58
         label: '逾期办结',
@@ -126,15 +137,17 @@ export function getIssueStatus(taIssue) {
126 137
       }
127 138
     }
128 139
 
140
+    if (isExpired) {
141
+      return {
142
+        value: 3,
143
+        label: '已逾期',
144
+      };
145
+    }
146
+
129 147
     return {
130 148
       value: 1,
131 149
       label: '已交办',
132 150
     };
133
-  } else if (taIssue.processNode !== PROCESS_END && dayjs(taIssue.expireDate).add(1,'day').format('YYYY-MM-DD') < dayjs().format('YYYY-MM-DD')) {
134
-    return {
135
-      value: 3,
136
-      label: '已逾期',
137
-    };
138 151
   }
139 152
 
140 153
   return {};