import React, { Component } from 'react'; import { connect } from 'react-redux'; import DocumentTitle from 'react-document-title'; import 'antd-mobile/dist/antd-mobile.less'; import styles from './index.less'; import router from 'umi/router'; @connect(({ transfer }) => ({ transfer })) class Index extends Component { constructor(props) { super(props); this.state = {}; } componentWillMount = () => { const { birthCerRegCode, identificationFlag } = this.props.location.query; if (birthCerRegCode && identificationFlag) { this.props.dispatch({ type: 'transfer/updateState', payload: { birthCerRegCode, identificationFlag, }, }); this.props.dispatch({ type: 'transfer/detail', payload: {}, }); } }; componentDidMount = () => {}; componentWillUnmount = () => { this.props.dispatch({ type: 'transfer/clean', }); }; onChangeText = type => e => { this.props.dispatch({ type: 'transfer/updateState', payload: { [type]: e.target.value, }, }); }; inputOnBlur = () => { const { birthCerRegCode, identificationFlag } = this.props.transfer; if (birthCerRegCode && identificationFlag) { this.props.dispatch({ type: 'transfer/detail', payload: {}, }); } }; render() { const { birthCerRegCode, identificationFlag, dogEnName, dogBreedCnName, colorFlagName, dogGender, dogBirthday, breeder, dogOwenr, snCode, } = this.props.transfer; return (
登记卡编号
芯片号码
{dogEnName ? (
犬只名称
) : null} {dogBreedCnName ? (
犬只品种
) : null} {colorFlagName ? (
毛色
) : null} {dogGender ? (
犬只性别
) : null} {dogBirthday ? (
出生日期
) : null} {breeder ? (
繁殖人
) : null} {dogOwenr ? (
犬主人
) : null} {dogEnName ? (
识别号码
) : null}
{ this.props.dispatch({ type: 'transfer/transfer', payload: {}, }); }} > 确认登记
); } } export default Index;