ProcessManagement.js
7.68 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
import React, {Component} from 'react';
import {
View,
Text,
ScrollView, TouchableOpacity, Platform, Image
} from "react-native";
import {width} from "../utils/getSize";
import PickerView from "../components/PickerView";
import FiveStarView from "../components/FiveStarView";
import SliderView from "../components/SliderView";
import TextSingleEditView from "../components/TextSingleEditView";
import TextMultiEditView from "../components/TextMultiEditView";
import PhoneEditView from "../components/PhoneEditView";
import NumberEditView from "../components/NumberEditView";
import LocationTextView from "../components/LocationTextView";
import CalculatorView from "../components/CalculatorView";
import TabDetailView from "../components/TabDetailView";
import CheckboxView from "../components/CheckboxView";
import LabelLinkView from "../components/LabelLinkView";
import BooleanCheckView from "../components/BooleanCheckView";
import SelectItemView from "../components/SelectItemView";
import AttachmentUpdateView from "../components/AttachmentUpdateView";
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)'}}/>
)
}
onChangeCalculate = (text) => {
console.log("=--200==-", text);
}
onChangeAmount = (amount, type) => {
if (this.refs.calculate) {
this.refs.calculate.calculateValue(amount, type)
}
}
render() {
let singleData = {name: "单行输入", data:'{\"placeholder\": \"test\"}'};
return (
<View style={{flex: 1, backgroundColor: 'white'}}>
<ScrollView
horizontal={false}
>
<SelectItemView
modalTitle={'经营单元选择'}
attrData={{name: "经营单元", type: 'OPERATING_UNIT', data:'{\"placeholder\": \"请选择经营单元\", \"isActive\" : true}'}}
/>
<SelectItemView
modalTitle={'岗位选择'}
attrData={{name: "岗位", type: 'POSITION', data:'{\"placeholder\": \"请选择合适的岗位\"}'}}
/>
{this.renderDividerView()}
<LocationTextView
attrData={{name: "地点", type: 'LOCATION', data:'{\"placeholder\": \"请选择\"}'}}
/>
<AttachmentUpdateView
attrData={{name: "附件", type: 'ATTACHMENT', data:'{\"placeholder\": \"请选择\"}'}}
/>
{/*{this.renderDividerView()}
<SelectItemView
modalTitle={'部门选择'}
attrData={{name: "部门", type: 'ORGANIZATION', data:'{\"placeholder\": \"请注意填写格式\", \"multipleSelect\" : true}'}}
/>
{this.renderDividerView()}
<BooleanCheckView
attrData={{name: "测试是否", type: 'BOOLEAN', data:'{\"booleanDefault\": true}'}}
/>
{this.renderDividerView()}
<CheckboxView
attrData={{name: "单选框", type: 'SELECT', data:'{\"placeholder\": \"请选择\",\"options\":[{\"value\":\"标准采购订单\",\"checked\":true},{\"value\":\"内部采购订单\",\"checked\":false}]}'}}
/>
<CheckboxView
attrData={{name: "多选框", type: 'CHECKBOX', data:'{\"placeholder\": \"请选择\", \"options\":[{\"value\":\"标准采购订单\",\"checked\":true},{\"value\":\"内部采购订单\",\"checked\":false}]}'}}
/>
{this.renderDividerView()}
<PickerView
attrData={{name: "日期", type: 'DATE', data:'{\"placeholder\": \"请选择\"}'}}
/>
{this.renderDividerView()}
<PickerView
attrData={{name: "日期区间", type: 'PERIOD', data:'{\"beginPlaceholder\": \"请选择请假开始日期\", \"endPlaceholder\": \"请选择请假结束日期\"}'}}
/>
{this.renderDividerView()}
<PickerView
attrData={{name: "省市区", type: 'CITY', data:'{\"placeholder\": \"请选择\"}'}}
/>
{this.renderDividerView()}
<FiveStarView
attrData={{name: "评分", data:'{\"placeholder\": \"请选择请\", \"default\": 5}'}}
/>
{this.renderDividerView()}
<SliderView
attrData={{name: "滑块", data:'{\"step\":0.1}'}}
/>
{this.renderDividerView()}
<NumberEditView
attrData={{name: "数字输入", data:'{\"placeholder\": \"请输入\"}', uom: '小时'}}
//onChangeText={this.onChangeAmount}
/>
{this.renderDividerView()}
<NumberEditView
attrData={{name: "身份证", data:'{\"placeholder\": \"请输入\"}'}}
inputType={'default'}
//onChangeText={this.onChangeAmount}
/>
{this.renderDividerView()}
<NumberEditView
attrData={{name: "金额(元)", data:'{\"placeholder\": \"请输入\"}'}}
onChangeText={this.onChangeAmount}
/>
{this.renderDividerView()}
<CalculatorView
ref={'calculate'}
attrData={{name: "计算公式", data:'{\"placeholder\": \"test\"}'}}
editable={false}
onChangeText={this.onChangeCalculate}
/>
{this.renderDividerView()}
<TextSingleEditView
attrData={singleData}
onChangeText={(text)=>{
singleData.value = text
}}
/>
{this.renderDividerView()}
<PhoneEditView
attrData={{name: "电话", data:'{\"placeholder\": \"test\"}'}}
/>
{this.renderDividerView()}
<TextMultiEditView
attrData={{name: "多行输入", data:'{\"placeholder\": \"test\"}'}}
/>
{this.renderDividerView()}
<LocationTextView
attrData={{}}
/>
{this.renderDividerView()}
<TabDetailView
attrData={{data:'{\"placeholder\": \"test\", \"buttonText\": \"添加\"}'}}
/>
{this.renderDividerView()}
<LabelLinkView
attrData={{data:'{\"placeholder\": \"请注意填写格式\", \"hyperlink\": \"http://xiniunet.com\"}'}}
/>
{this.renderDividerView()}*/}
</ScrollView>
</View>
);
}
}