张涛 преди 2 години
родител
ревизия
5afe7b244e
променени са 5 файла, в които са добавени 2492 реда и са изтрити 85 реда
  1. 29
    25
      src/pages/issue/detail/components/ApplyInfo.jsx
  2. 1
    1
      src/pages/issue/detail/components/BasicProfile.jsx
  3. 85
    46
      src/pages/issue/index.jsx
  4. 13
    13
      src/utils/biz.js
  5. 2364
    0
      yarn.lock

+ 29
- 25
src/pages/issue/detail/components/ApplyInfo.jsx Целия файл

@@ -1,13 +1,13 @@
1
-import React from 'react';
2
-import { ProTable } from '@ant-design/pro-components';
3
-import { Card } from 'antd';
4
-import { getTaIssueApply } from '@/service/taissueapply';
5
-import { getSysOrg } from '@/service/sysorg';
6
-import { queryTable, queryDict } from '@/utils/request';
7
-import useBool from '@/utils/hooks/useBool';
8
-import { processEnum } from '@/utils/biz';
1
+import React from "react";
2
+import { ProTable } from "@ant-design/pro-components";
3
+import { Card } from "antd";
4
+import { getTaIssueApply } from "@/service/taissueapply";
5
+import { getSysOrg } from "@/service/sysorg";
6
+import { queryTable, queryDict } from "@/utils/request";
7
+import useBool from "@/utils/hooks/useBool";
8
+import { processEnum } from "@/utils/biz";
9 9
 
10
-const fetchOrg = queryDict(getSysOrg, { labelKey: 'name', valueKey: 'orgId' });
10
+const fetchOrg = queryDict(getSysOrg, { labelKey: "name", valueKey: "orgId" });
11 11
 const fetchData = queryTable(getTaIssueApply);
12 12
 
13 13
 export default (props) => {
@@ -17,12 +17,16 @@ export default (props) => {
17 17
     {
18 18
       title: "申请日期",
19 19
       dataIndex: "createDate",
20
-      valueType: 'date',
20
+      valueType: "date",
21 21
     },
22 22
     {
23 23
       title: "申请类别",
24 24
       dataIndex: "applyType",
25
-      valueEnum: processEnum
25
+      valueEnum: processEnum,
26
+    },
27
+    {
28
+      title: "申请理由",
29
+      dataIndex: "remark",
26 30
     },
27 31
     {
28 32
       title: "申请人",
@@ -31,7 +35,7 @@ export default (props) => {
31 35
     {
32 36
       title: "审批日期",
33 37
       dataIndex: "verifyDate",
34
-      valueType: 'date',
38
+      valueType: "date",
35 39
     },
36 40
     {
37 41
       title: "审批人",
@@ -42,18 +46,18 @@ export default (props) => {
42 46
       dataIndex: "verifyStatus",
43 47
       valueEnum: {
44 48
         ready: {
45
-          text: '未审批',
46
-          status: 'Default',
49
+          text: "未审批",
50
+          status: "Default",
47 51
         },
48 52
         pass: {
49
-          text: '通过',
50
-          status: 'Success',
53
+          text: "通过",
54
+          status: "Success",
51 55
         },
52 56
         reject: {
53
-          text: '驳回',
54
-          status: 'Error',
57
+          text: "驳回",
58
+          status: "Error",
55 59
         },
56
-      }
60
+      },
57 61
     },
58 62
     {
59 63
       title: "审批意见",
@@ -61,11 +65,11 @@ export default (props) => {
61 65
     },
62 66
     {
63 67
       title: "申请单位",
64
-      valueType: 'select',
68
+      valueType: "select",
65 69
       dataIndex: "orgId",
66
-      request: fetchOrg
67
-    }
68
-  ]
70
+      request: fetchOrg,
71
+    },
72
+  ];
69 73
 
70 74
   return (
71 75
     <Card title="申请流程">
@@ -78,5 +82,5 @@ export default (props) => {
78 82
         toolBarRender={false}
79 83
       />
80 84
     </Card>
81
-  )
82
-}
85
+  );
86
+};

+ 1
- 1
src/pages/issue/detail/components/BasicProfile.jsx Целия файл

@@ -58,7 +58,7 @@ export default (props) => {
58 58
       });
59 59
     }
60 60
   }, [issueId]);
