Kaynağa Gözat

Merge branch 'master' of http://git.ycjcjy.com/xiangsong/xs-manage

张延森 4 yıl önce
ebeveyn
işleme
77aa20240b

+ 55
- 3
src/pages/property/bill/order/index.jsx Dosyayı Görüntüle

@@ -15,12 +15,42 @@ const StatusDict = {
15 15
   '3': '已关闭',
16 16
 }
17 17
 
18
+const PayStatusDict = [
19
+  {
20
+    label: '未支付',
21
+    value: '0',
22
+  },
23
+  {
24
+    label: '已支付',
25
+    value: '1',
26
+  },
27
+  {
28
+    label: '支付中',
29
+    value: '2',
30
+  },
31
+  {
32
+    label: '已关闭',
33
+    value: '3',
34
+  },
35
+]
36
+
18 37
 const PayTypeDict = {
19 38
   '0': '微信缴费',
20 39
   '1': '线下缴费',
21
-  '2': '支付宝缴费',
40
+  // '2': '支付宝缴费',
22 41
 }
23 42
 
43
+const PayTypesDict = [
44
+  {
45
+    label: '微信缴费',
46
+    value: '0',
47
+  },
48
+  {
49
+    label: '线下缴费',
50
+    value: '1',
51
+  },
52
+]
53
+
24 54
 const Condition = props => {
25 55
   return (
26 56
     <Search
@@ -56,6 +86,28 @@ const Condition = props => {
56 86
               getFieldDecorator('payPhone')(<Input placeholder="缴费人手机号" />)
57 87
             }
58 88
             </Form.Item>
89
+            <Form.Item label="订单状态">
90
+            {
91
+              getFieldDecorator('orderStatus')(
92
+                <Select placeholder="选择订单状态" style={{ width: '120px' }}>
93
+                  {
94
+                    PayStatusDict.map(x => (<Select.Option key={x.value} value={x.value}>{x.label}</Select.Option>))
95
+                  }
96
+                </Select>
97
+              )
98
+            }
99
+            </Form.Item>
100
+            <Form.Item label="缴费方式">
101
+            {
102
+              getFieldDecorator('payType')(
103
+                <Select placeholder="选择缴费方式" style={{ width: '120px' }}>
104
+                  {
105
+                    PayTypesDict.map(x => (<Select.Option key={x.value} value={x.value}>{x.label}</Select.Option>))
106
+                  }
107
+                </Select>
108
+              )
109
+            }
110
+            </Form.Item>
59 111
           </>
60 112
         )
61 113
       }}
@@ -155,8 +207,8 @@ export default props => {
155 207
         <Table.Column title="缴费人手机号" dataIndex="payPhone" key="payPhone" />
156 208
         <Table.Column title="缴费备注" dataIndex="payRemark" key="payRemark" />
157 209
         <Table.Column title="缴费方式" dataIndex="payType" key="payType" render={payType => PayTypeDict[payType]}/>
158
-        <Table.Column title="订单生成时间" dataIndex="createTime" key="createTime" />
159
-        <Table.Column title="缴费完成时间" dataIndex="updateDate" key="updateDate" />
210
+        <Table.Column title="订单生成时间" dataIndex="createDate" key="createDate" />
211
+        <Table.Column title="缴费完成时间" dataIndex="createTime" key="createTime" />
160 212
       </List>
161 213
 
162 214
     </div>

+ 21
- 3
src/pages/property/news/index.jsx Dosyayı Görüntüle

@@ -1,10 +1,13 @@
1 1
 import React, { useState, useEffect } from 'react'
2
-import { Select, Spin, Table, Button, Form, Input, Divider, Modal, Popconfirm, Typography, notification } from 'antd'
2
+import { Select, Spin, Table, Button, Form, Input, Divider, Modal, Popconfirm, Typography, notification, DatePicker } from 'antd'
3 3
 import NavLink from 'umi/navlink'
4
+import moment from 'moment';
4 5
 import { fetch, fetchList, apis } from '@/utils/request'
5 6
 import Search from '../components/Search'
6 7
 import List from '../components/List'
7 8
 
9
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
10
+
8 11
 const getNewsList = fetchList(apis.propNews.getNewsList)
9 12
 const updateNews = fetch(apis.propNews.updateNews)
10 13
 const deleteNews = fetch(apis.propNews.deleteNews)
@@ -36,6 +39,12 @@ const Condition = props => {
36 39
               getFieldDecorator('newsName')(<Input placeholder="标题" />)
37 40
             }
38 41
             </Form.Item>
42
+            <Form.Item>
43
+            <span style={{ marginRight: '10px' }}>创建时间:</span>
44
+            {getFieldDecorator('createTime')(
45
+              <RangePicker placeholder={['开始时间', '结束时间']} />
46
+            )}
47
+          </Form.Item>
39 48
           </>
40 49
         )
