123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- 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 enterprise_see extends Component {
- constructor(props) {
- super(props);
- this.ent = this.props.route.params.enterprise;
- 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 (
- <ScrollView>
- <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.ent.entTaxId}
- 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.ent.entName}
- 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.ent.entAddress}
- 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.ent.entContactPerson}
- 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.ent.entLegelPerson}
- 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.ent.entTaxOfficeCode}
- 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}
- clearButtonMode="while-editing"
- secureTextEntry={false}
- value={this.ent.entPhone}
- 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.ent.serviceStatus == 1
- ? '待初始化'
- : this.ent.serviceStatus == 2
- ? '初始化成功'
- : this.ent.serviceStatus == 3
- ? '服务状态有效'
- : this.ent.serviceStatus == 4
- ? '欠费'
- : ''
- }
- editable={false}
- />
- </View>
- </View>
- </View>
- </ScrollView>
- );
- }
- 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,
- });
- });
- }
- };
- }
|