61
-
61
+console.log(detail)
62 62
   return (
63 63
     <Card title="基础信息" loading={loading}>
64 64
       <Descriptions layout="vertical" column={3} bordered>

+ 85
- 46
src/pages/issue/index.jsx Целия файл

@@ -1,21 +1,28 @@
1
-import React from 'react';
2
-import { Button, Badge } from 'antd';
3
-import { useNavigate } from 'react-router-dom';
4
-import List from '@/components/Page/List';
5
-import { getTaIssue, getTaOrgIssue, exportTaIssue, exportTaOrgIssue } from '@/service/taissue';
6
-import { getTdLocType } from '@/service/tdloctype';
7
-import { getSysOrg } from '@/service/sysorg';
8
-import { queryDict } from '@/utils/request';
9
-import { processEnum, processStatus } from '@/utils/biz';
10
-import useBool from '@/utils/hooks/useBool';
11
-import useOrgResponsible from '@/utils/hooks/useOrgResponsible';
12
-import dayjs from 'dayjs';
1
+import React from "react";
2
+import { Button, Badge } from "antd";
3
+import { useNavigate } from "react-router-dom";
4
+import List from "@/components/Page/List";
5
+import {
6
+  getTaIssue,
7
+  getTaOrgIssue,
8
+  exportTaIssue,
9
+  exportTaOrgIssue,
10
+} from "@/service/taissue";
11
+import { getTdLocType } from "@/service/tdloctype";
12
+import { getSysOrg } from "@/service/sysorg";
13
+import { queryDict } from "@/utils/request";
14
+import { processEnum, processStatus } from "@/utils/biz";
15
+import useBool from "@/utils/hooks/useBool";
16
+import useOrgResponsible from "@/utils/hooks/useOrgResponsible";
17
+import dayjs from "dayjs";
13 18
 
14
-const queryOrg = queryDict(getSysOrg, { labelKey: 'name', valueKey: 'orgId' });
15
-const queryLocType = queryDict(getTdLocType, { labelKey: 'name', valueKey: 'typeId' });
16
-
17
-const yestoday = dayjs().subtract(1, 'day').format('YYYY-MM-DD');
19
+const queryOrg = queryDict(getSysOrg, { labelKey: "name", valueKey: "orgId" });
20
+const queryLocType = queryDict(getTdLocType, {
21
+  labelKey: "name",
22
+  valueKey: "typeId",
23
+});
18 24
 
25
+const yestoday = dayjs().subtract(1, "day").format("YYYY-MM-DD");
19 26
 export default (props) => {
20 27
   const [loading, startLoading, stopLoading] = useBool();
21 28
   const navigate = useNavigate();
@@ -27,7 +34,7 @@ export default (props) => {
27 34
       isResponsible ? getTaOrgIssue : getTaIssue,
28 35
       isResponsible ? { orgId: org?.orgId } : { all: true },
29 36
       isResponsible ? exportTaOrgIssue : exportTaIssue,
30
-    ]
37
+    ];
31 38
   }, [isResponsible, org]);
32 39
 
33 40
   const columns = [
@@ -35,16 +42,44 @@ export default (props) => {
35 42
       title: "问题单号",
36 43
       dataIndex: "issueId",
37 44
     },
45
+    {
46
+      title: "创建时间",
47
+      dataIndex: "createdAt",
48
+      valueType: "dateRange",
49
+      hideInTable: true,
50
+      search: {
51
+        transform: (value) => {
52
+          return {
53
+            createDateStart: value[0],
54
+            createDateEnd: value[1],
55
+          };
56
+        },
57
+      },
58
+    },
59
+    {
60
+      title: "办结时间",
61
+      dataIndex: "createdAts",
62
+      valueType: "dateRange",
63
+      hideInTable: true,
64
+      search: {
65
+        transform: (value) => {
66
+          return {
67
+            endDateStart: value[0],
68
+            endDateEnd: value[1],
69
+          };
70
+        },
71
+      },
72
+    },
38 73
     {
39 74
       title: "上报日期",
40 75
       dataIndex: "createDate",
41
-      valueType: 'date',
76
+      valueType: "date",
42 77
       hideInSearch: true,
43 78
     },
44 79
     {
45 80
       title: "点位",
46 81
       dataIndex: "locId",
47
-      valueType: 'select',
82
+      valueType: "select",
48 83
       request: queryLocType,
49 84
     },
50 85
     {
@@ -61,23 +96,26 @@ export default (props) => {
61 96
     {
62 97
       title: "责任单位",
63 98
       dataIndex: "orgId",
64
-      valueType: 'select',
99
+      valueType: "select",
65 100
       request: queryOrg,
66 101
       hideInSearch: isResponsible,
67 102
     },
68 103
     {
69 104
       title: "流程状态",
70 105
       dataIndex: "bizStatus",
71
-      valueType: 'select',
106
+      valueType: "select",
72 107
       valueEnum: processEnum,
73 108
       render: (_, row) => {
74
-        if (row.processNode != '03' && yestoday > row.expireDate) {
109
+        console.log(row)
110
+        if (row.processNode != "03" && yestoday > row.expireDate) {
75 111
           return <Badge status="error" text="已逾期" />;
112
+        } else if(row.processNode=="03"&& yestoday > row.expireDate){
113
+          return <Badge status="warning" text="延期办结" />;
76 114
         } else {
77
-          const st = processStatus.filter(x => x.value == row.processNode)[0];
115
+          const st = processStatus.filter((x) => x.value == row.processNode)[0];
78 116
           return <Badge status={st?.badge} text={st?.label} />;
79 117
         }
80
-      }
118
+      },
81 119
     },
82 120
     {
83 121
       title: "截止日期",
@@ -88,25 +126,27 @@ export default (props) => {
88 126
       title: "上报人",
89 127
       dataIndex: "userName",
90 128
       hideInSearch: true,
91
-    }
129
+    },
92 130
   ];
93 131
 
94 132
   const onExport = () => {
95 133
     startLoading();
96
-    exportFn(paramsRef.current).then(() => {
97
-      stopLoading();
98
-    }).catch(() => {
99
-      stopLoading();
100
-    });
101
-  }
134
+    exportFn(paramsRef.current)
135
+      .then(() => {
136
+        stopLoading();
137
+      })
138
+      .catch(() => {
139
+        stopLoading();
140
+      });
141
+  };
102 142
 
103 143
   const beforeSearchSubmit = (params) => {
104 144
     paramsRef.current = {
105
-      ...params || {},
145
+      ...(params || {}),
106 146
       all: true,
107 147
     };
108 148
     return params;
109
-  }
149
+  };
110 150
 
