invoice.js 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453
  1. import React, {Component} from 'react';
  2. import {
  3. View,
  4. Text,
  5. TouchableOpacity,
  6. StyleSheet,
  7. Dimensions,
  8. FlatList,
  9. PixelRatio,
  10. DeviceEventEmitter,
  11. Image,
  12. TextInput,
  13. SafeAreaView,
  14. ScrollView,
  15. Alert,
  16. TouchableWithoutFeedback,
  17. } from 'react-native';
  18. import {
  19. List,
  20. SwipeAction,
  21. Radio,
  22. Picker,
  23. Provider,
  24. InputItem,
  25. WhiteSpace,
  26. WingBlank,
  27. Tag,
  28. } from '@ant-design/react-native';
  29. import public_css from '../../source/css/public_css';
  30. import {NumberTwoDecimal, RoundingData} from '../../source/inspect/inspect';
  31. import invoice_css from './invoice_css';
  32. import {SvgXml} from 'react-native-svg';
  33. import {ToastShow} from '../../components/toast/toast';
  34. import {
  35. downArrowIcon,
  36. plusIcon,
  37. enterpriseIcon,
  38. upArrowIcon,
  39. } from '../../source/icon/icon';
  40. import {RetrieveData} from '../../data/storage';
  41. import {RequestNetwork} from '../../data/encryption';
  42. import {CleanAll} from '../../components/abnormalMessage/abnormal_message';
  43. export default class invoice extends Component {
  44. constructor(props) {
  45. super(props);
  46. this.props.navigation.dangerouslyGetParent().setOptions({
  47. tabBarVisible: false,
  48. });
  49. this.state = {
  50. listData: [],
  51. productNumberTotal: 0,
  52. amountTotal: 0.0,
  53. taxAmount: 0.0,
  54. taxRateTotal: 0.0,
  55. productAmountTotal: 0.0,
  56. companyTypes: [
  57. {
  58. label: '个人',
  59. value: '1',
  60. },
  61. {
  62. label: '企业',
  63. value: '2',
  64. },
  65. ],
  66. companyType: '1',
  67. invoiceTypes: [
  68. {
  69. label: '增值税普通电子发票',
  70. value: '1',
  71. },
  72. {
  73. label: '增值税电子专用发票',
  74. value: '2',
  75. },
  76. ],
  77. invoiceType: '1',
  78. customerName: '',
  79. taxNumber: '',
  80. contactNumber: '',
  81. address: '',
  82. bank: '',
  83. bankAccount: '',
  84. payee: '',
  85. reviewer: '',
  86. drawer: '',
  87. remark: '',
  88. hideStatusText: '更多',
  89. hideStatus: false,
  90. categoryBack: 'rgba(42,103,254, 1)',
  91. categoryBackFont: '#ffffff',
  92. categoryBackCompany: 'rgba(42,103,254, 0.07)',
  93. categoryBackCompanyFont: '#2A67FE',
  94. typeBack: 'rgba(42,103,254, 1)',
  95. typeBackFont: '#ffffff',
  96. typeBackMajor: 'rgba(42,103,254, 0.07)',
  97. typeBackMajorFont: '#2A67FE',
  98. receiveType: 1,
  99. receiveAddress: '',
  100. receiveBack: 'rgba(42,103,254, 1)',
  101. receiveBackFont: '#ffffff',
  102. receiveBackCompany: 'rgba(42,103,254, 0.07)',
  103. receiveBackCompanyFont: '#2A67FE',
  104. isShowSearch: false,
  105. headList: [],
  106. timer: '',
  107. };
  108. }
  109. render() {
  110. return (
  111. <SafeAreaView style={public_css.body}>
  112. <ScrollView>
  113. <TouchableWithoutFeedback
  114. onPress={() => {
  115. this.isHideHead();
  116. }}>
  117. <View>
  118. <View style={{flexDirection: 'row', justifyContent: 'flex-start'}}>
  119. <View>
  120. <TouchableOpacity
  121. onPress={() => {
  122. this.getInvoiceCategory('1');
  123. }}
  124. style={{
  125. alignItems: 'center',
  126. justifyContent: 'center',
  127. backgroundColor: this.state.categoryBack,
  128. width: 90,
  129. height: 40,
  130. borderRadius: 39,
  131. margin: 10,
  132. }}>
  133. <Text
  134. style={{
  135. color: this.state.categoryBackFont,
  136. fontWeight: 'bold',
  137. fontSize: 16,
  138. }}>
  139. 个人
  140. </Text>
  141. </TouchableOpacity>
  142. </View>
  143. <View>
  144. <TouchableOpacity
  145. onPress={() => {
  146. this.getInvoiceCategory('2');
  147. }}
  148. style={{
  149. alignItems: 'center',
  150. justifyContent: 'center',
  151. backgroundColor: this.state.categoryBackCompany,
  152. width: 90,
  153. height: 40,
  154. borderRadius: 39,
  155. margin: 10,
  156. }}>
  157. <Text
  158. style={{
  159. color: this.state.categoryBackCompanyFont,
  160. fontWeight: 'bold',
  161. fontSize: 16,
  162. }}>
  163. 企业
  164. </Text>
  165. </TouchableOpacity>
  166. </View>
  167. </View>
  168. <View
  169. style={{
  170. backgroundColor: '#F7F7F7',
  171. height: 40,
  172. justifyContent: 'center',
  173. marginLeft: 10,
  174. }}>
  175. <Text style={{color: '#888888', fontSize: 18}}>发票类型</Text>
  176. </View>
  177. <View style={{flexDirection: 'row', justifyContent: 'center'}}>
  178. <View>
  179. <TouchableOpacity
  180. onPress={() => {
  181. this.getInvoiceType('1');
  182. }}
  183. style={{
  184. alignItems: 'center',
  185. justifyContent: 'center',
  186. backgroundColor: this.state.typeBack,
  187. width: 160,
  188. height: 40,
  189. borderRadius: 39,
  190. margin: 10,
  191. }}>
  192. <Text
  193. style={{
  194. color: this.state.typeBackFont,
  195. fontWeight: 'bold',
  196. fontSize: 16,
  197. }}>
  198. 增值税电子普通发票
  199. </Text>
  200. </TouchableOpacity>
  201. </View>
  202. <View>
  203. <TouchableOpacity
  204. onPress={() => {
  205. this.getInvoiceType('2');
  206. }}
  207. style={{
  208. alignItems: 'center',
  209. justifyContent: 'center',
  210. backgroundColor: this.state.typeBackMajor,
  211. width: 160,
  212. height: 40,
  213. borderRadius: 39,
  214. margin: 10,
  215. }}>
  216. <Text
  217. style={{
  218. color: this.state.typeBackMajorFont,
  219. fontWeight: 'bold',
  220. fontSize: 16,
  221. }}>
  222. 增值税电子专用发票
  223. </Text>
  224. </TouchableOpacity>
  225. </View>
  226. </View>
  227. <View
  228. style={{
  229. backgroundColor: '#F7F7F7',
  230. height: 40,
  231. justifyContent: 'center',
  232. marginLeft: 10,
  233. }}>
  234. <Text style={{color: '#888888', fontSize: 18}}>发票信息</Text>
  235. </View>
  236. <List>
  237. <WingBlank>
  238. <View style={[public_css.view, {position: 'relative'}]}>
  239. <View style={[public_css.view, {flex: 1}]}>
  240. <View style={{flexDirection: 'row', alignItems: 'center'}}>
  241. <Text style={{color: 'red', marginRight: 5}}>*</Text>
  242. <Text style={{fontSize: 16}}>企业名称:</Text>
  243. </View>
  244. <TextInput
  245. style={public_css.textInputStyle}
  246. placeholder="请输入客户名称"
  247. clearButtonMode="while-editing"
  248. secureTextEntry={false}
  249. onChangeText={(text) => {
  250. if (text) {
  251. this.setState({
  252. customerName: text,
  253. });
  254. } else {
  255. this.setState({
  256. customerName: text,
  257. isShowSearch: false,
  258. });
  259. }
  260. this.setSearchCustomerName(text);
  261. }}
  262. value={this.state.customerName}
  263. // onBlur={() => {
  264. // this.setSearchCustomerName('');
  265. // }}
  266. // blurOnSubmit={true}
  267. />
  268. </View>
  269. <View style={{}}>
  270. <TouchableOpacity
  271. onPress={() =>
  272. this.props.navigation.navigate(
  273. 'invoice_select_customer',
  274. {
  275. customer: this,
  276. selectCustomer: (data) => {
  277. this.selectCustomer(data);
  278. },
  279. },
  280. )
  281. }
  282. style={{width: 30, alignItems: 'center'}}>
  283. <Text style={public_css.arrow}>{'>'}</Text>
  284. </TouchableOpacity>
  285. </View>
  286. </View>
  287. {this.state.isShowSearch === true ? (
  288. <View
  289. style={{
  290. height: 500,
  291. // width: Dimensions.get('window').width * 0.7,
  292. // top: 50,
  293. // left: 90,
  294. // elevation: 20,
  295. // shadowOffset: {width: 0, height: 0},
  296. // shadowColor: '#99b4b4b4',
  297. // shadowOpacity: 1,
  298. // shadowRadius: 5,
  299. // flex: 1,
  300. }}>
  301. <View style={{flex: 1}}>
  302. {this.state.headList.map((item, index) => {
  303. if (index < 10) {
  304. return (
  305. <TouchableOpacity
  306. onPress={() => {
  307. this.getHeadInfo(item);
  308. }}
  309. style={{
  310. height: 30,
  311. margin: 10,
  312. justifyContent: 'center',
  313. }}>
  314. <Text
  315. style={{
  316. fontSize: 15,
  317. color: '#000000',
  318. }}>
  319. {item.customerName}
  320. </Text>
  321. <Text style={{color: 'rgba(74, 74, 74, 0.6)'}}>{item.entTaxId}</Text>
  322. </TouchableOpacity>
  323. );
  324. }
  325. })}
  326. </View>
  327. </View>
  328. ) : (
  329. <View />
  330. )}
  331. </WingBlank>
  332. {this.state.isShowSearch === false ? (
  333. <View>
  334. {this.state.companyType === '2' ? (
  335. <WingBlank>
  336. <View style={[public_css.view, public_css.lineTopBottom]}>
  337. <View
  338. style={{flexDirection: 'row', alignItems: 'center'}}>
  339. <Text style={{color: 'red', marginRight: 5}}>*</Text>
  340. <Text style={{fontSize: 16}}>企业税号:</Text>
  341. </View>
  342. <TextInput
  343. style={public_css.textInputStyle}
  344. placeholder="请输入客户企业税号"
  345. clearButtonMode="while-editing"
  346. secureTextEntry={false}
  347. onChangeText={(text) => {
  348. this.setState({
  349. taxNumber: text,
  350. });
  351. }}
  352. value={this.state.taxNumber}
  353. />
  354. </View>
  355. </WingBlank>
  356. ) : (
  357. <WingBlank>
  358. <View style={[public_css.view, public_css.lineTopBottom]}>
  359. <View
  360. style={{flexDirection: 'row', alignItems: 'center'}}>
  361. <Text style={{color: 'red', marginRight: 10}} />
  362. <Text style={{fontSize: 16}}>企业税号:</Text>
  363. </View>
  364. <TextInput
  365. style={public_css.textInputStyle}
  366. placeholder="请输入客户企业税号"
  367. clearButtonMode="while-editing"
  368. secureTextEntry={false}
  369. onChangeText={(text) => {
  370. this.setState({
  371. taxNumber: text,
  372. });
  373. }}
  374. value={this.state.taxNumber}
  375. />
  376. </View>
  377. </WingBlank>
  378. )}
  379. <WingBlank>
  380. {this.state.hideStatus === true ? (
  381. <View style={[public_css.view, public_css.lineTopBottom]}>
  382. <View
  383. style={{flexDirection: 'row', alignItems: 'center'}}>
  384. <Text style={{fontSize: 16}}>地址:</Text>
  385. </View>
  386. <TextInput
  387. style={public_css.textInputStyle}
  388. placeholder="请输入地址"
  389. clearButtonMode="while-editing"
  390. secureTextEntry={false}
  391. onChangeText={(text) => {
  392. this.setState({
  393. address: text,
  394. });
  395. }}
  396. value={this.state.address}
  397. />
  398. </View>
  399. ) : (
  400. <View />
  401. )}
  402. </WingBlank>
  403. <WingBlank>
  404. {this.state.hideStatus === true ? (
  405. <View style={[public_css.view, public_css.lineTopBottom]}>
  406. <View
  407. style={{flexDirection: 'row', alignItems: 'center'}}>
  408. <Text style={{fontSize: 16}}>联系电话:</Text>
  409. </View>
  410. <TextInput
  411. style={public_css.textInputStyle}
  412. placeholder="请输入联系电话"
  413. clearButtonMode="while-editing"
  414. secureTextEntry={false}
  415. onChangeText={(text) => {
  416. this.setState({
  417. contactNumber: text,
  418. });
  419. }}
  420. value={this.state.contactNumber}
  421. />
  422. </View>
  423. ) : (
  424. <View />
  425. )}
  426. </WingBlank>
  427. <WingBlank>
  428. {this.state.hideStatus === true ? (
  429. <View style={[public_css.view, public_css.lineTopBottom]}>
  430. <View
  431. style={{flexDirection: 'row', alignItems: 'center'}}>
  432. <Text style={{fontSize: 16}}>开户银行:</Text>
  433. </View>
  434. <TextInput
  435. style={public_css.textInputStyle}
  436. placeholder="请输入开户银行"
  437. clearButtonMode="while-editing"
  438. secureTextEntry={false}
  439. onChangeText={(text) => {
  440. this.setState({
  441. bank: text,
  442. });
  443. }}
  444. value={this.state.bank}
  445. />
  446. </View>
  447. ) : (
  448. <View />
  449. )}
  450. </WingBlank>
  451. <WingBlank>
  452. {this.state.hideStatus === true ? (
  453. <View style={[public_css.view, public_css.lineTopBottom]}>
  454. <View
  455. style={{flexDirection: 'row', alignItems: 'center'}}>
  456. <Text style={{fontSize: 16}}>银行账号:</Text>
  457. </View>
  458. <TextInput
  459. style={public_css.textInputStyle}
  460. placeholder="请输入银行账号"
  461. clearButtonMode="while-editing"
  462. secureTextEntry={false}
  463. onChangeText={(text) => {
  464. this.setState({
  465. bankAccount: text,
  466. });
  467. }}
  468. value={this.state.bankAccount}
  469. />
  470. </View>
  471. ) : (
  472. <View />
  473. )}
  474. </WingBlank>
  475. <WingBlank>
  476. <View
  477. style={[
  478. public_css.view,
  479. public_css.lineTopBottom,
  480. {alignItems: 'center'},
  481. ]}>
  482. <View
  483. style={{flexDirection: 'row', alignItems: 'center'}}>
  484. <Text style={{color: 'red', marginRight: 5}}>*</Text>
  485. <Text style={{fontSize: 16}}>收款人:</Text>
  486. </View>
  487. <TextInput
  488. style={public_css.textInputStyle}
  489. placeholder="请输入收款人"
  490. clearButtonMode="while-editing"
  491. secureTextEntry={false}
  492. value={this.state.payee}
  493. editable={false}
  494. />
  495. <View style={{marginRight: 20}}>
  496. <TouchableOpacity
  497. style={{
  498. width: 30,
  499. height: 30,
  500. justifyContent: 'center',
  501. alignItems: 'center',
  502. }}
  503. onPress={() => {
  504. this.props.navigation.navigate('select_user', {
  505. type: 1,
  506. getUserInfo: (type, name) => {
  507. this.getUserInfo(type, name);
  508. },
  509. });
  510. }}>
  511. <Image
  512. source={require('../../source/img/productImg/addIcon.png')}
  513. style={{height: 16, width: 16}}
  514. />
  515. </TouchableOpacity>
  516. </View>
  517. </View>
  518. </WingBlank>
  519. <WingBlank>
  520. <View
  521. style={[
  522. public_css.view,
  523. public_css.lineTopBottom,
  524. {alignItems: 'center'},
  525. ]}>
  526. <View
  527. style={{flexDirection: 'row', alignItems: 'center'}}>
  528. <Text style={{color: 'red', marginRight: 5}}>*</Text>
  529. <Text style={{fontSize: 16}}>审核人:</Text>
  530. </View>
  531. <TextInput
  532. style={public_css.textInputStyle}
  533. placeholder="请输入审核人"
  534. clearButtonMode="while-editing"
  535. secureTextEntry={false}
  536. value={this.state.reviewer}
  537. editable={false}
  538. />
  539. <View style={{marginRight: 20}}>
  540. <TouchableOpacity
  541. style={{
  542. width: 30,
  543. height: 30,
  544. justifyContent: 'center',
  545. alignItems: 'center',
  546. }}
  547. onPress={() => {
  548. this.props.navigation.navigate('select_user', {
  549. type: 2,
  550. getUserInfo: (type, name) => {
  551. this.getUserInfo(type, name);
  552. },
  553. });
  554. }}>
  555. <Image
  556. source={require('../../source/img/productImg/addIcon.png')}
  557. style={{height: 16, width: 16}}
  558. />
  559. </TouchableOpacity>
  560. </View>
  561. </View>
  562. </WingBlank>
  563. <WingBlank>
  564. <View
  565. style={[
  566. public_css.view,
  567. public_css.lineTopBottom,
  568. {alignItems: 'center'},
  569. ]}>
  570. <View
  571. style={{flexDirection: 'row', alignItems: 'center'}}>
  572. <Text style={{color: 'red', marginRight: 5}}>*</Text>
  573. <Text style={{fontSize: 16}}>开票人:</Text>
  574. </View>
  575. <TextInput
  576. style={public_css.textInputStyle}
  577. placeholder="请输入开票人"
  578. clearButtonMode="while-editing"
  579. secureTextEntry={false}
  580. value={this.state.drawer}
  581. editable={false}
  582. />
  583. <View style={{marginRight: 20}}>
  584. <TouchableOpacity
  585. style={{
  586. width: 30,
  587. height: 30,
  588. justifyContent: 'center',
  589. alignItems: 'center',
  590. }}
  591. onPress={() => {
  592. this.props.navigation.navigate('select_user', {
  593. type: 3,
  594. getUserInfo: (type, name) => {
  595. this.getUserInfo(type, name);
  596. },
  597. });
  598. }}>
  599. <Image
  600. source={require('../../source/img/productImg/addIcon.png')}
  601. style={{height: 16, width: 16}}
  602. />
  603. </TouchableOpacity>
  604. </View>
  605. </View>
  606. </WingBlank>
  607. <WingBlank>
  608. {this.state.hideStatus === true ? (
  609. <View style={[public_css.view, public_css.lineTopBottom]}>
  610. <View
  611. style={{flexDirection: 'row', alignItems: 'center'}}>
  612. <Text style={{fontSize: 16}}>备注:</Text>
  613. </View>
  614. <TextInput
  615. style={public_css.textInputStyle}
  616. placeholder="请输入备注信息"
  617. clearButtonMode="while-editing"
  618. secureTextEntry={false}
  619. onChangeText={(text) => {
  620. this.setState({
  621. remark: text,
  622. });
  623. }}
  624. />
  625. </View>
  626. ) : (
  627. <View />
  628. )}
  629. <View style={[public_css.view, {justifyContent: 'center'}]}>
  630. <TouchableOpacity
  631. style={{
  632. width: 120,
  633. height: 30,
  634. backgroundColor: '#F8F8F8',
  635. opacity: 1,
  636. borderRadius: 99,
  637. flexDirection: 'row',
  638. justifyContent: 'center',
  639. alignItems: 'center',
  640. }}
  641. onPress={() => this.hideChange()}>
  642. {this.state.hideStatus === false ? (
  643. <View
  644. style={{flexDirection: 'row', alignItems: 'center'}}>
  645. <Text style={{color: '#B6B6BA', fontSize: 16}}>
  646. {this.state.hideStatusText}
  647. </Text>
  648. <SvgXml style={{marginLeft: 5}} xml={downArrowIcon()} />
  649. </View>
  650. ) : (
  651. <View
  652. style={{flexDirection: 'row', alignItems: 'center'}}>
  653. <Text style={{color: '#B6B6BA', fontSize: 16}}>
  654. {this.state.hideStatusText}
  655. </Text>
  656. <SvgXml style={{marginLeft: 5}} xml={upArrowIcon()} />
  657. </View>
  658. )}
  659. </TouchableOpacity>
  660. </View>
  661. </WingBlank>
  662. <View
  663. style={{
  664. backgroundColor: '#F7F7F7',
  665. height: 40,
  666. justifyContent: 'center',
  667. marginLeft: 10,
  668. }}>
  669. <Text style={{color: '#888888', fontSize: 18}}>
  670. 接收方式
  671. </Text>
  672. </View>
  673. <WingBlank>
  674. <View
  675. style={{
  676. flexDirection: 'row',
  677. justifyContent: 'flex-start',
  678. borderBottomWidth: 1,
  679. borderColor: 'rgb(208,208,208)',
  680. }}>
  681. <View>
  682. <TouchableOpacity
  683. onPress={() => {
  684. this.getReceive(1);
  685. }}
  686. style={{
  687. alignItems: 'center',
  688. justifyContent: 'center',
  689. backgroundColor: this.state.receiveBack,
  690. width: 90,
  691. height: 40,
  692. borderRadius: 39,
  693. margin: 10,
  694. }}>
  695. <Text
  696. style={{
  697. color: this.state.receiveBackFont,
  698. fontWeight: 'bold',
  699. fontSize: 16,
  700. }}>
  701. 邮箱
  702. </Text>
  703. </TouchableOpacity>
  704. </View>
  705. <View>
  706. <TouchableOpacity
  707. onPress={() => {
  708. this.getReceive(2);
  709. }}
  710. style={{
  711. alignItems: 'center',
  712. justifyContent: 'center',
  713. backgroundColor: this.state.receiveBackCompany,
  714. width: 90,
  715. height: 40,
  716. borderRadius: 39,
  717. margin: 10,
  718. }}>
  719. <Text
  720. style={{
  721. color: this.state.receiveBackCompanyFont,
  722. fontWeight: 'bold',
  723. fontSize: 16,
  724. }}>
  725. 短信
  726. </Text>
  727. </TouchableOpacity>
  728. </View>
  729. </View>
  730. </WingBlank>
  731. <WingBlank>
  732. {this.state.receiveType === 1 ? (
  733. <View
  734. style={[
  735. public_css.view,
  736. public_css.lineTopBottom,
  737. {alignItems: 'center'},
  738. ]}>
  739. <View
  740. style={{flexDirection: 'row', alignItems: 'center'}}>
  741. <Text style={{color: 'red', marginRight: 5}}>*</Text>
  742. <Text style={{fontSize: 16}}>邮箱:</Text>
  743. </View>
  744. <TextInput
  745. style={public_css.textInputStyle}
  746. placeholder="请输入邮箱"
  747. clearButtonMode="while-editing"
  748. secureTextEntry={false}
  749. value={this.state.receiveAddress}
  750. onChangeText={(text) => {
  751. this.setState({
  752. receiveAddress: text,
  753. });
  754. }}
  755. />
  756. </View>
  757. ) : (
  758. <View
  759. style={[
  760. public_css.view,
  761. public_css.lineTopBottom,
  762. {alignItems: 'center'},
  763. ]}>
  764. <View
  765. style={{flexDirection: 'row', alignItems: 'center'}}>
  766. <Text style={{color: 'red', marginRight: 5}}>*</Text>
  767. <Text style={{fontSize: 16}}>手机号:</Text>
  768. </View>
  769. <TextInput
  770. style={public_css.textInputStyle}
  771. placeholder="请输入手机号码"
  772. clearButtonMode="while-editing"
  773. secureTextEntry={false}
  774. value={this.state.receiveAddress}
  775. onChangeText={(text) => {
  776. this.setState({
  777. receiveAddress: text,
  778. });
  779. }}
  780. />
  781. </View>
  782. )}
  783. </WingBlank>
  784. </View>
  785. ) : (
  786. <View />
  787. )}
  788. </List>
  789. {this.state.isShowSearch === false ? (
  790. <View>
  791. <View
  792. style={{
  793. backgroundColor: '#F7F7F7',
  794. height: 40,
  795. justifyContent: 'center',
  796. marginLeft: 10,
  797. }}>
  798. <Text style={{color: '#888888', fontSize: 18}}>商品信息</Text>
  799. </View>
  800. <View style={invoice_css.list_view}>
  801. <Text style={invoice_css.list_title_text}>名称</Text>
  802. <Text style={invoice_css.list_title_text}>单价</Text>
  803. {/*<Text style={invoice_css.list_title_text}>数量</Text>*/}
  804. <Text style={invoice_css.list_title_text}>税率(%)</Text>
  805. <Text style={invoice_css.list_title_text}>税额</Text>
  806. </View>
  807. <FlatList
  808. data={this.state.listData}
  809. renderItem={(item) => this.renderItem(item)}
  810. />
  811. <View>
  812. <WhiteSpace />
  813. <WingBlank>
  814. <TouchableOpacity
  815. style={{
  816. // width: Dimensions.get('window').width,
  817. height: 52,
  818. flexDirection: 'row',
  819. justifyContent: 'center',
  820. alignItems: 'center',
  821. border: 2,
  822. borderStyle: 'dotted',
  823. borderColor: '#2A67FE',
  824. borderWidth: 2,
  825. borderRadius: 8,
  826. opacity: 1,
  827. }}
  828. onPress={() => {
  829. this.props.navigation.navigate('product_list_info', {
  830. status: 1,
  831. });
  832. }}>
  833. <SvgXml xml={plusIcon()} />
  834. <Text style={{}}>添加商品信息</Text>
  835. </TouchableOpacity>
  836. </WingBlank>
  837. <WhiteSpace />
  838. </View>
  839. </View>
  840. ) : (
  841. <View />
  842. )}
  843. </View>
  844. </TouchableWithoutFeedback>
  845. </ScrollView>
  846. <View>
  847. <WhiteSpace />
  848. <View
  849. style={{
  850. flexDirection: 'row',
  851. justifyContent: 'space-around',
  852. alignItems: 'center',
  853. }}>
  854. <Text>共{this.state.productNumberTotal}个产品</Text>
  855. <Text>
  856. 开票金额:
  857. {RoundingData(parseFloat(this.state.amountTotal)).replace(
  858. /(\d)(?=(\d{3})+(?:\.\d+)?$)/g,
  859. '$1,',
  860. )}
  861. </Text>
  862. <Text>税额:{RoundingData(parseFloat(this.state.taxAmount))}</Text>
  863. </View>
  864. <WhiteSpace />
  865. <WingBlank>
  866. <View style={[public_css.bottomStatus]}>
  867. <TouchableOpacity
  868. style={[public_css.statusBtn, public_css.statusRBtn]}
  869. onPress={() => this.submitData()}>
  870. {/*<Image*/}
  871. {/* source={require('../../source/img/productImg/confirm.png')}*/}
  872. {/* style={{width: 32, height: 32}}*/}
  873. {/*/>*/}
  874. <Text style={{color: '#fff'}}>开具发票</Text>
  875. </TouchableOpacity>
  876. </View>
  877. </WingBlank>
  878. <WhiteSpace />
  879. </View>
  880. </SafeAreaView>
  881. );
  882. }
  883. async componentDidMount(): void {
  884. let company = JSON.parse(await RetrieveData('company'));
  885. let userName = await RetrieveData('userName');
  886. let payee = '';
  887. let reviewer = '';
  888. if (company.payees.length > 0) {
  889. payee = company.payees.split(',')[0];
  890. }
  891. if (company.reviewers.length > 0) {
  892. reviewer = company.reviewers.split(',')[0];
  893. }
  894. this.setState({
  895. company: company,
  896. payee: payee,
  897. reviewer: reviewer,
  898. drawer: userName,
  899. });
  900. //收到监听
  901. this.listener = DeviceEventEmitter.addListener('productInfo', (data) => {
  902. //收到监听后想做的事情
  903. this.setList(data);
  904. });
  905. }
  906. componentWillUnmount() {
  907. //移除监听
  908. if (this.listener) {
  909. this.listener.remove();
  910. }
  911. clearTimeout(this.state.timer);
  912. }
  913. // 获取收款人、审核人、开票人信息
  914. getUserInfo = (type, name) => {
  915. if (type === 1) {
  916. this.setState({
  917. payee: name,
  918. });
  919. }
  920. if (type === 2) {
  921. this.setState({
  922. reviewer: name,
  923. });
  924. }
  925. if (type === 3) {
  926. this.setState({
  927. drawer: name,
  928. });
  929. }
  930. };
  931. selectProduct = () => {
  932. this.setState({
  933. productVisible: !this.state.productVisible,
  934. });
  935. };
  936. // 开票企业类型选择
  937. companyTypeChange = (value) => {
  938. let companyType = '';
  939. if (value.length > 0) {
  940. companyType = value[0];
  941. }
  942. this.setState({
  943. companyType: companyType,
  944. });
  945. };
  946. // 开票类型选择
  947. invoiceTypeChange = (value) => {
  948. let invoiceType = '';
  949. if (value.length > 0) {
  950. invoiceType = value[0];
  951. }
  952. this.setState({
  953. invoiceType: invoiceType,
  954. });
  955. };
  956. //提交开票信息
  957. submitData = async () => {
  958. if (this.state.customerName === '') {
  959. ToastShow(1, '企业名称不能为空!');
  960. return;
  961. }
  962. if (this.state.companyType === '2') {
  963. if (this.state.taxNumber === '') {
  964. ToastShow(1, '企业税号不能为空!');
  965. return;
  966. }
  967. }
  968. if (this.state.payee === '') {
  969. ToastShow(1, '收款人不能为空!');
  970. return;
  971. }
  972. if (this.state.reviewer === '') {
  973. ToastShow(1, '审核人不能为空!');
  974. return;
  975. }
  976. if (this.state.drawer === '') {
  977. ToastShow(1, '开票人不能为空!');
  978. return;
  979. }
  980. if (this.state.receiveType === 1) {
  981. if (this.state.receiveAddress === '') {
  982. ToastShow(1, '邮箱地址不能为空!');
  983. return;
  984. }
  985. } else {
  986. if (this.state.receiveAddress === '') {
  987. ToastShow(1, '邮箱地址不能为空!');
  988. return;
  989. }
  990. }
  991. if (this.state.listData <= 0) {
  992. ToastShow(1, '商品信息不能为空!');
  993. return;
  994. }
  995. const account = await RetrieveData('account');
  996. let token = await RetrieveData('token');
  997. if (token) {
  998. const url = '/sys/invoice/save';
  999. let response = await RequestNetwork(
  1000. url,
  1001. token,
  1002. {
  1003. interactType: this.state.receiveType,
  1004. interactTypeDetail: this.state.receiveAddress,
  1005. invoiceWay: 1,
  1006. invoiceCategory: this.state.invoiceType,
  1007. cmdParam: {
  1008. REQUEST_COMMON_FPKJ: {
  1009. SBLX: this.state.company.defaultDeviceInfo.deviceType, //设备类型
  1010. SBBH: this.state.company.defaultDeviceInfo.taxDiscId, //设备编号
  1011. KPLX: 0, //开票类型 0-蓝字发票;1-红字发票
  1012. FPZL: this.state.invoiceType, //发票种类 1.增值税普通电子发票 2.增值税电子专用发票 3.增值税普通纸质发票 4 增值税专用纸质发票
  1013. TTLX: this.state.companyType, //收票客户抬头类型 1:个人 2:企业
  1014. KPF_NSRSBH: this.state.company.entTaxId, //开票方纳税人识别号
  1015. KPF_MC: this.state.company.entName, //开票方名称
  1016. KPF_DZ: this.state.company.entAddress, //开票方地址
  1017. KPF_DH: this.state.company.entPhone, //开票方电话
  1018. KPF_YHZH: this.state.company.bankAccountNumber, //开票方银行账号
  1019. KPF_KHHMC: this.state.company.bankName, //开票方开户行名称
  1020. SPF_NSRSBH: this.state.taxNumber, //收票方纳税人识别号
  1021. SPF_MC: this.state.customerName, //收票方名称
  1022. SPF_DH: this.state.contactNumber, //收票方电话
  1023. SPF_DZ: this.state.address, //收票方地址
  1024. SPF_YHZH: this.state.bankAccount, //收票方银行账号
  1025. SPF_KHHMC: this.state.bank, //收票方开户行名称
  1026. KPR: this.state.drawer, //开票人
  1027. SKR: this.state.payee, //收款人
  1028. FHR: this.state.reviewer, //复核人
  1029. YFP_DM: '', //原发票代码
  1030. YFP_HM: '', //原发票号码
  1031. JSHJ: NumberTwoDecimal(parseFloat(this.state.amountTotal)), //价税合计
  1032. HJJE: NumberTwoDecimal(parseFloat(this.state.productAmountTotal)), //合计金额
  1033. HJSE: NumberTwoDecimal(this.state.taxRateTotal), //合计税额
  1034. BZ: this.state.remark, //备注
  1035. HYLX: '0', //行业类型 0 商业、1 其它
  1036. TSPZ: '00', //特殊票种标识 “00”不是 “01”农产品销售“02”农产品收购“06”抵扣通行费“07”其它通行费“08”成品油销售说明:如果非特殊票种此节点可以没有。
  1037. COMMON_FPKJ_XMXXS: {
  1038. COMMON_FPKJ_XMXX: this.state.listData,
  1039. }, // 产品列表
  1040. },
  1041. },
  1042. mobile: account,
  1043. reqChannel: 3,
  1044. },
  1045. false,
  1046. 1,
  1047. );
  1048. if (response) {
  1049. if (response.code === 0) {
  1050. Alert.alert(
  1051. '开具',
  1052. '开票成功!',
  1053. [
  1054. {
  1055. text: '确定',
  1056. onPress: () => {
  1057. DeviceEventEmitter.emit('updateStatistics');
  1058. this.props.navigation.goBack();
  1059. },
  1060. },
  1061. ],
  1062. {cancelable: false},
  1063. );
  1064. } else {
  1065. await this.abnormalMessage(response);
  1066. }
  1067. } else {
  1068. ToastShow(1, response.msg);
  1069. }
  1070. }
  1071. };
  1072. //加载list列表
  1073. setList = (data) => {
  1074. let numberTotal = '';
  1075. if (data.XMSL === '') {
  1076. numberTotal = parseInt(this.state.productNumberTotal) + 1;
  1077. } else {
  1078. numberTotal =
  1079. parseInt(this.state.productNumberTotal) + parseInt(data.XMSL);
  1080. }
  1081. let taxRateTotal =
  1082. parseFloat(this.state.taxRateTotal) + parseFloat(data.SE);
  1083. let taxAmount =
  1084. parseFloat(this.state.taxAmount) + parseFloat(data.taxAmount);
  1085. let amountTotal =
  1086. parseFloat(this.state.amountTotal) + parseFloat(data.amount);
  1087. let productAmountTotal =
  1088. parseFloat(this.state.productAmountTotal) + parseFloat(data.XMJE);
  1089. let list = this.state.listData.concat(data);
  1090. this.setState({
  1091. listData: list,
  1092. amountTotal: amountTotal,
  1093. taxRateTotal: taxRateTotal,
  1094. taxAmount: taxAmount,
  1095. productNumberTotal: numberTotal,
  1096. productAmountTotal: productAmountTotal,
  1097. });
  1098. };
  1099. //加载items
  1100. renderItem = (data) => (
  1101. <SwipeAction
  1102. autoClose
  1103. style={{backgroundColor: 'transparent'}}
  1104. right={this.right(data)}>
  1105. <List.Item>
  1106. <View style={{flexDirection: 'row', justifyContent: 'space-around'}}>
  1107. <View style={{width: 70, alignItems: 'center'}}>
  1108. <Text>{data.item.XMMC} </Text>
  1109. </View>
  1110. <View style={{width: 70, alignItems: 'center'}}>
  1111. <Text>{data.item.price}</Text>
  1112. </View>
  1113. {/*<View>*/}
  1114. {/* <Text>{data.item.XMSL} </Text>*/}
  1115. {/*</View>*/}
  1116. <View style={{width: 70, alignItems: 'center'}}>
  1117. <Text>{data.item.SL * 100}</Text>
  1118. </View>
  1119. <View style={{width: 70, alignItems: 'center'}}>
  1120. <Text>{data.item.taxAmount}</Text>
  1121. </View>
  1122. </View>
  1123. </List.Item>
  1124. </SwipeAction>
  1125. );
  1126. //左滑删除
  1127. right = (data) => [
  1128. {
  1129. text: '删除',
  1130. onPress: () => {
  1131. this.deleteData(data.item);
  1132. },
  1133. style: {backgroundColor: 'red', color: 'white'},
  1134. },
  1135. ];
  1136. //删除产品信息
  1137. deleteData = (data) => {
  1138. let listData = this.state.listData;
  1139. let numberTotal = '';
  1140. if (data.XMSL === '') {
  1141. numberTotal = parseInt(this.state.productNumberTotal) - 1;
  1142. } else {
  1143. numberTotal =
  1144. parseInt(this.state.productNumberTotal) - parseInt(data.XMSL);
  1145. }
  1146. let taxRateTotal =
  1147. parseFloat(this.state.taxRateTotal) - parseFloat(data.SE);
  1148. let taxAmount =
  1149. parseFloat(this.state.taxAmount) - parseFloat(data.taxAmount);
  1150. let amountTotal =
  1151. parseFloat(this.state.amountTotal) - parseFloat(data.amount);
  1152. let productAmountTotal =
  1153. parseFloat(this.state.productAmountTotal) - parseFloat(data.XMJE);
  1154. const prevIndex = listData.findIndex((item) => item.key === data.SPBM);
  1155. listData.splice(prevIndex, 1);
  1156. this.setState({
  1157. listData: listData,
  1158. amountTotal: amountTotal,
  1159. taxRateTotal: taxRateTotal,
  1160. taxAmount: taxAmount,
  1161. productNumberTotal: numberTotal,
  1162. productAmountTotal: productAmountTotal,
  1163. });
  1164. };
  1165. // 字段隐藏切换
  1166. hideChange = () => {
  1167. this.setState({
  1168. hideStatus: !this.state.hideStatus,
  1169. hideStatusText: '收起',
  1170. });
  1171. };
  1172. // 获取选择企业信息
  1173. selectCustomer = (data) => {
  1174. this.setState({
  1175. customerName: data.customerName,
  1176. taxNumber: data.entTaxId,
  1177. contactNumber: data.contactPhone,
  1178. address: data.address,
  1179. bank: data.bankName,
  1180. bankAccount: data.bankAccount,
  1181. });
  1182. };
  1183. // 获取开票类型
  1184. getInvoiceCategory = (invoiceCategory) => {
  1185. if (invoiceCategory === '1') {
  1186. this.setState({
  1187. categoryBack: 'rgba(42,103,254, 1)',
  1188. categoryBackCompany: 'rgba(42,103,254, 0.07)',
  1189. categoryBackFont: '#ffffff',
  1190. categoryBackCompanyFont: '#2A67FE',
  1191. companyType: invoiceCategory,
  1192. });
  1193. } else {
  1194. this.setState({
  1195. categoryBack: 'rgba(42,103,254, 0.07)',
  1196. categoryBackCompany: 'rgba(42,103,254, 1)',
  1197. categoryBackFont: '#2A67FE',
  1198. categoryBackCompanyFont: '#ffffff',
  1199. companyType: invoiceCategory,
  1200. });
  1201. }
  1202. };
  1203. //获取发票类型
  1204. getInvoiceType = (invoiceType) => {
  1205. if (invoiceType === '1') {
  1206. this.setState({
  1207. typeBack: 'rgba(42,103,254, 1)',
  1208. typeBackMajor: 'rgba(42,103,254, 0.07)',
  1209. typeBackFont: '#ffffff',
  1210. typeBackMajorFont: '#2A67FE',
  1211. invoiceType: invoiceType,
  1212. });
  1213. } else {
  1214. this.setState({
  1215. typeBack: 'rgba(42,103,254, 0.07)',
  1216. typeBackMajor: 'rgba(42,103,254, 1)',
  1217. typeBackFont: '#2A67FE',
  1218. typeBackMajorFont: '#ffffff',
  1219. invoiceType: invoiceType,
  1220. });
  1221. }
  1222. };
  1223. //获取接收方式类型
  1224. getReceive = (type) => {
  1225. if (type === 1) {
  1226. this.setState({
  1227. receiveType: type,
  1228. receiveBack: 'rgba(42,103,254, 1)',
  1229. receiveBackFont: '#ffffff',
  1230. receiveBackCompany: 'rgba(42,103,254, 0.07)',
  1231. receiveBackCompanyFont: '#2A67FE',
  1232. receiveAddress: '',
  1233. });
  1234. } else {
  1235. this.setState({
  1236. receiveType: type,
  1237. receiveBack: 'rgba(42,103,254, 0.07)',
  1238. receiveBackFont: '#2A67FE',
  1239. receiveBackCompany: 'rgba(42,103,254, 1)',
  1240. receiveBackCompanyFont: '#ffffff',
  1241. receiveAddress: '',
  1242. });
  1243. }
  1244. };
  1245. // 设置云抬头显示
  1246. setSearchCustomerName = (value) => {
  1247. if (value) {
  1248. this.getCustomerData(value);
  1249. } else {
  1250. this.setState({
  1251. isShowSearch: false,
  1252. });
  1253. }
  1254. };
  1255. //获得客户信息
  1256. getCustomerData = async (value) => {
  1257. let token = await RetrieveData('token');
  1258. let company = JSON.parse(await RetrieveData('company'));
  1259. if (token) {
  1260. const url = '/sys/customer/customerSearch';
  1261. let res = await RequestNetwork(
  1262. url,
  1263. token,
  1264. {
  1265. customerName: value,
  1266. entTaxId: company.entTaxId,
  1267. reqChannel: 3,
  1268. },
  1269. false,
  1270. 2,
  1271. );
  1272. if (res) {
  1273. console.log(res);
  1274. if (res.code === 0) {
  1275. this.setCustomerList(res.data);
  1276. } else {
  1277. await this.abnormalMessage(res);
  1278. }
  1279. }
  1280. }
  1281. };
  1282. //设置客户信息列表
  1283. setCustomerList = (data) => {
  1284. this.setState({
  1285. headList: [],
  1286. });
  1287. let listDatas = data.map((_, i) => ({
  1288. key: data[i].customerId,
  1289. customerName: data[i].customerName,
  1290. entTaxId: data[i].customerEntTaxId,
  1291. contactPhone: data[i].contactPhone,
  1292. address: data[i].address,
  1293. bankName: data[i].bankName,
  1294. bankAccount: data[i].bankAccountNumber,
  1295. customerMobile: data[i].customerMobile,
  1296. email: data[i].email,
  1297. }));
  1298. let list = this.state.headList.concat(listDatas);
  1299. if (list.length > 0) {
  1300. this.setState({
  1301. headList: list,
  1302. isShowSearch: true,
  1303. });
  1304. } else {
  1305. this.setState({
  1306. headList: list,
  1307. isShowSearch: false,
  1308. });
  1309. }
  1310. };
  1311. // 获取抬头信息
  1312. getHeadInfo = (data) => {
  1313. this.setState({
  1314. customerName: data.customerName,
  1315. taxNumber: data.entTaxId,
  1316. contactNumber: data.contactPhone,
  1317. address: data.address,
  1318. bank: data.bankName,
  1319. bankAccount: data.bankAccount,
  1320. isShowSearch: false,
  1321. });
  1322. };
  1323. // 点击空白处隐藏云抬头
  1324. isHideHead = () => {
  1325. console.log(123);
  1326. let status = this.state.isShowSearch;
  1327. if (status) {
  1328. this.setState({
  1329. isShowSearch: false,
  1330. });
  1331. }
  1332. };
  1333. // 处理网络请求数据
  1334. abnormalMessage = async (jason) => {
  1335. if (jason.code === 401) {
  1336. await Alert.alert(
  1337. '登录失效',
  1338. '登录状态已失效,请重新登录!',
  1339. [
  1340. {
  1341. text: '确定',
  1342. onPress: () => {
  1343. CleanAll();
  1344. this.props.navigation.popToTop();
  1345. },
  1346. },
  1347. ],
  1348. {cancelable: false},
  1349. );
  1350. }
  1351. if (jason.code === 403) {
  1352. Alert.alert(
  1353. '权限',
  1354. '暂无权限操作此模块!',
  1355. [
  1356. {
  1357. text: '确定',
  1358. onPress: () => {
  1359. this.props.navigation.goBack();
  1360. },
  1361. },
  1362. ],
  1363. {cancelable: false},
  1364. );
  1365. }
  1366. if (jason.code !== 401 && jason.code !== 403) {
  1367. ToastShow(1, jason.msg);
  1368. }
  1369. };
  1370. }
  1371. const styles = StyleSheet.create({
  1372. buttonView: {
  1373. alignItems: 'center',
  1374. backgroundColor: '#ffffff',
  1375. },
  1376. //通用按钮样式
  1377. button: {
  1378. marginTop: 5,
  1379. width: Dimensions.get('window').width * 0.8,
  1380. height: 34,
  1381. borderRadius: 10,
  1382. backgroundColor: '#1874CD',
  1383. justifyContent: 'center',
  1384. alignItems: 'center',
  1385. },
  1386. //通用按钮样式
  1387. buttonText: {
  1388. textAlign: 'center',
  1389. color: 'white',
  1390. },
  1391. inputView: {
  1392. padding: 5,
  1393. backgroundColor: '#fff',
  1394. alignItems: 'center',
  1395. justifyContent: 'center',
  1396. display: 'flex',
  1397. },
  1398. view: {
  1399. flexDirection: 'row',
  1400. height: 34,
  1401. width: Dimensions.get('window').width * 0.8,
  1402. borderBottomWidth: 3 / PixelRatio.get(),
  1403. borderColor: 'rgb(208,208,208)',
  1404. },
  1405. //通用textInput样式
  1406. text: {
  1407. lineHeight: 34,
  1408. fontSize: 14,
  1409. },
  1410. //通用textInput样式
  1411. lineTopBottom: {
  1412. borderBottomWidth: 3 / PixelRatio.get(),
  1413. borderColor: 'rgb(208,208,208)',
  1414. },
  1415. textInputStyle: {
  1416. marginRight: 10,
  1417. marginLeft: 20,
  1418. fontSize: 14,
  1419. marginTop: 4,
  1420. },
  1421. });