提交 9a2f6ff4 authored 作者: 吴强's avatar 吴强

1、人口信息界面,点击“新增人口”读取身份证,保存以后,性别和户籍地址字段自动消失了,没有保存,已更新

2、已经存储过该人口的身份证相关信息做一个提示框,人口信息已存在 3、人口信息界面编辑按钮去除。 4、所有的界面一行如果数据超过一定字符,显示不全,建议全部信息显示完全(做自动换行,或有下拉选项再显示完全字段信息)便于核实和查验信息。
上级 a5c14b5c
...@@ -71,8 +71,12 @@ export default { ...@@ -71,8 +71,12 @@ export default {
datasourceName: 'QueryRKDetails', datasourceName: 'QueryRKDetails',
}; };
const api = datasourceApi(coordinate); const api = datasourceApi(coordinate);
yield call(api.create, payload); const result = yield call(api.create, payload);
Toast.success('新增成功!', 0.5); if (result === null) {
Toast.fail('信息重复!', 2);
} else {
Toast.success('录入成功!', 1);
}
yield put(NavigationActions.navigate({ yield put(NavigationActions.navigate({
routeName: 'peopleInfoList', routeName: 'peopleInfoList',
})); }));
...@@ -134,8 +138,8 @@ export default { ...@@ -134,8 +138,8 @@ export default {
if (result) { if (result) {
yield put({ type: 'setdetailData', payload: result }); yield put({ type: 'setdetailData', payload: result });
} }
Toast.loading('读卡完成', 5); Toast.loading('读卡完成...', 2);
} finally { } catch (e) {
Toast.loading('读卡失败', 10); Toast.loading('读卡失败', 10);
} }
// //
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import React from 'react'; import React from 'react';
import { createForm } from 'rc-form'; import { createForm } from 'rc-form';
import { View, ScrollView } from 'react-native'; import { View, ScrollView } from 'react-native';
import { List, InputItem, Toast, WhiteSpace, WingBlank } from 'antd-mobile'; import { List, InputItem, Toast, WhiteSpace, WingBlank, TextareaItem } from 'antd-mobile';
import Icon from 'react-native-vector-icons/FontAwesome'; import Icon from 'react-native-vector-icons/FontAwesome';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { createAction } from '../../../utils'; import { createAction } from '../../../utils';
...@@ -137,6 +137,7 @@ class DSRInfoDetailScreen extends React.Component { ...@@ -137,6 +137,7 @@ class DSRInfoDetailScreen extends React.Component {
<List.Item <List.Item
key={m.key} key={m.key}
extra={singularData[m.key]} extra={singularData[m.key]}
wrap
> >
{m.label} {m.label}
</List.Item> </List.Item>
......
...@@ -24,6 +24,7 @@ class HouseDetail extends Component { ...@@ -24,6 +24,7 @@ class HouseDetail extends Component {
<List.Item <List.Item
key={key} key={key}
extra={data} extra={data}
wrap
> >
{label} {label}
</List.Item> </List.Item>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import React from 'react'; import React from 'react';
import { createForm } from 'rc-form'; import { createForm } from 'rc-form';
import { View, ScrollView } from 'react-native'; import { View, ScrollView } from 'react-native';
import { List, InputItem, WhiteSpace } from 'antd-mobile'; import { List, InputItem, WhiteSpace, Toast } from 'antd-mobile';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Icon from 'react-native-vector-icons/FontAwesome'; import Icon from 'react-native-vector-icons/FontAwesome';
import { createAction } from '../../../utils'; import { createAction } from '../../../utils';
...@@ -20,7 +20,7 @@ class AddPeopleInfo extends React.Component { ...@@ -20,7 +20,7 @@ class AddPeopleInfo extends React.Component {
if (!error) { if (!error) {
this.props.dispatch(createAction('peopleInfo/savePeopleInfo')(value)); this.props.dispatch(createAction('peopleInfo/savePeopleInfo')(value));
} else { } else {
console.log('Validation failed'); Toast.fail('信息录入有误', 1);
} }
}); });
}; };
...@@ -59,6 +59,7 @@ class AddPeopleInfo extends React.Component { ...@@ -59,6 +59,7 @@ class AddPeopleInfo extends React.Component {
if (m.required === true) { if (m.required === true) {
return ( return (
<InputItem <InputItem
key={m.key}
{...getFieldProps(m.key, { {...getFieldProps(m.key, {
initialValue: detailData[m.key], initialValue: detailData[m.key],
rules: [ rules: [
...@@ -66,6 +67,7 @@ class AddPeopleInfo extends React.Component { ...@@ -66,6 +67,7 @@ class AddPeopleInfo extends React.Component {
{ validator: this.validateNoNull }, { validator: this.validateNoNull },
], ],
})} })}
editable={false}
clear clear
placeholder="请输入" placeholder="请输入"
ref={(el) => { ref={(el) => {
...@@ -78,10 +80,12 @@ class AddPeopleInfo extends React.Component { ...@@ -78,10 +80,12 @@ class AddPeopleInfo extends React.Component {
} else { } else {
return ( return (
<InputItem <InputItem
key={m.key}
{...getFieldProps(m.key, { {...getFieldProps(m.key, {
initialValue: detailData[m.key], initialValue: detailData[m.key],
})} })}
clear clear
editable={false}
placeholder="请输入" placeholder="请输入"
ref={(el) => { ref={(el) => {
this.customFocusInst = el; this.customFocusInst = el;
...@@ -94,7 +98,7 @@ class AddPeopleInfo extends React.Component { ...@@ -94,7 +98,7 @@ class AddPeopleInfo extends React.Component {
})} })}
{[1].map(() => { {[1].map(() => {
return ( return (
<List.Item> <List.Item key="saveItem">
<View style={{ flexDirection: 'row', justifyContent: 'center' }}> <View style={{ flexDirection: 'row', justifyContent: 'center' }}>
<Icon.Button <Icon.Button
name="save" name="save"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import React from 'react'; import React from 'react';
import { createForm } from 'rc-form'; import { createForm } from 'rc-form';
import { View, ScrollView } from 'react-native'; import { View, ScrollView } from 'react-native';
import { List, InputItem, WhiteSpace } from 'antd-mobile'; import { List, InputItem, WhiteSpace, TextareaItem } from 'antd-mobile';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Icon from 'react-native-vector-icons/FontAwesome'; import Icon from 'react-native-vector-icons/FontAwesome';
import { createAction } from '../../../utils'; import { createAction } from '../../../utils';
......
...@@ -26,13 +26,13 @@ class PeopleDetailInfo extends React.Component { ...@@ -26,13 +26,13 @@ class PeopleDetailInfo extends React.Component {
<WhiteSpace /> <WhiteSpace />
<WingBlank> <WingBlank>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<Icon.Button {/* <Icon.Button
name="edit" name="edit"
backgroundColor="#08BBF9" backgroundColor="#08BBF9"
onPress={this.onEdit} onPress={this.onEdit}
> >
编辑 编辑
</Icon.Button> </Icon.Button> */}
</View> </View>
<WhiteSpace /> <WhiteSpace />
<List> <List>
...@@ -42,6 +42,7 @@ class PeopleDetailInfo extends React.Component { ...@@ -42,6 +42,7 @@ class PeopleDetailInfo extends React.Component {
<List.Item <List.Item
key={m.key} key={m.key}
extra={detailData[m.key]} extra={detailData[m.key]}
wrap
> >
{m.label} {m.label}
</List.Item> </List.Item>
......
...@@ -30,8 +30,8 @@ const config = { ...@@ -30,8 +30,8 @@ const config = {
productId: 'manager-app-sz', productId: 'manager-app-sz',
footerText: '上海铂蓝信息科技有限公司', footerText: '上海铂蓝信息科技有限公司',
contextPath: '', contextPath: '',
// apiContextPath: 'http://14.21.68.149:9089/test', apiContextPath: 'http://14.21.68.149:9089/test',
apiContextPath: 'http://192.168.1.22:8080/bm', // apiContextPath: 'http://192.168.1.22:8080/bm',
defaultDateFormat, defaultDateFormat,
defaultTimeFormat, defaultTimeFormat,
defaultDateTimeFormat, defaultDateTimeFormat,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论