Toggle navigation
Toggle navigation
This project
Loading...
Sign in
罗广聪
/
ProtectGod
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
罗广聪
2017-09-29 15:54:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a36146746589cd7322abc2d89a180a89b476bb6f
a3614674
1 parent
3b6eb692
客户信息 本地双向绑定
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
18 deletions
src/pages/Customer/edit.js
src/pages/Customer/edit.js
View file @
a361467
...
...
@@ -22,6 +22,7 @@ export default class Edit extends Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
USER_ID
:
""
,
customer_id
:
""
,
name
:
""
,
age
:
""
,
...
...
@@ -30,7 +31,7 @@ export default class Edit extends Component {
is_sign
:
""
,
recommend
:
""
,
is_married
:
""
,
has_children
:
""
,
has_children
:
""
};
}
componentWillMount
()
{}
...
...
@@ -40,6 +41,7 @@ export default class Edit extends Component {
getListData
()
{
post
(
"/test/insurance/article"
,
{},
res
=>
{},
err
=>
{});
}
Alert_select
(
title
,
tips
,
statusName
,
select1
,
select2
)
{
Alert
.
alert
(
title
,
...
...
@@ -61,8 +63,12 @@ export default class Edit extends Component {
{
cancelable
:
false
}
);
}
AlertIOS_input
()
{
AlertIOS
.
prompt
(
"婚姻状态"
,
null
,
()
=>
{});
AlertIOS_input
(
title
,
statusName
)
{
AlertIOS
.
prompt
(
title
,
null
,
d
=>
{
this
.
setState
({
[
statusName
]:
d
});
});
}
submit
()
{}
delete
()
{}
...
...
@@ -71,60 +77,87 @@ export default class Edit extends Component {
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
infoContaier
}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
{
/* 填写型 */
}
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
AlertIOS_input
(
"姓名"
,
"name"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
姓名
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
周周周
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
{
this
.
state
.
name
}
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
AlertIOS_input
(
"年龄"
,
"age"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
年龄
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
18
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
{
this
.
state
.
age
}
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
AlertIOS_input
(
"手机号码"
,
"phone"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
手机号码
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
13570000000
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
{
this
.
state
.
phone
}
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
{
/* 选择型 */
}
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
Alert_select
(
"性别"
,
""
,
"sex"
,
"男"
,
"女"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
性别
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
男
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
{
this
.
state
.
sex
}
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
Alert_select
(
"客户状态"
,
""
,
"is_sign"
,
"已签单"
,
"未签单"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
客户状态
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
已签单
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
{
this
.
state
.
is_sign
}
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
...
...
@@ -134,7 +167,7 @@ export default class Edit extends Component {
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
Alert
IOS_input
(
);
this
.
Alert
_select
(
"客户来源"
,
""
,
"recommend"
,
"保护神"
,
"其他"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
...
...
@@ -153,7 +186,7 @@ export default class Edit extends Component {
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
Alert_select
(
"婚姻状态"
,
"
选一下嘛
"
,
"is_married"
,
"已婚"
,
"未婚"
);
this
.
Alert_select
(
"婚姻状态"
,
""
,
"is_married"
,
"已婚"
,
"未婚"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
...
...
@@ -169,12 +202,19 @@ export default class Edit extends Component {
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
this
.
Alert_select
(
"是否生育"
,
""
,
"has_children"
,
"是"
,
"否"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
是否生育
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
否
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
{
this
.
state
.
has_children
}
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
...
...
@@ -267,7 +307,7 @@ const styles = StyleSheet.create({
deleteBtn
:
{
marginHorizontal
:
40
,
justifyContent
:
"center"
,
alignItems
:
"center"
,
alignItems
:
"center"
},
deleteText
:
{
fontSize
:
16
,
...
...
Please
register
or
login
to post a comment