Ver código fonte

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

傅行帆 5 anos atrás
pai
commit
e12b8be0d2

+ 2
- 1
src/pages/customer/customerlist/components/BatchAssistConsultant.jsx Ver arquivo

@@ -72,7 +72,7 @@ class ModalAttribution extends React.Component {
72 72
   getList(params) {
73 73
     // 网路请求
74 74
     console.log('params: ', params)
75
-    request({ ...apis.customer.buildingConsultant }).then(res => {
75
+    request({ ...apis.customer.buildingConsultant,params: { ...params } }).then(res => {
76 76
       this.setState({ dataSource: res })
77 77
     }).catch(err => {
78 78
       
@@ -89,6 +89,7 @@ class ModalAttribution extends React.Component {
89 89
 
90 90
    // 分页
91 91
   onChange(pageNum) {
92
+
92 93
     this.getList({ pageNumber: pageNum, pageSize: 5, buildingId: this.state.visibleData.buildingName })
93 94
   }
94 95
 

+ 2
- 2
src/pages/customer/customerlist/index.jsx Ver arquivo

@@ -631,14 +631,14 @@ function body(props) {
631 631
           //     onClick: () => toCustomerDateil(record),
632 632
           //   };
633 633
           // }}
634
-          dataSource={dataSource.records} columns={privateColumns} pagination={{ current: dataSource.current, total: dataSource.total, pageSize: dataSource.size, onChange }} rowKey="customerList" /> :
634
+          dataSource={dataSource.records} columns={privateColumns} pagination={{ current: dataSource.current, total: dataSource.total, pageSize: dataSource.size, onChange }} rowKey={r=>r.customerId} /> :
635 635
         <Table rowSelection={rowSelection}
636 636
           // onRow={record => {
637 637
           //   return {
638 638
           //     onClick: () => publicCustomerDetail(record),
639 639
           //   };
640 640
           // }}
641
-          dataSource={dataSource.records} columns={publicColumns} pagination={{ current: dataSource.current, total: dataSource.total, pageSize: dataSource.size, onChange }} rowKey="customerList" />
641
+          dataSource={dataSource.records} columns={publicColumns} pagination={{ current: dataSource.current, total: dataSource.total, pageSize: dataSource.size, onChange }} rowKey={r=>r.customerId} />
642 642
       }
643 643
 
644 644
       {/* 调整归属 */}

+ 2
- 2
src/pages/statistical/activity/compenents/Content.jsx Ver arquivo

@@ -401,7 +401,7 @@ class OverView extends React.Component {
401 401
             {getFieldDecorator('startDate', {initialValue: moment(startDate)
402 402
               
403 403
             })(
404
-                <DatePicker placeholder="开始日期"/>,
404
+                <DatePicker allowClear={false} placeholder="开始日期"/>,
405 405
             )}
406 406
             </Form.Item>
407 407
             <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
@@ -409,7 +409,7 @@ class OverView extends React.Component {
409 409
                 initialValue: moment(endDate)
410 410
 
411 411
               })(
412
-                <DatePicker placeholder="结束日期" />,
412
+                <DatePicker allowClear={false} placeholder="结束日期" />,
413 413
               )}
414 414
             </Form.Item>
415 415
             <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>

+ 4
- 2
src/pages/statistical/activity/compenents/OverView.jsx Ver arquivo

@@ -206,6 +206,7 @@ class OverView extends React.Component {
206 206
 
207 207
   getList () {
208 208
     const { formData } = this.state
209
+    console.log(formData,'formData')
209 210
     request({ ...apis.activityDataStatis.total, params: formData }).then(res => {
210 211
       this.setState({ personData: res })
211 212
     }).catch(err => {
@@ -269,6 +270,7 @@ class OverView extends React.Component {
269 270
   //重置搜索
270 271
   handleReset = e => {
271 272
     this.props.form.resetFields()
273
+    console.log('handleReset',this.state.formData)
272 274
     this.setState( {
273 275
       radioVal: 6,
274 276
       formData: {
@@ -291,8 +293,8 @@ class OverView extends React.Component {
291 293
       buildingId: [],
292 294
       targetType: [],
293 295
       helpVisible: false,
294
-    })
295
-    this.getAllList()
296
+    },this.getAllList)
297
+    
296 298
   }
297 299
 
298 300
   exportActivityStats = () => {

+ 1
- 1
src/pages/statistical/consultant/homePagePersons.jsx Ver arquivo

@@ -93,7 +93,7 @@ function record(props) {
93 93
             dataIndex: 'gender',
94 94
             key: 'gender',
95 95
             align: 'center',
96
-            render: (_, record) => <span>{record.gender == 1 ? '男' : record.gender == 2 ? '女' : '未知'}</span>,
96
+            render: (_, record) => <span>{(record.gender || record.sex) == 1 ? '男' : (record.gender || record.sex) == 2 ? '女' : '未知'}</span>,
97 97
         },
98 98
         {
99 99
             title: '访问次数',

+ 4
- 4
src/pages/statistical/consultant/table.jsx Ver arquivo

@@ -109,7 +109,7 @@ function record(props) {
109 109
             dataIndex: 'gender',
110 110
             key: 'gender',
111 111
             align: 'center',
112
-            render: (_, record) => <span>{record.gender == 1 ? '男' : record.gender == 2 ? '女' : '未知'}</span>,
112
+            render: (_, record) => <span>{(record.gender || record.sex) == 1 ? '男' : (record.gender || record.sex) == 2 ? '女' : '未知'}</span>,
113 113
         },
114 114
     ]
115 115
 
@@ -162,9 +162,9 @@ function record(props) {
162 162
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
163 163
             </div>
164 164
             <Prompt message={location =>
165
-        location.pathname.startsWith("/statistical/consultant")
166
-          ? true
167
-          : localStorage.removeItem("consultantPageParams")} />
165
+                location.pathname.startsWith("/statistical/consultant")
166
+                    ? true
167
+                    : localStorage.removeItem("consultantPageParams")} />
168 168
         </>
169 169
     )
170 170
 }

+ 1
- 1
src/pages/statistical/consultant/visitNum.jsx Ver arquivo

@@ -139,7 +139,7 @@ function record(props) {
139 139
             dataIndex: 'gender',
140 140
             key: 'gender',
141 141
             align: 'center',
142
-            render: (_, record) => <span>{record.gender == 1 ? '男' : record.gender == 2 ? '女' : '未知'}</span>,
142
+            render: (_, record) => <span>{(record.gender || record.sex) == 1 ? '男' : (record.gender || record.sex) == 2 ? '女' : '未知'}</span>,
143 143
         },
144 144
         {
145 145
             title: '访问时间',

+ 1
- 1
src/pages/statistical/consultant/visitPersons.jsx Ver arquivo

@@ -87,7 +87,7 @@ function record(props) {
87 87
             dataIndex: 'gender',
88 88
             key: 'gender',
89 89
             align: 'center',
90
-            render: (_, record) => <span>{record.gender == 1 ? '男' : record.gender == 2 ? '女' : '未知'}</span>,
90
+            render: (_, record) => <span>{(record.gender || record.sex) == 1 ? '男' : (record.gender || record.sex) == 2 ? '女' : '未知'}</span>,
91 91
         },
92 92
         {
93 93
             title: '访问次数',