SelectAdd.js
3.83 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
/**
* Created by DEV005 on 2017/11/13.
*/
/**
* Created by tdzl2003 on 12/18/16.
*/
import React, {Component} from "react";
import {
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
Image,
NativeModules
} from "react-native";
import { NavigationActions } from 'react-navigation'
import { observable, useStrict, action } from 'mobx';
import { observer } from 'mobx-react';
import {xnToast,getHeaderHeight,getHeaderPadding,getFooterBottom,xnBorderWidth} from "../utils/utils";
import AppService from "../service/AppService";
import EmployeeList from './public/EmployeeList';
export default class Employee extends Component {
static navigationOptions = ({ navigation, screenProps })=>({
title:"加签",
});
constructor(props){
super(props);
this.state = {
tenantId:global.tenantId,
tenantName:global.tenantName
};
}
params=this.props.navigation.state.params;
componentDidMount(){
let _this=this;
//设置头部
this.props.navigation.setParams({
isBack:true
});
}
render() {
return (
<View style={styles.body}>
<View style={styles.rowLayout}>
<TouchableOpacity style={styles.row} onPress={()=>{this.select("beforeAdd")}}>
<View style={styles.rowContent}>
<Text style={styles.rowTitleText}>前加签</Text>
<Text style={styles.rowInfoText}>在自己之前再添加一个或几个审批人</Text>
</View>
<View style={styles.rowLink}></View>
</TouchableOpacity>
<TouchableOpacity style={styles.row} onPress={()=>{this.select("sideAdd")}}>
<View style={styles.rowContent}>
<Text style={styles.rowTitleText}>并加签</Text>
<Text style={styles.rowInfoText}>同时再添加一个或几个审批人</Text>
</View>
<View style={styles.rowLink}></View>
</TouchableOpacity>
<TouchableOpacity style={styles.row} onPress={()=>{this.select("afterAdd")}}>
<View style={styles.rowContent}>
<Text style={styles.rowTitleText}>后加签</Text>
<Text style={styles.rowInfoText}>在自己之后再添加一个或几个审批人</Text>
</View>
<View style={styles.rowLink}></View>
</TouchableOpacity>
</View>
</View>
);
}
select=(data)=>{
let _this=this;
//转交
this.props.navigation.navigate('AddComment',{status:data,flowId:_this.params.flowId,id:_this.params.id,rowVersion:_this.params.rowVersion})
}
}
const styles = StyleSheet.create({
body:{
flex:1,
flexDirection:"column",
backgroundColor:"#ecf0f3",
},
rowLayout:{
marginTop:15,
backgroundColor:"#fff",
},
row:{
marginLeft:15,
paddingTop:10,
paddingRight:10,
paddingBottom:10,
borderBottomWidth:xnBorderWidth(),
borderBottomColor:"#ddd",
borderStyle:"solid",
flexDirection:"row",
alignItems:"center",
},
rowContent:{
flex:1,
justifyContent:"center",
},
rowTitleText:{
fontSize:16,
color:"#000"
},
rowInfoText:{
fontSize:12,
color:"#666"
},
rowLink:{
width:10,
height:10,
borderTopWidth:1,
borderTopColor:"#c7c7cc",
borderRightWidth:1,
borderRightColor:"#c7c7cc",
transform:[
{rotate:'45deg'},
],
}
});