ProcessManagement.js
2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import React, {Component} from 'react';
import {
View,
ScrollView
} from "react-native";
import {width} from "../utils/getSize";
import PickerView from "../components/PickerView";
import FiveStarView from "../components/FiveStarView";
import SliderView from "../components/SliderView";
import CalculateFormulaView from "../components/CalculateFormulaView";
import TextSingleEditView from "../components/TextSingleEditView";
import TextMultiEditView from "../components/TextMultiEditView";
import PhoneEditView from "../components/PhoneEditView";
import AmountEditView from "../components/AmountEditView";
import LocationTextView from "../components/LocationTextView";
export default class ProcessManagement extends Component {
constructor(props) {
super(props);
this.state={
querySwitch: 'Common',
amount: 0,// 金额
};
}
componentWillMount() {
//设置头部
this.props.navigation.setParams({
isBack:true,
title: '组件'
});
}
renderDividerView() {
return(
<View style={{width: width, height: 5, backgroundColor: 'rgba(245, 245, 245, 1)'}}/>
)
}
performCalculate() {
this.refs.calculate.calculateValue(this.state.amount)
}
onChangeCalculate = (text) => {
console.log("=--200==-", text);
}
onChangeAmount = (amount) => {
this.setState({
amount: amount
}, () => this.performCalculate())
}
render() {
return (
<View style={{flex: 1, backgroundColor: 'white'}}>
<ScrollView
horizontal={false}
>
<PickerView/>
{this.renderDividerView()}
<FiveStarView/>
{this.renderDividerView()}
<SliderView/>
{this.renderDividerView()}
<AmountEditView
title={'金额(元)'}
inputType={'numeric'}
onChangeText={this.onChangeAmount}
/>
{this.renderDividerView()}
<CalculateFormulaView
ref={'calculate'}
editable={false}
onChangeText={this.onChangeCalculate}
/>
{/*<TabDetailView/>*/}
{this.renderDividerView()}
<TextSingleEditView/>
{this.renderDividerView()}
<PhoneEditView/>
{this.renderDividerView()}
<TextMultiEditView/>
{this.renderDividerView()}
<LocationTextView/>
</ScrollView>
</View>
);
}
}