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 ( *客户姓名: *客户企业税号: 联系电话: 地址: 银行账号: 备注: 填写联系方式,向你同步电子发票信息 *客户手机号: *邮箱: ); } 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, }); }); } }; }