41 50
       }}
@@ -56,9 +65,18 @@ export default props => {
56 65
   const [typeList, setTypeList] = useState([])
57 66
 
58 67
   const handleSearch = vals => {
68
+    let { createTime, ...submitValue  } = vals
69
+    if (null != createTime && createTime.length > 0) {
70
+      const [startCreateDate, endCreateDate] = createTime
71
+      submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
72
+      submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
73
+    } else {
74
+      submitValue.startCreateDate = null
75
+      submitValue.endCreateDate = null
76
+    }
59 77
     setQueryParams({
60 78
       ...queryParams,
61
-      ...vals,
79
+      ...submitValue,
62 80
       pageNum: 1,
63 81
     })
64 82
   }
@@ -120,7 +138,7 @@ export default props => {
120 138
         </NavLink>
121 139
       </div>
122 140
       <List dataSource={listData} loading={loading} pagination={pagination} onPageChange={handlePageChange} rowKey="newsId">
123
-        <Table.Column title="#ID" dataIndex="newsId" key="newsId" />
141
+        {/* <Table.Column title="#ID" dataIndex="newsId" key="newsId" /> */}
124 142
         <Table.Column
125 143
           title="分类"
126 144
           dataIndex="newsTypeId"

+ 51
- 1
src/pages/property/proprietor/Audit.jsx Dosyayı Görüntüle

@@ -50,6 +50,7 @@ export default props => {
50 50
   const [loading, setLoading] = useState(false)
51 51
   const [noPassShow, setNoPassShow] = useState(false)
52 52
   const [listData, setListData] = useState([])
53
+  const [selectedKeys, setSelectedKeys] = useState([])
53 54
   const [pagination, setPagination] = useState({})
54 55
   const [queryParams, setQueryParams] = useState({ pageNum: 1, pageSize: 10 })
55 56
 
@@ -63,6 +64,13 @@ export default props => {
63 64
     })
64 65
   }
65 66
 
67
+  const rowSelection = {
68
+    onChange: (selectedRowKeys, selectedRows) => {
69
+      console.log('------>', selectedRowKeys)
70
+      setSelectedKeys(selectedRowKeys)
71
+    }
72
+  }
73
+
66 74
   const handleDeleteRow = row => {}
67 75
 
68 76
   const showAuditDialog = row => {
@@ -113,6 +121,26 @@ export default props => {
113 121
     })
114 122
   }
115 123
 
