瀏覽代碼

审核列表

李志伟 2 年之前
父節點
當前提交
cac4312072
共有 4 個文件被更改,包括 150 次插入77 次删除
  1. 11
    7
      src/pages/applicationList/detail.jsx
  2. 9
    3
      src/pages/applicationList/index.jsx
  3. 69
    23
      src/pages/examine/detail.jsx
  4. 61
    44
      src/pages/examine/index.jsx

+ 11
- 7
src/pages/applicationList/detail.jsx 查看文件

57
             {application?.immunizationCode}
57
             {application?.immunizationCode}
58
           </FormItem>
58
           </FormItem>
59
           <FormItem label="免疫证明">
59
           <FormItem label="免疫证明">
60
-            <Image src={application?.immunizationImg} />
60
+            <Image src={application?.immunizationImg} width={100} />
61
           </FormItem>
61
           </FormItem>
62
           <FormItem label="最近免疫日期">
62
           <FormItem label="最近免疫日期">
63
             {application?.immunizationDate}
63
             {application?.immunizationDate}
69
                   application?.applyType == 'renewal' ? '续期' : ''
69
                   application?.applyType == 'renewal' ? '续期' : ''
70
             }
70
             }
71
           </FormItem>
71
           </FormItem>
72
+          {
73
+            application?.applyType !== 'renewal' &&
74
+            <FormItem label="申领方式">
75
+              {
76
+                application?.applyMethod == '1' ? '上门自取' :
77
+                  application?.applyMethod == '2' ? '快递到家' : ''
78
+              }
79
+            </FormItem>
80
+          }
72
           <FormItem label="付款状态">
81
           <FormItem label="付款状态">
