李志伟 2 years ago
parent
commit
339ab61dcf
1 changed files with 19 additions and 10 deletions
  1. 19
    10
      src/pages/certificateIssuance/index.jsx

+ 19
- 10
src/pages/certificateIssuance/index.jsx View File

@@ -16,8 +16,6 @@ export default (props) => {
16 16
   const actionRef = useRef();
17 17
   const [applyStart, setStart] = useState()
18 18
   const [applyEnd, setEnd] = useState()
19
-  const [makeStart, setMakeStart] = useState()
20
-  const [makeEnd, setMakeEnd] = useState()
21 19
   const goDetail = (id) => {
22 20
     history.push(`certificateIssuance/issuance.jsx?id=${id}`);
23 21
   }
@@ -25,15 +23,9 @@ export default (props) => {
25 23
     setStart(dateStrings[0])
26 24
     setEnd(dateStrings[1])
27 25
   }
28
-  const handelMakeDateChange = (date, dateStrings) => {
29
-    setMakeStart(dateStrings[0])
30
-    setMakeEnd(dateStrings[1])
31
-  }
32 26
   const handleReset = () => {
33 27
     setStart()
34 28
     setEnd()
35
-    setMakeStart()
36
-    setMakeEnd()
37 29
   }
38 30
   const columns = [
39 31
     {
@@ -119,6 +111,23 @@ export default (props) => {
119 111
             ? '已发放' : ''
120 112
       },
121 113
     },
114
+    {
115
+      title: '制证状态',
116
+      dataIndex: 'status',
117
+      key: 'status',
118
+      hideInTable:true,
119
+      render: (_, record) => {
120
+        return record.status === 2
121
+          ? '待发放'
122
+          : record.status === 3
123
+            ? '已发放' : ''
124
+      },
125
+      valueType: 'select',
126
+      valueEnum: {
127
+        2: { text: '待发放' },
128
+        3: { text: '已发放' },
129
+      },
130
+    },
122 131
     {
123 132
       title: '发放人',
124 133
       dataIndex: 'makeUserName',
@@ -131,7 +140,7 @@ export default (props) => {
131 140
       width:160,
132 141
       key: 'makeDate',
133 142
       render: (t) => t != '-' ? formatterTime(t) : '-',
134
-      renderFormItem: (_, record) => <RangePicker placeholder={['开始日期', '结束日期']} format='YYYY-MM-DD'onChange={handelMakeDateChange} />
143
+      search:false
135 144
     },
136 145
     {
137 146
       title: '操作',
@@ -154,7 +163,7 @@ export default (props) => {
154 163
         actionRef={actionRef}
155 164
         columns={columns}
156 165
         request={getMakeList}
157
-        params={{ applyStart, applyEnd, makeStart, makeEnd }}
166
+        params={{ applyStart, applyEnd }}
158 167
         options={false}
159 168
         onReset={handleReset}
160 169
         rowKey="applyId"