Your Name 4 年 前
コミット
45deafd3c1
共有2 個のファイルを変更した18 個の追加5 個の削除を含む
  1. 1
    1
      package.json
  2. 17
    4
      src/pages/property/bill/order/index.jsx

+ 1
- 1
package.json ファイルの表示

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

+ 17
- 4
src/pages/property/bill/order/index.jsx ファイルの表示

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