124
+  const handleChangeSelected = (verifyStatus) => {
125
+      selectedKeys.map(x => {
126
+         const params = {
127
+            verifyStatus,
128
+            remark: ''
129
+          }
130
+      
131
+          userVerifyAudit({ urlData: { id: x }, params }).then(res => {
132
+              console.log(res)
133
+          })
134
+      })
135
+      Modal.success({
136
+        content: '审核提交成功',
137
+        onOk: () => {
138
+          // 触发数据刷新
139
+          setQueryParams({...queryParams})
140
+        }
141
+      })
142
+  }
143
+
116 144
   useEffect(() => {
117 145
     setLoading(true)
118 146
     userVerifyAll(queryParams).then(res => {
@@ -126,10 +154,32 @@ export default props => {
126 154
   return (
127 155
     <div>
128 156
       <Condition onSearch={handleSearch} onSearch={handleSearch} />
157
+      <div style={{ margin: '24px 0' }}>
158
+        <div style={{marginLeft: 16, display: 'inline-block'}}>
159
+          <Popconfirm
160
+            title="确认进行批量审核通过操作?"
161
+            onConfirm={() => handleChangeSelected(true)}
162
+            okText="确定"
163
+            cancelText="取消"
164
+          >
165
+            <Button type="danger" disabled={!selectedKeys.length}>批量通过</Button>
166
+          </Popconfirm>
167
+        </div>
168
+        <div style={{marginLeft: 16, display: 'inline-block'}}>
169
+          <Popconfirm
170
+            title="确认进行批量审核不通过操作?"
171
+            onConfirm={() => handleChangeSelected(false)}
172
+            okText="确定"
173
+            cancelText="取消"
174
+          >
175
+            <Button type="danger" disabled={!selectedKeys.length}>批量不通过</Button>
176
+          </Popconfirm>
177
+        </div>
178
+      </div>
129 179
       <div style={{ marginTop: '24px' }}>
130 180
         <p style={{color: '#888', fontSize: '0.8em'}}>注意,审核后无法修改审核结果,请仔细确认</p>
131 181
       </div>
132
-      <List dataSource={listData} onPageChange={handlePageChange} pagination={pagination} loading={loading} rowKey="id">
182
+      <List dataSource={listData} onPageChange={handlePageChange} pagination={pagination} rowSelection={rowSelection} loading={loading} rowKey="id">
133 183
         <Table.Column title="姓名" dataIndex="ownerName" key="ownerName" />
134 184
         <Table.Column title="手机号" dataIndex="phone" key="phone" />
135 185
         <Table.Column title="身份证" dataIndex="idCard" key="idCard" />

+ 1
- 1
src/pages/property/proprietor/BatchImport.jsx Dosyayı Görüntüle

@@ -89,7 +89,7 @@ export default props => {
89 89
         <Column key="levelName" title="楼层" dataIndex="levelName" />
90 90
         <Column key="roomNoName" title="户号" dataIndex="roomNoName" />
91 91
         <Column key="ownerName" title="户主姓名" dataIndex="ownerName" />
92
-        <Column key="roleName" title="身份" dataIndex="roleName" />
92
+        {/* <Column key="roleName" title="身份" dataIndex="roleName" /> */}
93 93
         <Column key="ownerTel" title="手机号码" dataIndex="ownerTel" />
94 94
       </Table>
95 95
     </div>

+ 1
- 1
src/pages/property/proprietor/index.jsx Dosyayı Görüntüle

@@ -253,7 +253,7 @@ export default props => {
253 253
         dataSource={listData}
254 254
         loading={loading}
255 255
         pagination={pagination}
256
-        rowSelection={rowSelection}
256
+        rowSelection={rowSelection} 
257 257
         onPageChange={handlePageChange}
258 258
         rowKey="id"
259 259
       >

+ 5
- 5
src/pages/property/ticket/index.jsx Dosyayı Görüntüle

@@ -41,10 +41,10 @@ const StatusDict = [
41 41
     label: '已评价',
42 42
     value: '5',
43 43
   },
44
-  {
45
-    label: '已终止',
46
-    value: '6',
47
-  },
44
+  // {
45
+  //   label: '已终止',
46
+  //   value: '6',
47
+  // },
48 48
 ]
49 49
 
50 50
 const getDictValue = (dict, val) => (dict.filter(x => x.value === val)[0] || {}).label
@@ -92,7 +92,7 @@ const Condition = props => {
92 92
               getFieldDecorator('status')(
93 93
                 <Select placeholder="选择状态" style={{ width: '120px' }}>
94 94
                   {
95
-                    TypeDict.map(x => (<Select.Option key={x.value} value={x.value}>{x.label}</Select.Option>))
95
+                    StatusDict.map(x => (<Select.Option key={x.value} value={x.value}>{x.label}</Select.Option>))
96 96
                   }
97 97
                 </Select>
98 98
               )