123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- import React, {Component} from 'react';
- import {
- View,
- Text,
- TextInput,
- KeyboardAvoidingView,
- ScrollView,
- Dimensions,
- TouchableOpacity,
- Image,
- } from 'react-native';
- import login_css from '../login/login_css';
- import public_css from '../../source/css/public_css';
- import {GetDataPost} from '../../data/encryption';
- import {RetrieveData} from '../../data/storage';
- import Spinner from 'react-native-loading-spinner-overlay';
- import loading_css from '../../source/css/loading_css';
- export default class customer_see extends Component {
- constructor(props) {
- super(props);
- this.companyId = this.props.route.params.companyId;
- this.state = {
- customer_name: '',
- customer_code: '',
- parent_code: '',
- ent_tax_id: '',
- short_code: '',
- email: '',
- address: '',
- contact_phone: '',
- bank_account: '',
- remark: '',
- mobile: '',
- req_channel: '',
- ip: '',
- };
- }
- render() {
- return (
- <View style={public_css.body}>
- <View style={login_css.inputView}>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text
- style={[
- public_css.text,
- {fontFamily: 'PingFang-SC-Regular', color: '#333333'},
- ]}>
- *客户姓名:
- </Text>
- <TextInput
- style={public_css.textInputStyle}
- value={this.state.customer_name}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- editable={false}
- />
- </View>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text
- style={[
- public_css.text,
- {fontFamily: 'PingFang-SC-Regular', color: '#333333'},
- ]}>
- *客户企业税号:
- </Text>
- <TextInput
- style={public_css.textInputStyle}
- value={this.state.ent_tax_id}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- editable={false}
- />
- </View>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text style={public_css.text}>联系电话:</Text>
- <TextInput
- style={public_css.textInputStyle}
- value={this.state.contact_phone}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- editable={false}
- />
- </View>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text style={public_css.text}>地址:</Text>
- <TextInput
- style={public_css.textInputStyle}
- value={this.state.address}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- editable={false}
- multiline={true}
- numberOfLines={2}
- textAlignVertical={'top'}
- />
- </View>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text style={public_css.text}>银行账号:</Text>
- <TextInput
- style={public_css.textInputStyle}
- value={this.state.bank_account}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- editable={false}
- multiline={true}
- numberOfLines={2}
- textAlignVertical={'top'}
- />
- </View>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text style={public_css.text}>备注:</Text>
- <TextInput
- style={public_css.textInputStyle}
- value={this.state.remark}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- editable={false}
- />
- </View>
- <View
- style={{
- backgroundColor: '#F6F6F6',
- width: Dimensions.get('window').width * 0.8,
- height: 40,
- alignItems: 'center',
- justifyContent: 'center',
- }}>
- <Text style={{color: '#A9A9A9', fontSize: 16}}>
- 填写联系方式,向你同步电子发票信息
- </Text>
- </View>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text style={public_css.text}>*客户手机号:</Text>
- <TextInput
- style={public_css.textInputStyle}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- value={this.state.customer_mobile}
- editable={false}
- />
- </View>
- <View style={[public_css.view, public_css.lineTopBottom]}>
- <Text style={public_css.text}>*邮箱:</Text>
- <TextInput
- style={public_css.textInputStyle}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- value={this.state.email}
- editable={false}
- />
- </View>
- </View>
- </View>
- );
- }
- componentDidMount(): void {
- this.getCompanyData();
- }
- getCompanyData = async () => {
- const res = await RetrieveData('token');
- if (res) {
- let token = res.substring(1, res.length - 1);
- const url = '/sys/customer/findById';
- GetDataPost(
- url,
- token,
- {
- customerId: this.companyId,
- },
- false,
- 2,
- ).then(res => {
- this.setState({
- customer_name: res.data.customerName,
- customer_code: res.data.customerCode,
- parent_code: res.data.parentCode,
- ent_tax_id: res.data.entTaxId,
- short_code: res.data.shortCode,
- email: res.data.email,
- address: res.data.address,
- contact_phone: res.data.contactPhone,
- bank_account: res.data.bankAccount,
- remark: res.data.remark,
- });
- });
- }
- };
- }
|