Your Name 4 years ago
parent
commit
45deafd3c1
2 changed files with 18 additions and 5 deletions
  1. 1
    1
      package.json
  2. 17
    4
      src/pages/property/bill/order/index.jsx

+ 1
- 1
package.json View File

72
     "umi-plugin-pro-block": "^1.3.6",
72
     "umi-plugin-pro-block": "^1.3.6",
73
     "umi-plugin-react": "^1.15.8",
73
     "umi-plugin-react": "^1.15.8",
74
     "umi-request": "^1.0.8",
74
     "umi-request": "^1.0.8",
75
-    "wangeditor": "^4.6.2"
75
+    "wangeditor": "^4.6.4"
76
   },
76
   },
77
   "devDependencies": {
77
   "devDependencies": {
78
     "@ant-design/colors": "^3.1.0",
78
     "@ant-design/colors": "^3.1.0",

+ 17
- 4
src/pages/property/bill/order/index.jsx View File

3
 import NavLink from 'umi/navlink'
3
 import NavLink from 'umi/navlink'
4
 import moment from 'moment';
4
 import moment from 'moment';
5
 import { fetchList, apis, fetch } from '@/utils/request'
5
 import { fetchList, apis, fetch } from '@/utils/request'
6
+import CommunitySelect from '@/components/CommunitySelect'
6
 import Search from '../../components/Search'
7
 import Search from '../../components/Search'
7
 import List from '../../components/List'
8
 import List from '../../components/List'
8
 
9
 
55
 ]
56
 ]
56
 
57
 
57
 const Condition = props => {
58
 const Condition = props => {
59
+  const [communityId, setCommunityId] = useState()
60
+
61
+  const handleCommunityChange = v => {
62
+    setCommunityId(v)
63
+
64
+    props.onCommunityChange(v)
65
+  }
66
+
58
   return (
67
   return (
59
     <Search
68
     <Search
60
       onSearch={props.onSearch}
69
       onSearch={props.onSearch}
64
         
73
         
65
         return (
74
         return (
66
           <>
75
           <>
76
+            <Form.Item label="小区">
77
+              <CommunitySelect value={communityId} onChange={handleCommunityChange} autoInited />
78
+            </Form.Item>
67
             <Form.Item label="订单号">
79
             <Form.Item label="订单号">
68
             {
80
             {
69
               getFieldDecorator('orderBumber')(<Input placeholder="订单号" />)
81
               getFieldDecorator('orderBumber')(<Input placeholder="订单号" />)
128
   const [listData, setListData] = useState([])
140
   const [listData, setListData] = useState([])
129
   const [pagination, setPagination] = useState({})
141
   const [pagination, setPagination] = useState({})
130
   const [queryParams, setQueryParams] = useState({ pageNum: 1, pageSize: 10 })
142
   const [queryParams, setQueryParams] = useState({ pageNum: 1, pageSize: 10 })
143
+  const [communityId, setCommunityId] = useState()
131
 
144
 
132
   const handleSearch = vals => {
145
   const handleSearch = vals => {
133
     let { createTime, ...submitValue  } = vals
146
     let { createTime, ...submitValue  } = vals
165
 
178
 
166
   useEffect(() => {
179
   useEffect(() => {
167
     setLoading(true)
180
     setLoading(true)
168
-    getBillStatementAll({ data: queryParams }).then(res => {
181
+    getBillStatementAll({ data: {...queryParams, communityId} }).then(res => {
169
       const {list, ...pagi} = res || {}
182
       const {list, ...pagi} = res || {}
170
       setListData(list)
183
       setListData(list)
171
       setPagination(pagi)
184
       setPagination(pagi)
172
       setLoading(false)
185
       setLoading(false)
173
     }).catch(err => setLoading(false))
186
     }).catch(err => setLoading(false))
174
-  }, [queryParams])
187
+  }, [queryParams, communityId])
175
 
188
 
176
   return (
189
   return (
177
     <div>
190
     <div>
178
-      <Condition onSearch={handleSearch} onReset={handleSearch} />
191
+      <Condition onSearch={handleSearch} onReset={handleSearch} onCommunityChange={v => setCommunityId(v)}  />
179
       <div style={{ margin: '24px 0' }}>
192
       <div style={{ margin: '24px 0' }}>
180
         <Button type="link" onClick={exportExcel}><Icon type="download"/>导出数据</Button>
193
         <Button type="link" onClick={exportExcel}><Icon type="download"/>导出数据</Button>
181
       </div>
194
       </div>
193
           }}
206
           }}
194
         />
207
         />
195
         <Table.Column
208
         <Table.Column
196
-          title="收费组编号"
209
+          title="收费组"
197
           dataIndex="billId"
210
           dataIndex="billId"
198
           key="billId"
211
           key="billId"
199
           render={(_, row) => {
212
           render={(_, row) => {