李志伟 2 年前
父节点
当前提交
82a81d642a

+ 3
- 3
config/proxy.js 查看文件

11
     // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
11
     // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
12
     '/api/': {
12
     '/api/': {
13
       // 要代理的地址
13
       // 要代理的地址
14
-      target: 'http://192.168.89.25:9002',
14
+      target: 'http://192.168.89.147:9002',
15
       changeOrigin: true,
15
       changeOrigin: true,
16
       headers: {
16
       headers: {
17
-        origin: 'http://192.168.89.25:9002',
18
-        referer: 'http://192.168.89.25:9002',
17
+        origin: 'http://192.168.89.147:9002',
18
+        referer: 'http://192.168.89.147:9002',
19
       },
19
       },
20
 
20
 
21
       // target: 'https://pet-certificate-online.njyunzhi.com',
21
       // target: 'https://pet-certificate-online.njyunzhi.com',

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

142
           {
142
           {
143
             (orderStatus == 1 || orderStatus == 2) &&
143
             (orderStatus == 1 || orderStatus == 2) &&
144
             <FormItem label="证件号">
144
             <FormItem label="证件号">
145
-              {application.originCardNo}
145
+              {application.cardNo}
146
             </FormItem>
146
             </FormItem>
147
           }
147
           }
148
           {
148
           {

+ 17
- 0
src/pages/cardList/index.jsx 查看文件

17
       key: 'cardNo',
17
       key: 'cardNo',
18
       search: true,
18
       search: true,
19
     },
19
     },
20
+    {
21
+      title: '证件状态',
22
+      dataIndex: 'status',
23
+      key: 'status',
24
+      search: true,
25
+      render: (_, record) => {
26
+        return record?.status == 1 ? '正常' :
27
+          record?.status == 2 ? '挂失' :
28
+          record?.status == 3 ? '过期' : ''
29
+      },
30
+      valueType: 'select',
31
+      valueEnum: {
32
+        1: { text: '正常' },
33
+        2: { text: '挂失' },
34
+        3: { text: '过期' },
35
+      },
36
+    },
20
     {
37
     {
21
       title: '犬主',
38
       title: '犬主',
22
       dataIndex: 'personName',
39
       dataIndex: 'personName',

+ 23
- 14
src/pages/certificateIssuance/index.jsx 查看文件

22
   const [selectedRowKeys, setSelectedRowKeys] = useState([])
22
   const [selectedRowKeys, setSelectedRowKeys] = useState([])
23
   const [selectedRows, setSelectedRows] = useState([])
23
   const [selectedRows, setSelectedRows] = useState([])
24
   const [application, setApplication] = useState();
24
   const [application, setApplication] = useState();
25
+  const [exportLoading, setExportLoading] = useState(false);
25
 
26
 
26
   const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
27
   const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
27
   //绑卡弹窗
28
   //绑卡弹窗
44
   const handleReset = () => {
45
   const handleReset = () => {
45
     setStart()
46
     setStart()
46
     setEnd()
47
     setEnd()
48
+    setSelectedRows([])
49
+    setSelectedRowKeys([])
47
   }
50
   }
48
   const handleExport = () => {
51
   const handleExport = () => {
49
-    // console.log(selectedRows);
50
 
52
 
51
-    const cardNoList = selectedRows.map(item => item.originCardNo)
53
+    const cardNoList = selectedRows.map(item => item.cardNo)
52
     if (cardNoList.some(item => item == null)) {
54
     if (cardNoList.some(item => item == null)) {
53
       message.info('您选中的犬证有未绑卡数据,请先绑卡再导出数据')
55
       message.info('您选中的犬证有未绑卡数据,请先绑卡再导出数据')
54
     } else {
56
     } else {
55
-      exportCardList({ cardNoList: cardNoList }).then((res) => {
57
+      setExportLoading(true)
58
+      exportCardList(cardNoList).then((res) => {
56
         message.success('导出' + cardNoList.length + '条数据');
59
         message.success('导出' + cardNoList.length + '条数据');
57
-
60
+        setSelectedRows([])
61
+        setSelectedRowKeys([])
62
+        setExportLoading(false)
63
+      }).catch((err) => {
64
+        console.log(err.message);
65
+        setExportLoading(false)
58
       })
66
       })
59
     }
67
     }
60
-    // setSelectedRows([])
61
-    // setSelectedRowKeys([])
62
   }
68
   }
63
 
69
 
64
 
70
 
67
     setLoading(true)
73
     setLoading(true)
68
     updateBindCard(
74
     updateBindCard(
69
       application.applyId,
75
       application.applyId,
70
-      { cardNo: val.originCardNo }
76
+      { cardNo: val.cardNo }
71
     ).then((res) => {
77
     ).then((res) => {
72
       message.success('绑卡成功')
78
       message.success('绑卡成功')
73
       handleBindCancel();
79
       handleBindCancel();
80
   }
86
   }
81
   const handleBindShow = (id) => {
87
   const handleBindShow = (id) => {
82
     getApplicationDetail(id).then((res) => {
88
     getApplicationDetail(id).then((res) => {
89
+      if (res.applyType=='reissue'&&res.status==2) {
90
+        res.cardNo=null
91
+      }
83
       form.setFieldsValue(res);
92
       form.setFieldsValue(res);
84
       setApplication(res)
93
       setApplication(res)
85
       setVisible(true)
94
       setVisible(true)
131
   const columns = [
140
   const columns = [
132
     {
141
     {
133
       title: '证件号',
142
       title: '证件号',
134
-      dataIndex: 'originCardNo',
135
-      key: 'originCardNo',
143
+      dataIndex: 'cardNo',
144
+      key: 'cardNo',
136
       search: true,
145
       search: true,
137
     },
146
     },
138
     {
147
     {
270
         )}
279
         )}
271
         tableAlertOptionRender={() => {
280
         tableAlertOptionRender={() => {
272
           return (
281
           return (
273
-            <Button style={{ padding: 0 }} type="link" onClick={handleExport}>导出制证</Button>
282
+            <Button style={{ padding: 0 }} type="link" loading={exportLoading} onClick={handleExport}>导出制证</Button>
274
           );
283
           );
275
         }}
284
         }}
276
         actionRef={actionRef}
285
         actionRef={actionRef}
292
         footer={null}
301
         footer={null}
293
       >
302
       >
294
         <Form {...formItemLayout} onFinish={bindCard} form={form}>
303
         <Form {...formItemLayout} onFinish={bindCard} form={form}>
295
-          <FormItem label="证件号" name="originCardNo" rules={[{ required: true, message: '请输入证件号' }]}>
296
-            <Input placeholder="请输入证件号" readOnly={application?.originCardNo != null} />
304
+          <FormItem label="证件号" name="cardNo" rules={[{ required: true, message: '请输入证件号' }]}>
305
+            <Input placeholder="请输入证件号" readOnly={application?.cardNo != null} />
297
           </FormItem>
306
           </FormItem>
298
           {
307
           {
299
-            !application?.originCardNo &&
308
+            !application?.cardNo &&
300
             <FormItem label=" " colon={false}>
309
             <FormItem label=" " colon={false}>
301
               <Button type="default" onClick={handleBindCancel}>
310
               <Button type="default" onClick={handleBindCancel}>
302
                 取消
311
                 取消
325
         footer={null}
334
         footer={null}
326
       >
335
       >
327
         <Form {...formItemLayout} onFinish={outCard} form={outForm}>
336
         <Form {...formItemLayout} onFinish={outCard} form={outForm}>
328
-          <FormItem label="证件号" name='originCardNo' rules={[{ required: true, message: '请先绑卡再发证' }]}>
337
+          <FormItem label="证件号" name='cardNo' rules={[{ required: true, message: '请先绑卡再发证' }]}>
329
             <Input
338
             <Input
330
               readOnly
339
               readOnly
331
               placeholder='请先绑卡再发证'
340
               placeholder='请先绑卡再发证'

+ 1
- 1
src/pages/certificateIssuance/issuance.jsx 查看文件

100
             </FormItem>
100
             </FormItem>
101
           }
101
           }
102
           <FormItem label="证件号">
102
           <FormItem label="证件号">
103
-            {application.originCardNo}
103
+            {application.cardNo}
104
           </FormItem>
104
           </FormItem>
105
           {
105
           {
106
             application.applyMethod == 2 &&
106
             application.applyMethod == 2 &&