...
|
...
|
@@ -44,7 +44,16 @@ export default class DeliverGoods extends Component { |
|
|
}
|
|
|
|
|
|
_onValueChange(value){
|
|
|
this.props.setExpressId && this.props.setExpressId(value);
|
|
|
let {initialRes,resource} = this.props;
|
|
|
let {expressList} = resource;
|
|
|
let list = expressList?expressList.list:[];
|
|
|
let param = null;
|
|
|
list.map((item, i) => {
|
|
|
if (item.get('id') == value) {
|
|
|
param = item?item.toJS():'';
|
|
|
}
|
|
|
})
|
|
|
this.props.setExpressValue && this.props.setExpressValue(param,initialRes);
|
|
|
}
|
|
|
|
|
|
_renderRow(rowData, sectionID, rowID) {
|
...
|
...
|
@@ -54,7 +63,7 @@ export default class DeliverGoods extends Component { |
|
|
}
|
|
|
|
|
|
_picker() {
|
|
|
let {expressList,expressId} = this.props.resource;
|
|
|
let {expressList,expressValue} = this.props.resource;
|
|
|
let list = expressList?expressList.list:[];
|
|
|
|
|
|
return (
|
...
|
...
|
@@ -66,11 +75,11 @@ export default class DeliverGoods extends Component { |
|
|
</TouchableOpacity>
|
|
|
<View style={styles.pickerSubContainer}>
|
|
|
<Picker
|
|
|
selectedValue={expressId}
|
|
|
selectedValue={expressValue?expressValue.get('id'):''}
|
|
|
onValueChange={this._onValueChange}>
|
|
|
|
|
|
{list.map((value, i) => {
|
|
|
return (<Picker.Item label={value.get('companyName')} value={value.get('companyName')} />);
|
|
|
return (<Picker.Item key={'Picker'+i} label={value.get('companyName')} value={value.get('id')} />);
|
|
|
})
|
|
|
}
|
|
|
</Picker>
|
...
|
...
|
@@ -81,12 +90,13 @@ export default class DeliverGoods extends Component { |
|
|
|
|
|
render() {
|
|
|
let {initialRes,resource} = this.props;
|
|
|
let {expressList,storehouse,expressNum,expressId} = resource;
|
|
|
let {expressList,storehouse,expressNum,expressValue} = resource;
|
|
|
|
|
|
let address = storehouse?storehouse.get('address'):'';
|
|
|
let adminName = storehouse?storehouse.get('adminName'):'';
|
|
|
let storehouseName = storehouse?storehouse.get('storehouseName'):'';
|
|
|
let phone = storehouse?storehouse.get('phone'):'';
|
|
|
let expressName = expressValue?expressValue.get('companyName'):'';
|
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
...
|
...
|
@@ -99,7 +109,7 @@ export default class DeliverGoods extends Component { |
|
|
}}>
|
|
|
<View style={styles.pickerView}>
|
|
|
<Text style={styles.pickerText} numberOfLines={1}>
|
|
|
{expressId}
|
|
|
{expressName}
|
|
|
</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
...
|
...
|
|