Authored by 于良

对账结算页面修复 review by 盖剑秋

@@ -31,18 +31,18 @@ export default class AccountSettlement extends Component { @@ -31,18 +31,18 @@ export default class AccountSettlement extends Component {
31 this.renderRow = this.renderRow.bind(this); 31 this.renderRow = this.renderRow.bind(this);
32 } 32 }
33 33
34 - renderRow(Data,sectionId) {  
35 - console.log(Data); 34 + renderRow(rowData,sectionId) {
  35 + console.log(rowData);
36 switch (sectionId) { 36 switch (sectionId) {
37 37
38 case 'SECTION_HEADER': 38 case 'SECTION_HEADER':
39 return ( 39 return (
40 <View style={styles.headerContainer}> 40 <View style={styles.headerContainer}>
41 <Text style={[styles.commonText, styles.headerText]}> 41 <Text style={[styles.commonText, styles.headerText]}>
42 - {Data.title} 42 + {rowData.title}
43 </Text> 43 </Text>
44 <Text style={[styles.valueText, styles.headerText]}> 44 <Text style={[styles.valueText, styles.headerText]}>
45 - {Data.content} 45 + {rowData.content}
46 </Text> 46 </Text>
47 </View> 47 </View>
48 ); 48 );
@@ -67,30 +67,30 @@ export default class AccountSettlement extends Component { @@ -67,30 +67,30 @@ export default class AccountSettlement extends Component {
67 67
68 </View> 68 </View>
69 ); 69 );
70 - case 'SECTION_CONTENT': 70 + case 'SECTION_CONTENT':
  71 + let statusStr = '';
  72 + switch (rowData.status) {
  73 + case 1:
  74 + statusStr = '已出账单';
  75 + break;
  76 + case 2:
  77 + statusStr = '已付款';
  78 + break;
  79 +
  80 + }
71 return ( 81 return (
72 - let statusStr = '';  
73 - switch (Data.status) {  
74 - case 1:  
75 - statusStr = '已出账单';  
76 - break;  
77 - case 2:  
78 - statusStr = '已付款';  
79 - break;  
80 - default:  
81 -  
82 - }  
83 <View style={styles.cellContainer}> 82 <View style={styles.cellContainer}>
84 - <Text style={[styles.inCellText,{flex:0.9}]}>{Data.brandId}</Text>  
85 - <Text style={[styles.inCellText,{flex:1.0}]}>{Data.dateId}</Text> 83 + <Text style={[styles.inCellText,{flex:0.9}]}>{rowData.brandId}</Text>
  84 + <Text style={[styles.inCellText,{flex:1.0}]}>{rowData.dateId}</Text>
86 <Text style={[styles.inCellText,{flex:0.8}]}>{statusStr}</Text> 85 <Text style={[styles.inCellText,{flex:0.8}]}>{statusStr}</Text>
87 - <Text style={[styles.inCellText,{flex:1.3}]}>{Data.orderAmount}</Text> 86 + <Text style={[styles.inCellText,{flex:1.3}]}>{rowData.orderAmount}</Text>
88 </View> 87 </View>
89 ); 88 );
90 } 89 }
91 90
92 return (<Text>Error data source</Text>); 91 return (<Text>Error data source</Text>);
93 } 92 }
  93 +
94 render() { 94 render() {
95 95
96 let isFetching = this.props.isFetching; 96 let isFetching = this.props.isFetching;
@@ -52,10 +52,10 @@ export default class AccountSettlementContainer extends Component { @@ -52,10 +52,10 @@ export default class AccountSettlementContainer extends Component {
52 } 52 }
53 53
54 componentDidMount() { 54 componentDidMount() {
55 - fetchNextPage(); 55 + this.fetchNextPage();
56 } 56 }
57 57
58 - fetchNextPage(){ 58 + fetchNextPage() {
59 let params = { 59 let params = {
60 page: this.props.actStmt.currentPage+1, 60 page: this.props.actStmt.currentPage+1,
61 size: 20, 61 size: 20,