73
             {
82
             {
74
               application.payStatus === 0
83
               application.payStatus === 0
82
           {/* <FormItem label="狗证有效期">
91
           {/* <FormItem label="狗证有效期">
83
            2021-1-5~2022-1-5
92
            2021-1-5~2022-1-5
84
           </FormItem>
93
           </FormItem>
85
-          <FormItem label="申领方式">
86
-            {
87
-              application?.applyMethod == '1' ? '上门自取' :
88
-                application?.applyMethod == '2' ? '快递到家' : ''
89
-            }
90
-          </FormItem>
94
+          //判断是否为续期
91
           <FormItem label="快递公司">
95
           <FormItem label="快递公司">
92
             <Input type="text" value='极兔快递' style={{ width: '350px' }} />
96
             <Input type="text" value='极兔快递' style={{ width: '350px' }} />
93
           </FormItem>
97
           </FormItem>

+ 9
- 3
src/pages/applicationList/index.jsx 查看文件

15
 
15
 
16
 export default (props) => {
16
 export default (props) => {
17
   const actionRef = useRef();
17
   const actionRef = useRef();
18
-  const goDetail=(id)=>{
18
+  const goDetail = (id) => {
19
     history.push(`applicationList/detail.jsx?id=${id}`);
19
     history.push(`applicationList/detail.jsx?id=${id}`);
20
   }
20
   }
21
   const columns = [
21
   const columns = [
25
       key: 'personName',
25
       key: 'personName',
26
       search: true,
26
       search: true,
27
     },
27
     },
28
+    {
29
+      title: '犬名',
30
+      dataIndex: 'petName',
31
+      key: 'petName',
32
+      search: true,
33
+    },
28
     {
34
     {
29
       title: '申请时间',
35
       title: '申请时间',
30
       dataIndex: 'createDate',
36
       dataIndex: 'createDate',
68
       valueType: 'select',
74
       valueType: 'select',
69
       valueEnum: {
75
       valueEnum: {
70
         0: { text: '待支付' },
76
         0: { text: '待支付' },
71
-        1: { text: '支付中' },
72
         2: { text: '已支付' },
77
         2: { text: '已支付' },
73
       },
78
       },
74
     },
79
     },
97
       valueType: 'option',
102
       valueType: 'option',
98
       width: 160,
103
       width: 160,
99
       render: (_, record) => [
104
       render: (_, record) => [
100
-        <Button key={1} style={{ padding: 0 }} type="link" onClick={()=>goDetail(record.applyId)}>
105
+        <Button key={1} style={{ padding: 0 }} type="link"
106
+          onClick={() => goDetail(record.applyId)}>
101
           详情
107
           详情
102
         </Button>
108
         </Button>
103
       ],
109
       ],

+ 69
- 23
src/pages/examine/detail.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Card, Form, Button, message, Input } from 'antd';
2
+import { Card, Form, Button, Image, Input, message } from 'antd';
3
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
-import { getWithdrawalDetail, updateWithdrawal } from '@/services/withdrawal'
4
+import { getApplicationDetail, updateAudit } from '@/services/application'
5
 import { history } from 'umi';
5
 import { history } from 'umi';
6
 
6
 
7
 const { TextArea } = Input;
7
 const { TextArea } = Input;
13
 export default (props) => {
13
 export default (props) => {
14
   const { location } = props;
14
   const { location } = props;
15
   const { id } = location.query;
15
   const { id } = location.query;
16
-  const [withdrawal, setWithdrawal] = useState();
17
-  const [remarks, setRemarks] = useState()
16
+  const [application, setApplication] = useState({});
17
+  const [rejectReason, setRejectReason] = useState();
18
   const [loading, setLoading] = useState(false)
18
   const [loading, setLoading] = useState(false)
19
 
19
 
20
   const handleAudit = (val) => {
20
   const handleAudit = (val) => {
21
-    if (remarks) {
21
+    if ((val == 2 && rejectReason) || val == 1) {
22
       setLoading(true)
22
       setLoading(true)
23
-      updateWithdrawal(withdrawal.withdrawalId, { ...withdrawal, auditStatus: val, auditRemark: remarks }).then(() => {
23
+      updateAudit(id, { rejectReason: rejectReason, verifyStatus: val }).then(() => {
24
         message.success('操作成功');
24
         message.success('操作成功');
25
         goBack()
25
         goBack()
26
         setLoading(false)
26
         setLoading(false)
33
       message.success('请输入处理结果');
33
       message.success('请输入处理结果');
34
     }
34
     }
35
   }
35
   }
36
+
36
   useEffect(() => {
37
   useEffect(() => {
37
-    getWithdrawalDetail(id).then((res) => {
38
-      setWithdrawal(res)
39
-      setRemarks(res.auditRemark)
38
+    getApplicationDetail(id).then((res) => {
39
+      setApplication(res)
40
+      setRejectReason(res.rejectReason)
40
     }).catch((err) => {
41
     }).catch((err) => {
41
       console.log(err.message)
42
       console.log(err.message)
42
     });
43
     });
45
     <PageHeaderWrapper    >
46
     <PageHeaderWrapper    >
46
       <Card>
47
       <Card>
47
         <Form {...formItemLayout}>
48
         <Form {...formItemLayout}>
48
-          <FormItem label="申请人">
49
-            {withdrawal?.userName}
50
-          </FormItem>
51
           <FormItem label="犬主">
49
           <FormItem label="犬主">
52
-            {withdrawal?.phone}
50
+            {application?.personName}
51
+          </FormItem>
52
+          <FormItem label="电话">
53
+            {application?.phone}
53
           </FormItem>
54
           </FormItem>
54
           <FormItem label="犬名">
55
           <FormItem label="犬名">
55
-            {withdrawal?.orgName}
56
+            {application?.petName}
57
+          </FormItem>
58
+          <FormItem label="性别">
59
+            {
60
+              application?.petSex == 1 ? '雄' :
61
+                application?.petSex == 2 ? '雌' : '未说明性别'
62
+            }
56
           </FormItem>
63
           </FormItem>
57
           <FormItem label="犬种">
64
           <FormItem label="犬种">
58
-            {withdrawal?.amountLeft / 100}
65
+            {application?.petType}
59
           </FormItem>
66
           </FormItem>
60
           <FormItem label="毛色">
67
           <FormItem label="毛色">
61
-            {withdrawal?.bankCard.ownerBank}
68
+            {application?.petColor}
62
           </FormItem>
69
           </FormItem>
63
           <FormItem label="照片">
70
           <FormItem label="照片">
64
-            {withdrawal?.bankCard.cardNo}
71
+            <Image src={application?.img1} width={100} />
65
           </FormItem>
72
           </FormItem>
66
           <FormItem label="养狗地址">
73
           <FormItem label="养狗地址">
67
-            {withdrawal?.money / 100}
74
+            {application?.address}
75
+          </FormItem>
76
+          <FormItem label="免疫证号">
77
+            {application?.immunizationCode}
78
+          </FormItem>
79
+          <FormItem label="免疫证明">
80
+            <Image src={application?.immunizationImg} width={100} />
81
+          </FormItem>
82
+          <FormItem label="最近免疫日期">
83
+            {application?.immunizationDate}
84
+          </FormItem>
85
+          <FormItem label="申请类型">
86
+            {
87
+              application?.applyType == 'first' ? '办证' :
88
+                application?.applyType == 'reissue' ? '补办' :
89
+                  application?.applyType == 'renewal' ? '续期' : ''
90
+            }
68
           </FormItem>
91
           </FormItem>
69
-          <FormItem label="处理结果">
92
+          {
93
+            application?.applyType !== 'renewal' &&
94
+            <FormItem label="申领方式">
95
+              {
96
+                application?.applyMethod == '1' ? '上门自取' :
97
+                  application?.applyMethod == '2' ? '快递到家' : ''
98
+              }
99
+            </FormItem>
100
+          }
101
+          <FormItem label="付款状态">
70
             {
102
             {
71
-              withdrawal?.auditStatus == 0 ?
72
-                <TextArea placeholder='请输入处理结果(必填)' rows='3' style={{ width: '350px' }} value={remarks} onChange={(e) => setRemarks(e.target.value)} /> :
73
-                remarks
103
+              application.payStatus === 0
104
+                ? '待支付'
105
+                : application.payStatus === 1
106
+                  ? '支付中'
107
+                  : application.payStatus === 2
108
+                    ? '已支付' : ''
74
             }
109
             }
75
           </FormItem>
110
           </FormItem>
111
+          {
112
+            application.verifyStatus != 1 &&
113
+            <FormItem label="驳回原因">
114
+              <TextArea placeholder='请输入驳回原因' rows='3'
115
+                style={{ width: '350px' }}
116
+                value={rejectReason}
117
+                readOnly={application.verifyStatus==2}
118
+                onChange={(e) => setRejectReason(e.target.value)}
119
+              />
120
+            </FormItem>
121
+          }
76
           <FormItem label=" " colon={false}>
122
           <FormItem label=" " colon={false}>
77
             {
123
             {
78
-              withdrawal?.auditStatus == 0 &&
124
+              application.verifyStatus == 0 &&
79
               <>
125
               <>
80
                 <Button type="primary" loading={loading} style={{ marginRight: '16px' }} onClick={() => handleAudit(1)}>
126
                 <Button type="primary" loading={loading} style={{ marginRight: '16px' }} onClick={() => handleAudit(1)}>
81
                   同意
127
                   同意

+ 61
- 44
src/pages/examine/index.jsx 查看文件

1
 import React, { useRef } from 'react'
1
 import React, { useRef } from 'react'
2
-import { useModel } from 'umi';
3
 import moment from 'moment';
2
 import moment from 'moment';
4
 import { DatePicker, Button } from 'antd';
3
 import { DatePicker, Button } from 'antd';
5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
 import PageTable from '@/components/PageTable'
5
 import PageTable from '@/components/PageTable'
7
-import { getList } from '@/services/work'
6
+import { getApplicationList } from '@/services/application'
7
+import { history } from 'umi';
8
+
8
 
9
 
9
 const { RangePicker } = DatePicker;
10
 const { RangePicker } = DatePicker;
10
 
11
 
13
 };
14
 };
14
 
15
 
15
 export default (props) => {
16
 export default (props) => {
16
-  const initDate = useRef(moment())
17
   const actionRef = useRef();
17
   const actionRef = useRef();
18
-  const { initialState } = useModel('@@initialState');
19
-
20
-  const handleBeforSearch = (params) => {
21
-    const { createDate, ...others } = params;
22
-
23
-    let start, end, orgId;
24
-    if (!createDate || createDate.length < 1) {
25
-      // 默认时间是今天
26
-      start = moment().format('YYYY-MM-DD')
27
-      end = start
28
-    } else {
29
-      start = moment(createDate[0]).format('YYYY-MM-DD')
30
-      end = moment(createDate[1]).format('YYYY-MM-DD')
31
-    }
32
-    if (initialState.currentUser.orgId) {
33
-      orgId = initialState.currentUser.orgId
34
-      return { ...others, start, end, orgId };
35
-    }
36
-    return { ...others, start, end };
18
+  const goDetail = (id) => {
19
+    history.push(`examine/detail.jsx?id=${id}`);
37
   }
20
   }
38
   const columns = [
21
   const columns = [
39
     {
22
     {
40
-      title: '申请人',
41
-      dataIndex: 'userName',
42
-      key: 'userName',
23
+      title: '犬主',
24
+      dataIndex: 'personName',
25
+      key: 'personName',
26
+      search: true,
27
+    },
28
+    {
29
+      title: '犬名',
30
+      dataIndex: 'petName',
31
+      key: 'petName',
43
       search: true,
32
       search: true,
44
     },
33
     },
45
     {
34
     {
47
       dataIndex: 'createDate',
36
       dataIndex: 'createDate',
48
       key: 'createDate',
37
       key: 'createDate',
49
       render: (t) => formatterTime(t),
38
       render: (t) => formatterTime(t),
50
-      renderFormItem: (_, record) => <RangePicker defaultValue={[initDate.current, initDate.current]} placeholder={['开始日期', '结束日期']} format='YYYY-MM-DD' />
39
+      renderFormItem: (_, record) => <RangePicker placeholder={['开始日期', '结束日期']} format='YYYY-MM-DD' />
40
+    },
41
+    {
42
+      title: '订单状态',
43
+      dataIndex: 'payStatus',
44
+      key: 'payStatus',
45
+      search: true,//已支付 待支付
46
+      render: (_, record) => {
47
+        return record.payStatus === 0
48
+          ? '待支付'
49
+          : record.payStatus === 1
50
+            ? '支付中'
51
+            : record.payStatus === 2
52
+              ? '已支付' : ''
53
+      },
54
+      valueType: 'select',
55
+      valueEnum: {
56
+        0: { text: '待支付' },
57
+        2: { text: '已支付' },
58
+      },
51
     },
59
     },
52
     {
60
     {
53
       title: '审核状态',
61
       title: '审核状态',
54
-      dataIndex: 'userName',
55
-      key: 'userName',
62
+      dataIndex: 'verifyStatus',
63
+      key: 'verifyStatus',
56
       search: true,
64
       search: true,
65
+      render: (_, record) => {
66
+        return record.verifyStatus === 0
67
+          ? '待审核'
68
+          : record.verifyStatus === 1
69
+            ? '审核通过'
70
+            : record.verifyStatus === 2
71
+              ? '审核驳回' : ''
72
+      },
73
+      valueType: 'select',
74
+      valueEnum: {
75
+        0: { text: '待审核' },
76
+        1: { text: '审核通过' },
77
+        2: { text: '审核驳回' },
78
+      },
57
     },
79
     },
58
     {
80
     {
59
       title: '审核人',
81
       title: '审核人',
60
-      dataIndex: 'userName',
61
-      key: 'userName',
82
+      dataIndex: 'verifyUser',
83
+      key: 'verifyUser',
62
       search: true,
84
       search: true,
63
     },
85
     },
64
     {
86
     {
65
       title: '审核时间',
87
       title: '审核时间',
66
-      dataIndex: 'createDate',
67
-      key: 'createDate',
68
-      render: (t) => formatterTime(t),
69
-      renderFormItem: (_, record) => <RangePicker defaultValue={[initDate.current, initDate.current]} placeholder={['开始日期', '结束日期']} format='YYYY-MM-DD' />
88
+      dataIndex: 'verifyDate',
89
+      key: 'verifyDate',
90
+      render: (t) => t != '-' ? formatterTime(t) : '-',
91
+      renderFormItem: (_, record) => <RangePicker format='YYYY-MM-DD' />
70
     },
92
     },
71
     {
93
     {
72
       title: '操作',
94
       title: '操作',
73
       valueType: 'option',
95
       valueType: 'option',
74
       width: 160,
96
       width: 160,
75
       render: (_, record) => [
97
       render: (_, record) => [
76
-        <Button key={1} style={{ padding: 0 }} type="link">
98
+        <Button key={1} style={{ padding: 0 }} type="link"
99
+          onClick={() => goDetail(record.applyId)}
100
+        >
77
           详情
101
           详情
78
         </Button>
102
         </Button>
79
       ],
103
       ],
86
       <PageTable
110
       <PageTable
87
         actionRef={actionRef}
111
         actionRef={actionRef}
88
         columns={columns}
112
         columns={columns}
89
-        request={getList}
113
+        request={getApplicationList}
90
         options={false}
114
         options={false}
91
-        search={{
92
-          defaultCollapsed: false
93
-        }}
94
-        form={{ ignoreRules: false }}
95
-        manualRequest={true}
96
-        revalidateOnFocus={false}
97
-        beforeSearchSubmit={handleBeforSearch}
98
-        rowKey="formId"
115
+        rowKey="applyId"
99
       />
116
       />
100
     </PageHeaderWrapper>
117
     </PageHeaderWrapper>
101
   )
118
   )