周立森 5 年之前
父節點
當前提交
d349075bd9
共有 3 個文件被更改,包括 48 次插入30 次删除
  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 查看文件

@@ -424,12 +424,6 @@ export default [
424 424
                 hideInMenu: true,
425 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 查看文件

@@ -1,5 +1,5 @@
1 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 3
 import ZmageImg from '../../../components/ZmageImg/ZmageImg'
4 4
 import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
@@ -7,10 +7,26 @@ import { router } from 'umi';
7 7
 import AuthButton from '../../../components/AuthButton';
8 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 26
 function body (props) {
11 27
   const documentVerifyId = props.location.query.id
12 28
   const [data, setData] = useState([])
13
-
29
+  const [datas, setDatas] = useState({})
14 30
   // const [status,setStatus] = useState()
15 31
   useEffect(() => {
16 32
     getList()
@@ -22,9 +38,9 @@ function body (props) {
22 38
   function getList (params) {
23 39
     // 网路请求
24 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 42
       console.log('data:', data.records)
27
-
43
+      setDatas(data)
28 44
       setData(data.records)
29 45
     }).catch(err => {
30 46
       // eslint-disable-next-line no-unused-expressions
@@ -85,10 +101,15 @@ function body (props) {
85 101
     };
86 102
 
87 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,21 +125,21 @@ function body (props) {
104 125
     }
105 126
 
106 127
 
107
-    console.log("props", props.data)
128
+    // console.log("props", props.data)
108 129
     const carddata = props.data.imgList
109 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 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 139
           </p>
119 140
 
120 141
 
121
-          <div style={{ fontSize: '0.096rem'}}>资料图片:
142
+          <div style={{ fontSize: '0.096rem' }}>资料图片:
122 143
         <Row gutter={16}>
123 144
               {
124 145
                 // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
@@ -132,11 +153,11 @@ function body (props) {
132 153
           </div>
133 154
           {props.data.verifyStatus == 0 && <div style={{ marginTop: '10px', display: 'flex', justifyContent: 'center' }}>
134 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 157
             </AuthButton>
137 158
             &nbsp;&nbsp;&nbsp;&nbsp;
138 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 161
             </AuthButton>
141 162
             {/* &nbsp;&nbsp;&nbsp;&nbsp;
142 163
         <Button onClick={cancelPage}>返回</Button> */}
@@ -159,24 +180,27 @@ function body (props) {
159 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 188
   return (
166 189
     <>
167 190
       {/* <div>111</div> */}
168
-      <div>{console.log("data1", data)}
191
+      <div>
169 192
         {
170 193
           // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
171 194
           data.map((data, inx) =>
172 195
 
173 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 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 205
       </div>
182 206
 

+ 1
- 1
src/pages/system/document/list.jsx 查看文件

@@ -84,7 +84,7 @@ function body(props) {
84 84
       dataIndex: 'createDate',
85 85
       key: 'createDate',
86 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
     {