111 151
   return (
112 152
     <List
@@ -116,20 +156,19 @@ export default (props) => {
116 156
       params={params}
117 157
       beforeSearchSubmit={beforeSearchSubmit}
118 158
       optionRender={(_, row) => [
119
-        <Button key="detail" type="link" onClick={() => navigate(`/issue/detail?id=${row.issueId}`)}>详情</Button>
159
+        <Button
160
+          key="detail"
161
+          type="link"
162
+          onClick={() => navigate(`/issue/detail?id=${row.issueId}`)}
163
+        >
164
+          详情
165
+        </Button>,
120 166
       ]}
121 167
       toolBarRender={() => [
122
-        (
123
-          <Button
124
-            key="1"
125
-            type="primary"
126
-            loading={loading}
127
-            onClick={onExport}
128
-          >
129
-            导出
130
-          </Button>
131
-        )
168
+        <Button key="1" type="primary" loading={loading} onClick={onExport}>
169
+          导出
170
+        </Button>,
132 171
       ]}
133 172
     />
134
-  )
135
-}
173
+  );
174
+};

+ 13
- 13
src/utils/biz.js Целия файл

@@ -1,22 +1,22 @@
1
-
2
-import { Badge } from 'antd';
1
+import { Badge } from "antd";
3 2
 
4 3
 export const processStatus = [
5
-  { value: '01', label: "待交办", badge: 'default' },
6
-  { value: '02', label: "已交办", badge: 'processing' },
7
-  { value: '03', label: "已办结", badge: 'success' },
8
-  { value: 'expired', label: "已逾期", badge: 'error' },
9
-  { value: '0201', label: "驳回申请中", badge: 'processing' },
10
-  { value: '0202', label: "延期申请中", badge: 'processing' },
11
-  { value: '0203', label: "单位审核中", badge: 'processing' },
12
-  { value: '0204', label: "消单申请中", badge: 'processing' },
13
-]
4
+  { value: "01", label: "待交办", badge: "default" },
5
+  { value: "02", label: "已交办", badge: "processing" },
6
+  { value: "03", label: "已办结", badge: "success" },
7
+  { value: "expired", label: "已逾期", badge: "error" },
8
+  { value: "0201", label: "驳回申请中", badge: "processing" },
9
+  { value: "0202", label: "延期申请中", badge: "processing" },
10
+  { value: "0203", label: "单位审核中", badge: "processing" },
11
+  { value: "0204", label: "消单申请中", badge: "processing" },
12
+  { value: "expiredEnd", label: "延期办结", badge: "warning" },
13
+];
14 14
 
15 15
 export const processEnum = processStatus.reduce((acc, it) => {
16 16
   return {
17 17
     ...acc,
18 18
     [it.value]: {
19 19
       text: it.label,
20
-    }
21
-  }
20
+    },
21
+  };
22 22
 }, {});

+ 2364
- 0
yarn.lock
Файловите разлики са ограничени, защото са твърде много
Целия файл