NotesDetail.js
6.23 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
/**
* Created by yzdd on 2018/3/18.
*/
import React, {Component} from 'react';
import {
View,
Text,
StyleSheet,
Image,
TextInput,
TouchableOpacity
} from 'react-native';
import {line, width} from '../../utils/publiscStyle';
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#FFFFFF"
},
headerRightBtn: {
paddingRight: 15
},
font1: {
fontSize: 18,
color: "#ffffff"
},
topView: {
width,
height: 67,
flexDirection: "row",
alignItems: "center"
},
item: {
width,
height: 67,
backgroundColor: "#FFFFFF",
flexDirection: "row",
alignItems: 'center',
paddingLeft: 15,
paddingRight: 15,
borderBottomWidth: line,
borderBottomColor: "#eeeeee"
},
icon1: {
width: 36,
height: 36,
marginRight: 15,
},
font2: {
fontSize: 17,
color: "#000000"
},
itemCon: {
flex: 1
},
icon2: {
width: 13,
height: 11,
marginLeft: 6
},
itemConTop: {
flexDirection: 'row',
alignItems: 'center'
},
font3: {
fontSize: 17,
color: "#333333"
},
font4: {
fontSize: 12,
color: "#808080"
},
infoView: {
flex: 1,
},
lineItem: {
flexDirection: 'row',
paddingLeft: 15,
paddingRight: 15,
marginTop: 17
},
leftLine: {
width: 102 - 15,
},
rightLine: {
width: width - (102 - 15) - 15,
},
font5: {
fontSize: 14,
color: "#808080"
},
font6: {
fontSize: 14,
color: "#000000"
},
icon3: {
width: 50,
height: 50,
marginRight: 20,
marginTop: 10
}
});
const bangong = require("../../assets/bangong.png");
const car = require("../../assets/car.png");
const food = require("../../assets/food.png");
const fuli = require("../../assets/fuli.png");
const other = require("../../assets/other.png");
const shangwu = require("../../assets/shangwu.png");
const zhusu = require("../../assets/zhusu.png");
const addCircle = require("../../assets/addCircle.png");
const fujian = require("../../assets/fujian.png");
const Mask = require("../../assets/Mask.png");
export default class NotesDetail extends Component {
static navigationOptions = ({navigation}) => {
return {
title: "消费明细",
headerRight:
<TouchableOpacity style={styles.headerRightBtn} onPress={() => navigation.state.params.rightClick()}>
<Text style={styles.font1}>编辑</Text>
</TouchableOpacity>
}
};
componentDidMount() {
this.props.navigation.setParams({
rightClick: () => this.rightClick()
})
}
rightClick = () => {
const {navigate} = this.props.navigation;
navigate("AddNote", {type: "edit"});
};
render() {
return (
<View style={styles.container}>
<View style={styles.item}>
<Image
resizeMode={"contain"}
source={car}
style={styles.icon1}
/>
<View style={styles.itemCon}>
<View style={styles.itemConTop}>
<Text style={styles.font3}>餐饮</Text>
{
false &&
<Image
source={fujian}
resizeMode={"contain"}
style={styles.icon2}
/>
}
</View>
<Text style={styles.font4} numberOfLines={1}>差旅费-餐饮-产品&项目&研发</Text>
</View>
<Text style={styles.font2}>20.00</Text>
</View>
<View style={styles.infoView}>
<View style={styles.lineItem}>
<View style={styles.leftLine}>
<Text style={styles.font5}>经营单元</Text>
</View>
<View style={styles.rightLine}>
<Text style={styles.font6}>苏州企新动信息技术有限公司</Text>
</View>
</View>
<View style={styles.lineItem}>
<View style={styles.leftLine}>
<Text style={styles.font5}>日期</Text>
</View>
<View style={styles.rightLine}>
<Text style={styles.font6}>2017-09-09 12:34</Text>
</View>
</View>
<View style={styles.lineItem}>
<View style={styles.leftLine}>
<Text style={styles.font5}>备注信息</Text>
</View>
<View style={styles.rightLine}>
<Text style={[styles.font6, {lineHeight: 16}]}>每消费10.00元,赠送1积分</Text>
<Text style={[styles.font6, {lineHeight: 16}]}>每使用1积分,抵扣1.00元</Text>
<Text style={[styles.font6, {lineHeight: 16}]}>会员可享受免费品尝新品机会</Text>
</View>
</View>
<View style={styles.lineItem}>
<View style={styles.leftLine}>
<Text style={styles.font5}>所属项目</Text>
</View>
<View style={styles.rightLine}>
<Text style={styles.font6}>国发app</Text>
</View>
</View>
<View style={styles.lineItem}>
<View style={styles.leftLine}>
<Text style={styles.font5}>商家名称</Text>
</View>
<View style={styles.rightLine}>
<Text style={styles.font6}>杨过生煎</Text>
</View>
</View>
<View style={styles.lineItem}>
<View style={styles.leftLine}>
<Text style={styles.font5}>税率</Text>
</View>
<View style={styles.rightLine}>
<Text style={styles.font6}>0.3</Text>
</View>
</View>
<View style={styles.lineItem}>
<View style={styles.leftLine}>
<Text style={styles.font5}>附件</Text>
</View>
<View style={[styles.rightLine, {flexDirection: "row", flexWrap: "wrap"}]}>
<Image
source={Mask}
resizeMode={"contain"}
style={styles.icon3}
/>
<Image
source={Mask}
resizeMode={"contain"}
style={styles.icon3}
/>
<Image
source={Mask}
resizeMode={"contain"}
style={styles.icon3}
/>
</View>
</View>
</View>
</View>
);
}
}