|
|
'use strict';
|
|
|
|
|
|
import React, {Component} from 'react';
|
|
|
import {Dimensions, ListView, StyleSheet, Text, View} from 'react-native';
|
|
|
import {Dimensions, ListView, StyleSheet, Text, View, Image, TouchableOpacity} from 'react-native';
|
|
|
import {Immutable} from 'immutable';
|
|
|
|
|
|
|
...
|
...
|
@@ -10,23 +10,59 @@ export default class WithdrawalRecord extends Component { |
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this._renderRow = this._renderRow.bind(this);
|
|
|
this._renderHeader = this._renderHeader.bind(this);
|
|
|
this.dataSource = new ListView.DataSource({
|
|
|
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
|
|
|
});
|
|
|
}
|
|
|
|
|
|
_renderHeader() {
|
|
|
return (<View>
|
|
|
|
|
|
<View style={styles.uploadContainer}>
|
|
|
<Text style={styles.loadStyle}>{'结算收益时需按照国家规定预扣个税,因此需先上传身份证信息 。若未提供正确有效的身份信息将导致扣税失败而影响提现。'}</Text>
|
|
|
<TouchableOpacity style={styles.uploadButton} onPress={()=> {
|
|
|
|
|
|
}}>
|
|
|
<Text style={styles.buttonText}>{'去上传'}</Text>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
|
|
|
|
|
|
<View style={styles.withdrawContainer}>
|
|
|
<Text style={styles.tipStyle}>{'每月20日结算上个月预估佣金并预扣个税'}</Text>
|
|
|
<TouchableOpacity style={{flexDirection: 'row', alignItems: 'center'}} onPress={()=> {
|
|
|
|
|
|
}}>
|
|
|
<Text style={styles.tipStyle}>{'结算说明 '}</Text>
|
|
|
<Image source={require('../images/more.png')}/>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
|
|
|
</View>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
_renderRow(rowData, sectionID, rowID) {
|
|
|
let showSpace = rowID === rowData.length ? false : true;
|
|
|
return (
|
|
|
<View>
|
|
|
<View style={styles.rowView}>
|
|
|
<Text style={styles.numberText}>处理编号:{rowData.get("settlementCode")}</Text>
|
|
|
<Text style={styles.priceText}>{rowData.get("settlementAmountStr")}</Text>
|
|
|
<Text style={styles.statusText}>{rowData.get("settlementStatus")}</Text>
|
|
|
</View>
|
|
|
<View style={[styles.rowView, {height: 20, marginTop: 4, marginBottom: 12}]}>
|
|
|
<View style={{width: width, height: 0.5, backgroundColor: '#f0f0f0'}}></View>
|
|
|
<View style={styles.detailView}>
|
|
|
<Text>
|
|
|
<Text style={styles.priceText}>税后总收益:</Text>
|
|
|
<Text style={styles.allPriceText}>{rowData.get("settlementAmountStr")}</Text>
|
|
|
</Text>
|
|
|
|
|
|
<Text style={styles.priceText}>提现总收益:{rowData.get("settlementAmountStr")}</Text>
|
|
|
<Text style={styles.priceText}>扣税总收益:{rowData.get("settlementAmountStr")}</Text>
|
|
|
<Text style={styles.timeText}>{rowData.get("settlementTimeStr")}</Text>
|
|
|
<Text style={styles.statusText}>{rowData.get("settlementStatus")}</Text>
|
|
|
</View>
|
|
|
<View style={styles.lineView}/>
|
|
|
{showSpace? <View style={{width: width, height: 10, backgroundColor: '#f0f0f0'}}></View> : null}
|
|
|
</View>
|
|
|
);
|
|
|
}
|
...
|
...
|
@@ -46,6 +82,7 @@ export default class WithdrawalRecord extends Component { |
|
|
contentContainerStyle={styles.contentContainer}
|
|
|
enableEmptySections={true}
|
|
|
dataSource={this.dataSource.cloneWithRows(recordList)}
|
|
|
renderHeader={this._renderHeader}
|
|
|
renderRow={this._renderRow}
|
|
|
onEndReached={() => {
|
|
|
if (recordList.size !== 0) {
|
...
|
...
|
@@ -71,9 +108,8 @@ let styles = StyleSheet.create({ |
|
|
},
|
|
|
rowView: {
|
|
|
width: width,
|
|
|
height: 22,
|
|
|
height: 50,
|
|
|
flexDirection: 'row',
|
|
|
marginTop: 12,
|
|
|
paddingLeft: 15,
|
|
|
paddingRight: 15,
|
|
|
alignItems: 'center',
|
...
|
...
|
@@ -84,24 +120,37 @@ let styles = StyleSheet.create({ |
|
|
height: 0.5,
|
|
|
backgroundColor: '#e0e0e0'
|
|
|
},
|
|
|
detailView: {
|
|
|
width: width,
|
|
|
paddingTop: 9,
|
|
|
paddingLeft: 15,
|
|
|
paddingRight: 15,
|
|
|
paddingBottom: 20,
|
|
|
flexDirection: 'column',
|
|
|
justifyContent: 'center',
|
|
|
alignItems: 'flex-start',
|
|
|
},
|
|
|
allPriceText:{
|
|
|
fontFamily: 'PingFang-SC-Medium',
|
|
|
fontSize: 14,
|
|
|
color: '#D0021B',
|
|
|
},
|
|
|
numberText: {
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
|
|
fontSize: 14,
|
|
|
color: '#444444',
|
|
|
letterSpacing: -0.19,
|
|
|
},
|
|
|
priceText: {
|
|
|
fontFamily: 'PingFang-SC-Medium',
|
|
|
fontSize: 16,
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
|
|
fontSize: 14,
|
|
|
color: '#444444',
|
|
|
letterSpacing: -0.21,
|
|
|
fontWeight: 'bold'
|
|
|
marginTop: 6,
|
|
|
},
|
|
|
timeText: {
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
|
|
fontSize: 14,
|
|
|
color: '#B0B0B0',
|
|
|
letterSpacing: -0.19,
|
|
|
marginTop: 15,
|
|
|
},
|
|
|
statusText: {
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
...
|
...
|
@@ -109,4 +158,54 @@ let styles = StyleSheet.create({ |
|
|
color: '#D0021B',
|
|
|
letterSpacing: -0.29,
|
|
|
},
|
|
|
|
|
|
|
|
|
uploadContainer: {
|
|
|
width: width,
|
|
|
backgroundColor: 'transparent',
|
|
|
flexDirection: 'column',
|
|
|
alignItems: 'center',
|
|
|
paddingTop: 20,
|
|
|
paddingLeft: 15,
|
|
|
paddingRight: 15,
|
|
|
paddingBottom: 20,
|
|
|
},
|
|
|
loadStyle: {
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
|
|
fontSize: 14,
|
|
|
color: '#444444',
|
|
|
backgroundColor: 'transparent',
|
|
|
textAlign: 'left',
|
|
|
},
|
|
|
uploadButton: {
|
|
|
width: 80,
|
|
|
height: 30,
|
|
|
marginTop: 10,
|
|
|
borderRadius: 5,
|
|
|
backgroundColor: '#D0021B',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
},
|
|
|
buttonText: {
|
|
|
color: 'white',
|
|
|
fontSize: 14,
|
|
|
fontWeight: 'bold',
|
|
|
},
|
|
|
withdrawContainer: {
|
|
|
width: width,
|
|
|
height: 40,
|
|
|
paddingLeft: 15,
|
|
|
paddingRight: 15,
|
|
|
backgroundColor: '#f0f0f0',
|
|
|
flexDirection: 'row',
|
|
|
justifyContent: 'space-between',
|
|
|
},
|
|
|
tipStyle: {
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
|
|
fontSize: 12,
|
|
|
color: '#B0B0B0',
|
|
|
backgroundColor: 'transparent',
|
|
|
textAlign: 'center',
|
|
|
lineHeight: 40,
|
|
|
},
|
|
|
}); |
...
|
...
|
|