张延森 4 jaren geleden
bovenliggende
commit
dd362350a4

+ 116
- 115
config/routes.js Bestand weergeven

@@ -65,15 +65,128 @@ export default [
65 65
           //     },
66 66
           //   ],
67 67
           // },
68
+          {
69
+            path: '/property',
70
+            name: '物业管理',
71
+            component: '../layouts/BlankLayout',
72
+            routes: [
73
+              {
74
+                path: 'buildingInfo',
75
+                name: '楼栋管理',
76
+                component: './property/building'
77
+              },
78
+              {
79
+                path: 'buildingInfo/importExcel',
80
+                name: '楼栋导入',
81
+                component: './property/building/BatchImport',
82
+                hideInMenu: true,
83
+              },
84
+              {
85
+                path: 'proprietor',
86
+                name: '业主管理',
87
+                component: './property/proprietor'
88
+              },
89
+              {
90
+                path: 'proprietor/add',
91
+                name: '增加业主',
92
+                component: './property/proprietor/Add',
93
+                hideInMenu: true,
94
+              },
95
+              {
96
+                path: 'proprietor/detail',
97
+                name: '业主详情',
98
+                component: './property/proprietor/Detail',
99
+                hideInMenu: true,
100
+              },
101
+              {
102
+                path: 'proprietor/audit',
103
+                name: '资料审核',
104
+                component: './property/proprietor/Audit',
105
+              },
106
+              {
107
+                path: 'proprietor/batch',
108
+                name: '业主导入',
109
+                component: './property/proprietor/BatchImport',
110
+                hideInMenu: true,
111
+              },
112
+              {
113
+                path: 'notice',
114
+                name: '公告管理',
115
+                component: './property/notice'
116
+              },
117
+              {
118
+                path: 'notice/edit',
119
+                name: '公告管理详情',
120
+                component: './property/notice/Edit',
121
+                hideInMenu: true,
122
+              },
123
+              {
124
+                path: 'news',
125
+                name: '服务内容',
126
+                component: './property/news'
127
+              },
128
+              {
129
+                path: 'news/edit',
130
+                name: '服务内容详情',
131
+                component: './property/news/Edit',
132
+                hideInMenu: true,
133
+              },
134
+              {
135
+                path: 'bill/management',
136
+                name: '收费组管理',
137
+                component: './property/bill/list',
138
+              },
139
+              {
140
+                path: 'bill/management/add',
141
+                name: '新增收费组',
142
+                component: './property/bill/edit',
143
+                hideInMenu: true,
144
+              },
145
+              {
146
+                path: 'bill/management/info',
147
+                name: '收费组详情',
148
+                component: './property/bill/info',
149
+                hideInMenu: true,
150
+              },
151
+              {
152
+                path: 'bill/management/info/add',
153
+                name: '新增收费',
154
+                component: './property/bill/info/Add',
155
+                hideInMenu: true,
156
+              },
157
+              {
158
+                path: 'bill/order',
159
+                name: '订单管理',
160
+                component: './property/bill/order',
161
+              },
162
+              {
163
+                path: 'bill/order/info',
164
+                name: '订单信息',
165
+                component: './property/bill/order/Info',
166
+                hideInMenu: true,
167
+              },
168
+              {
169
+                path: 'bill/ticket',
170
+                name: '工单管理',
171
+                component: './property/ticket',
172
+              },
173
+              {
174
+                path: 'bill/ticket/detail',
175
+                name: '工单详情',
176
+                component: './property/ticket/Detail',
177
+                hideInMenu: true,
178
+              },
179
+            ]
180
+          },
68 181
           {
69 182
             path: '/customer',
70 183
             name: '会员管理',
71 184
             component: '../layouts/BlankLayout',
72 185
             routes: [
73 186
               {
74
-                path: '/customer/customerlist/list',
187
+                path: '/customer/personlist',
75 188
                 name: '会员列表',
76
-                component: './customer/customerlist/index',
189
+                component: './customer/personlist/index',
77 190
               },
78 191
               {
79 192
                 path: '/customer/customerlist/customerDetail',
@@ -547,119 +660,7 @@ export default [
547 660
               },
548 661
             ],
549 662
           },
550
-          {
551
-            path: '/property',
552
-            name: '物业管理',
553
-            component: '../layouts/BlankLayout',
554
-            routes: [
555
-              {
556
-                path: 'buildingInfo',
557
-                name: '楼栋管理',
558
-                component: './property/building'
559
-              },
560
-              {
561
-                path: 'buildingInfo/importExcel',
562
-                name: '楼栋导入',
563
-                component: './property/building/BatchImport',
564
-                hideInMenu: true,
565
-              },
566
-              {
567
-                path: 'proprietor',
568
-                name: '业主管理',
569
-                component: './property/proprietor'
570
-              },
571
-              {
572
-                path: 'proprietor/add',
573
-                name: '增加业主',
574
-                component: './property/proprietor/Add',
575
-                hideInMenu: true,
576
-              },
577
-              {
578
-                path: 'proprietor/detail',
579
-                name: '业主详情',
580
-                component: './property/proprietor/Detail',
581
-                hideInMenu: true,
582
-              },
583
-              {
584
-                path: 'proprietor/audit',
585
-                name: '资料审核',
586
-                component: './property/proprietor/Audit',
587
-              },
588
-              {
589
-                path: 'proprietor/batch',
590
-                name: '业主导入',
591
-                component: './property/proprietor/BatchImport',
592
-                hideInMenu: true,
593
-              },
594
-              {
595
-                path: 'notice',
596
-                name: '公告管理',
597
-                component: './property/notice'
598
-              },
599
-              {
600
-                path: 'notice/edit',
601
-                name: '公告管理详情',
602
-                component: './property/notice/Edit',
603
-                hideInMenu: true,
604
-              },
605
-              {
606
-                path: 'news',
607
-                name: '服务内容',
608
-                component: './property/news'
609
-              },
610
-              {
611
-                path: 'news/edit',
612
-                name: '服务内容详情',
613
-                component: './property/news/Edit',
614
-                hideInMenu: true,
615
-              },
616
-              {
617
-                path: 'bill/management',
618
-                name: '收费组管理',
619
-                component: './property/bill/list',
620
-              },
621
-              {
622
-                path: 'bill/management/add',
623
-                name: '新增收费组',
624
-                component: './property/bill/edit',
625
-                hideInMenu: true,
626
-              },
627
-              {
628
-                path: 'bill/management/info',
629
-                name: '收费组详情',
630
-                component: './property/bill/info',
631
-                hideInMenu: true,
632
-              },
633
-              {
634
-                path: 'bill/management/info/add',
635
-                name: '新增收费',
636
-                component: './property/bill/info/Add',
637
-                hideInMenu: true,
638
-              },
639
-              {
640
-                path: 'bill/order',
641
-                name: '订单管理',
642
-                component: './property/bill/order',
643
-              },
644
-              {
645
-                path: 'bill/order/info',
646
-                name: '订单信息',
647
-                component: './property/bill/order/Info',
648
-                hideInMenu: true,
649
-              },
650
-              {
651
-                path: 'bill/ticket',
652
-                name: '工单管理',
653
-                component: './property/ticket',
654
-              },
655
-              {
656
-                path: 'bill/ticket/detail',
657
-                name: '工单详情',
658
-                component: './property/ticket/Detail',
659
-                hideInMenu: true,
660
-              },
661
-            ]
662
-          },
663
+          
663 664
           // {
664 665
           //   path: '/system',
665 666
           //   name: '系统管理',

+ 7
- 3
src/pages/customer/customerlist/components/integralRecord.jsx Bestand weergeven

@@ -92,10 +92,14 @@ class ModalIntegralRecord extends React.Component {
92 92
           return '资料审核'  
93 93
       case 'recommend-customer':
94 94
         return '推荐客户'
95
-        case 'group':
95
+      case 'group':
96 96
         return '拼团'
97
-        case 'recommend-customer':
98
-        return '推荐客户'
97
+      case 'ticket_evaluation':
98
+        return '报修评价'
99
+      case 'payment':
100
+        return '物业缴费'
101
+      case 'user_verify':
102
+        return '业主认证'
99 103
       default:
100 104
         return '未知类型'
101 105
     }

+ 118
- 0
src/pages/customer/personlist/index.jsx Bestand weergeven

@@ -0,0 +1,118 @@
1
+import React, { useState, useEffect } from 'react'
2
+import { Select, Spin, Table, Button, Form, Input, Divider, Modal,Popconfirm } from 'antd'
3
+import NavLink from 'umi/navlink'
4
+import { fetch, apis, fetchList } from '@/utils/request'
5
+import IntegralRecord from '../customerlist/components/integralRecord'
6
+
7
+const getPersonList = fetchList(apis.person.getPersonList)
8
+
9
+const Condition = Form.create()(props => {
10
+  const handleSubmit = e => {
11
+    e.preventDefault();
12
+    props.form.validateFields((err, values) => {
13
+      if (!err && props.onSearch) {
14
+        props.onSearch(values)
15
+      }
16
+    });
17
+  }
18
+
19
+  const handleReset = e => {
20
+    props.form.resetFields()
21
+    if (props.onReset) {
22
+      props.onReset(props.form.getFieldsValue())
23
+    }
24
+  }
25
+
26
+  const { getFieldDecorator } = props.form
27
+
28
+  return (
29
+    <Form layout="inline" onSubmit={handleSubmit}>
30
+      <div style={{ display: 'flex', width: '100%' }}>
31
+        <div style={{ flex: 'none', maxWidth: 'calc(100% - 180px)' }}>
32
+            <Form.Item label="姓名">
33
+            {
34
+              getFieldDecorator('name')(<Input placeholder="姓名" />)
35
+            }
36
+            </Form.Item>
37
+            <Form.Item label="手机号">
38
+            {
39
+              getFieldDecorator('phone')(<Input placeholder="手机号" />)
40
+            }
41
+            </Form.Item>
42
+        </div>
43
+        <div style={{ flex: 'none', width: '180px' }}>
44
+          <Form.Item>
45
+            <Button type="primary" htmlType="submit">搜索</Button>
46
+          </Form.Item>
47
+          <Form.Item>
48
+            <Button onClick={handleReset}>重置</Button>
49
+          </Form.Item>
50
+        </div>
51
+      </div>
52
+    </Form>
53
+  )
54
+})
55
+
56
+export default props => {
57
+  const [loading, setLoading] = useState(false)
58
+  const [listData, setListData] = useState([])
59
+  const [pagination, setPagination] = useState({})
60
+  const [queryParams, setQueryParams] = useState({ pageNum: 1, pageSize: 10 })
61
+  const [showPoints, setShowPoints] = useState({visible: false, customerId: ''})
62
+
63
+  const handleSearch = vals => {
64
+    setQueryParams({
65
+      ...queryParams,
66
+      ...vals,
67
+      pageNum: 1,
68
+    })
69
+  }
70
+
71
+  const handlePageChange = (pageNum, pageSize) => {
72
+    setQueryParams({
73
+      ...queryParams,      
74
+      pageNum,
75
+      pageSize,
76
+    })
77
+  }
78
+
79
+  useEffect(() => {
80
+    setLoading(true)
81
+    getPersonList(queryParams).then(res => {
82
+      const [list, pageInfo] = res || {}
83
+      setListData(list)
84
+      setPagination(pageInfo)
85
+      setLoading(false)
86
+    }).catch(() => setLoading(false))
87
+  }, [queryParams])
88
+
89
+  return (
90
+    <div>
91
+      <Condition onSearch={handleSearch} onReset={handleSearch} />
92
+      <div style={{margin: '24px 0'}}> </div>
93
+      <Table dataSource={listData} loading={loading} pagination={{...pagination, onChange: handlePageChange}} rowKey="personId">
94
+        <Table.Column
95
+          title="头像"
96
+          dataIndex="avatarurl"
97
+          key="avatarurl"
98
+          render={t => <img src={t} alt="" style={{width: '64px', height: '64px'}} />}
99
+        />
100
+        <Table.Column title="姓名" dataIndex="nickname" key="nickname" />
101
+        <Table.Column title="电话" dataIndex="phone" key="phone" render={t => t ? t.replace(/(\d{3})\d*(\d{4})/,'$1****$2') : ''} />
102
+        <Table.Column title="创建时间" dataIndex="createDate" key="createDate" />
103
+        <Table.Column
104
+          title="操作"
105
+          key="action"
106
+          render={(_, row) => {
107
+            return (
108
+              <>
109
+                <Button type="link" onClick={() => setShowPoints({visible: true, customerId: row.personId})}>积分</Button>
110
+              </>
111
+            )
112
+          }}
113
+        />
114
+      </Table>
115
+      <IntegralRecord visibleData={showPoints} onCancel={() => setShowPoints({visible: false, customerId: ''})} />
116
+    </div>
117
+  )
118
+}

+ 2
- 3
src/pages/property/bill/list/index.jsx Bestand weergeven

@@ -158,9 +158,9 @@ export default props => {
158 158
 
159 159
   const handleDetail = row => {
160 160
     if (row.billStatus === '2') {
161
-      router.push(`/property/bill/management/edi?id=${row.billId}`)
161
+      router.push(`/property/bill/management/edi?id=${row.id}`)
162 162
     } else {
163
-      router.push(`/property/bill/management/info?id=${row.billId}`);
163
+      router.push(`/property/bill/management/info?id=${row.id}`);
164 164
     }
165 165
   }
166 166
 
@@ -175,7 +175,6 @@ export default props => {
175 175
   useEffect(() => {
176 176
     setLoading(true)
177 177
     FetchBillList(queryParams).then(res => {
178
-      console.log(res,"2323")
179 178
       const {list, ...pagi} = res[1]
180 179
       setListData(list)
181 180
       setPagination(pagi)

+ 26
- 27
src/pages/property/bill/order/Info.jsx Bestand weergeven

@@ -1,13 +1,11 @@
1 1
 import React, { useEffect, useState } from 'react'
2
-import { Button, Collapse, Icon, Descriptions, Typography, Spin } from 'antd'
2
+import { Button, Collapse, Icon, Descriptions, Typography, Spin, Table } from 'antd'
3 3
 import NavLink from 'umi/navlink'
4 4
 import { fetch, apis } from '@/utils/request'
5 5
 // import List from '../components/List'
6 6
 
7 7
 const getByOrderNumberBillInvoice = fetch(apis.bill.getByOrderNumberBillInvoice)
8 8
 
9
-const renderBillLink = bill => () => <NavLink><Button type="link"><Icon type="export" /></Button></NavLink>
10
-
11 9
 export default props => {
12 10
   const [loading, setLoading] = useState(false)
13 11
   const [billList, setBillList] = useState([])
@@ -17,34 +15,35 @@ export default props => {
17 15
   useEffect(() => {
18 16
     if (id) {
19 17
       getByOrderNumberBillInvoice({urlData: {id}}).then(res => {
20
-        setBillList(res)
18
+        const { billOrderList = []} = res || {}
19
+        setBillList(billOrderList)
21 20
       })
22 21
     }
23 22
   }, [id])
24 23
 
24
+  console.log(billList)
25
+
25 26
   return (
26
-    <Spin spinning={loading}>
27
-      <Collapse>
28
-        {
29
-          billList.map(bill => {
30
-            <Collapse.Panel key={bill.id} header={bill.billName} extra={renderBillLink(bill)}>
31
-              <Descriptions bordered column={3}>
32
-              {
33
-                (bill.billInvoiceList || []).map(item => (
34
-                  <>
35
-                    <Descriptions.Item key={`${item.id}-1`} label="收费单号">{item.id}</Descriptions.Item>
36
-                    <Descriptions.Item key={`${item.id}-2`} label="金额(元)">{ item.payPrice / 100 }</Descriptions.Item>
37
-                    <Descriptions.Item key={`${item.id}-3`} label="收费单说明">
38
-                      <Typography.Text ellipsis>{item.billInvoiceExplain}</Typography.Text>
39
-                    </Descriptions.Item>
40
-                  </>
41
-                ))
42
-              }
43
-              </Descriptions>
44
-            </Collapse.Panel>
45
-          })
46
-        }
47
-      </Collapse>
48
-    </Spin>
27
+    <div>
28
+      <Spin spinning={loading}>
29
+        <Collapse>
30
+          {
31
+            (billList || []).map(bill => (
32
+              <Collapse.Panel
33
+                key={bill.id}
34
+                header={`收费组: ${bill.billName||'无'}`}
35
+                // extra={<NavLink to=""><Button type="link">导出</Button></NavLink>}
36
+              >
37
+                <Table size="small" dataSource={bill.billInvoiceList || []} pagination={false}>
38
+                  <Table.Column title="收费单号" dataIndex="id" key="id" />
39
+                  <Table.Column title="金额(元)" dataIndex="payPrice" key="payPrice" render={t => t/100} />
40
+                  <Table.Column title="收费单说明" dataIndex="billInvoiceExplain" key="billInvoiceExplain" />
41
+                </Table>
42
+              </Collapse.Panel>
43
+            ))
44
+          }
45
+        </Collapse>
46
+      </Spin>
47
+    </div>
49 48
   )
50 49
 }

+ 1
- 1
src/pages/property/bill/order/index.jsx Bestand weergeven

@@ -117,7 +117,7 @@ export default props => {
117 117
           key="id"
118 118
           render={(_, row) => {
119 119
             return (
120
-              <NavLink to={`/property/bill/order/info?id=${row.id}`}>
120
+              <NavLink to={`/property/bill/order/info?id=${row.orderBumber}`}>
121 121
                 <Button type="link">{row.orderBumber}</Button>
122 122
               </NavLink>
123 123
             )

+ 7
- 0
src/services/apis.js Bestand weergeven

@@ -19,6 +19,13 @@ export default {
19 19
   announcement: announcement(prefix),
20 20
   ticket: ticket(prefix),
21 21
   propNews: propNews(prefix),
22
+  person: {
23
+    getPersonList: {
24
+      url: `${prefix}/person-list`,
25
+      method: 'GET',
26
+      action: 'admin.person.list',
27
+    }
28
+  },
22 29
   image: {
23 30
     uploadForAnt: {
24 31
       url: `${prefix}/antd/image`,