周立森 5 years ago
parent
commit
d349075bd9
3 changed files with 48 additions and 30 deletions
  1. 0
    6
      config/routes.js
  2. 47
    23
      src/pages/system/document/audit.jsx
  3. 1
    1
      src/pages/system/document/list.jsx

+ 0
- 6
config/routes.js View File

424
                 hideInMenu: true,
424
                 hideInMenu: true,
425
                 component: './system/document/audit',
425
                 component: './system/document/audit',
426
               },
426
               },
427
-              {
428
-                path: '/system/document/see',
429
-                name: '客户资料查看',
430
-                hideInMenu: true,
431
-                component: './system/document/see',
432
-              },
433
             ],
427
             ],
434
           },
428
           },
435
           {
429
           {

+ 47
- 23
src/pages/system/document/audit.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Col, Row, Button, Modal, Input } from 'antd'
2
+import { Col, Row, Button, Modal, Input, Pagination, message } from 'antd'
3
 import ZmageImg from '../../../components/ZmageImg/ZmageImg'
3
 import ZmageImg from '../../../components/ZmageImg/ZmageImg'
4
 import request from '../../../utils/request';
4
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
7
 import AuthButton from '../../../components/AuthButton';
7
 import AuthButton from '../../../components/AuthButton';
8
 import moment from 'moment';
8
 import moment from 'moment';
9
 
9
 
10
+const unaudited = {
11
+  // color :'rgb(255, 126, 72)'
12
+  float: "right", fontWeight: "bold", marginRight: '30px'
13
+}
14
+
15
+const auditPass = {
16
+  // color : '#FF7E48',
17
+  color: 'green',
18
+  float: "right", fontWeight: "bold", marginRight: '30px'
19
+}
20
+
21
+const noauditPass = {
22
+  color: ' #fc515c',
23
+  float: "right", fontWeight: "bold", marginRight: '30px'
24
+}
25
+
10
 function body (props) {
26
 function body (props) {
11
   const documentVerifyId = props.location.query.id
27
   const documentVerifyId = props.location.query.id
12
   const [data, setData] = useState([])
28
   const [data, setData] = useState([])
13
-
29
+  const [datas, setDatas] = useState({})
14
   // const [status,setStatus] = useState()
30
   // const [status,setStatus] = useState()
15
   useEffect(() => {
31
   useEffect(() => {
16
     getList()
32
     getList()
22
   function getList (params) {
38
   function getList (params) {
23
     // 网路请求
39
     // 网路请求
24
     console.log(props, '1111')
40
     console.log(props, '1111')
25
-    request({ ...apis.system.documentVerifyDetail, urlData: { id: documentVerifyId } }).then(data => {
41
+    request({ ...apis.system.documentVerifyDetail, urlData: { id: documentVerifyId }, params: params }).then(data => {
26
       console.log('data:', data.records)
42
       console.log('data:', data.records)
27
-
43
+      setDatas(data)
28
       setData(data.records)
44
       setData(data.records)
29
     }).catch(err => {
45
     }).catch(err => {
30
       // eslint-disable-next-line no-unused-expressions
46
       // eslint-disable-next-line no-unused-expressions
85
     };
101
     };
86
 
102
 
87
     const handleOk1 = e => {
103
     const handleOk1 = e => {
88
-      console.log(e);
89
-      onVerify(2)
90
-
91
-      setVisible(false)
104
+      console.log(reasonValue, "2222");
105
+      if (reasonValue ) {
106
+        // console.log(e);
107
+        onVerify(2)
108
+        console.log(reasonValue, "11111111");
109
+        setVisible(false)
110
+      } else {
111
+        message.info("不能为空")
112
+      }
92
 
113
 
93
     };
114
     };
94
 
115
 
104
     }
125
     }
105
 
126
 
106
 
127
 
107
-    console.log("props", props.data)
128
+    // console.log("props", props.data)
108
     const carddata = props.data.imgList
129
     const carddata = props.data.imgList
109
     return (
130
     return (
110
       <>
131
       <>
111
-        <div style={{ background: '#ffffff', padding: '40px', marginTop: '30px',borderRadius: '12px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)'}}>
112
-          <p style={{ fontSize: '0.096rem'}}>
132
+        <div style={{ background: '#ffffff', padding: '40px', marginTop: '30px', borderRadius: '12px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}>
133
+          <p style={{ fontSize: '0.096rem' }}>
113
             <span>资料说明:{props.data.documentTitle} </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
134
             <span>资料说明:{props.data.documentTitle} </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
114
-            <span>提交时间:{moment(props.data.createDate).format('YYYY-MM-DD')} </span>
115
-            <span style={{ float: "right", fontWeight: "bold", marginRight: '30px' }} className={props.data.verifyStatus == 0 ? "unaudited" : props.data.verifyStatus == 1 ? "auditPass" : "noauditPass"} > 
116
-             {props.data.verifyStatus == 0 ? "待审核" : props.data.verifyStatus == 1 ? "审核通过" : "不通过"}
117
-             </span>
135
+            <span>提交时间:{moment(props.data.createDate).format('YYYY-MM-DD h:mm:ss')} </span>
136
+            <span style={props.data.verifyStatus == 0 ? unaudited : props.data.verifyStatus == 1 ? auditPass : noauditPass} >
137
+              {props.data.verifyStatus == 0 ? "待审核" : props.data.verifyStatus == 1 ? "审核通过" : "不通过"}
138
+            </span>
118
           </p>
139
           </p>
119
 
140
 
120
 
141
 
121
-          <div style={{ fontSize: '0.096rem'}}>资料图片:
142
+          <div style={{ fontSize: '0.096rem' }}>资料图片:
122
         <Row gutter={16}>
143
         <Row gutter={16}>
123
               {
144
               {
124
                 // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
145
                 // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
132
           </div>
153
           </div>
133
           {props.data.verifyStatus == 0 && <div style={{ marginTop: '10px', display: 'flex', justifyContent: 'center' }}>
154
           {props.data.verifyStatus == 0 && <div style={{ marginTop: '10px', display: 'flex', justifyContent: 'center' }}>
134
             <AuthButton name="admin.documentVerify.id.put" noRight={null}>
155
             <AuthButton name="admin.documentVerify.id.put" noRight={null}>
135
-              <Button type="primary" onClick={() => handleOk(1)}>通过</Button>
156
+              <Button type="primary" style={{ marginTop: '30px' }} onClick={() => handleOk(1)}>通过</Button>
136
             </AuthButton>
157
             </AuthButton>
137
             &nbsp;&nbsp;&nbsp;&nbsp;
158
             &nbsp;&nbsp;&nbsp;&nbsp;
138
         <AuthButton name="admin.documentVerify.id.put" noRight={null}>
159
         <AuthButton name="admin.documentVerify.id.put" noRight={null}>
139
-              <Button onClick={() => handleOk(2)}>不通过</Button>
160
+              <Button style={{ marginTop: '30px' }} onClick={() => handleOk(2)}>不通过</Button>
140
             </AuthButton>
161
             </AuthButton>
141
             {/* &nbsp;&nbsp;&nbsp;&nbsp;
162
             {/* &nbsp;&nbsp;&nbsp;&nbsp;
142
         <Button onClick={cancelPage}>返回</Button> */}
163
         <Button onClick={cancelPage}>返回</Button> */}
159
     // return <div>111</div>
180
     // return <div>111</div>
160
   }
181
   }
161
 
182
 
162
-
183
+  const changePageNum = (pageNumber) => {
184
+    getList({ pageNum: pageNumber, pageSize: 5 })
185
+  }
163
 
186
 
164
 
187
 
165
   return (
188
   return (
166
     <>
189
     <>
167
       {/* <div>111</div> */}
190
       {/* <div>111</div> */}
168
-      <div>{console.log("data1", data)}
191
+      <div>
169
         {
192
         {
170
           // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
193
           // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
171
           data.map((data, inx) =>
194
           data.map((data, inx) =>
172
 
195
 
173
             <Card data={data}></Card>
196
             <Card data={data}></Card>
174
-            // <Col span={6}>
175
-            //   <ZmageImg style={{ width: '300px', height: '400px' }} src={data.img} />
176
-            // </Col>
197
+
177
           )
198
           )
178
         }
199
         }
179
         {/* <Card data = {data.records}></Card> */}
200
         {/* <Card data = {data.records}></Card> */}
201
+        <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
202
+          <Pagination showQuickJumper defaultCurrent={1} total={datas.total} pageSize={datas.size} onChange={changePageNum} current={datas.current} />
203
+        </div>
180
 
204
 
181
       </div>
205
       </div>
182
 
206
 

+ 1
- 1
src/pages/system/document/list.jsx View File

84
       dataIndex: 'createDate',
84
       dataIndex: 'createDate',
85
       key: 'createDate',
85
       key: 'createDate',
86
       align: 'center',
86
       align: 'center',
87
-      render: (createDate) => moment(createDate).format('YYYY-MM-DD')
87
+      render: (createDate) => moment(createDate).format('YYYY-MM-DD h:mm:ss')
88
     },
88
     },
89
 
89
 
90
     {
90
     {