invoiceApplyList.jsx 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import "./public.less";
  4. import {
  5. Form,
  6. Button,
  7. Input,
  8. Select,
  9. Spin,
  10. Table,
  11. message,
  12. Modal,
  13. Upload
  14. } from "antd";
  15. import {
  16. getProjectStatus,
  17. getProvinceA,
  18. getInvoiceStatus,
  19. getprovince,
  20. getStatus,
  21. getPeople,
  22. splitUrl,
  23. ShowModal
  24. } from "@/tools";
  25. import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
  26. import ShowModalDiv from "@/showModal.jsx";
  27. import OrderDesc from "../orderDetail/orderDesc";
  28. const FormItem = Form.Item;
  29. const invoiceApplyList = React.createClass({
  30. departmentList() {
  31. this.setState({
  32. loading: true
  33. });
  34. $.ajax({
  35. method: "get",
  36. dataType: "json",
  37. crossDomain: false,
  38. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  39. data: {},
  40. success: function(data) {
  41. let thedata = data.data;
  42. let theArr = [];
  43. if (!thedata) {
  44. if (data.error && data.error.length) {
  45. message.warning(data.error[0].message);
  46. }
  47. } else {
  48. thedata.map(function(item, index) {
  49. theArr.push({
  50. key: index,
  51. name: item.name,
  52. id: item.id
  53. });
  54. });
  55. }
  56. this.setState({
  57. departmentArr: theArr
  58. });
  59. }.bind(this)
  60. }).always(
  61. function() {
  62. this.setState({
  63. loading: false
  64. });
  65. }.bind(this)
  66. );
  67. },
  68. loadData(pageNo) {
  69. this.state.data = [];
  70. this.setState({
  71. loading: true
  72. });
  73. $.ajax({
  74. method: "get",
  75. dataType: "json",
  76. crossDomain: false,
  77. url:
  78. globalConfig.context +
  79. "/api/admin/orderInvoice/financeOrderInvoiceList",
  80. data: {
  81. pageNo: pageNo || 1,
  82. pageSize: this.state.pagination.pageSize,
  83. name: this.state.nameSearch, //客户名称
  84. orderNo: this.state.orderNoSearch,
  85. orderDep: this.state.departmenttList,
  86. type: 0
  87. },
  88. success: function(data) {
  89. ShowModal(this);
  90. let theArr = [];
  91. if (!data.data || !data.data.list) {
  92. if (data.error && data.error.length) {
  93. message.warning(data.error[0].message);
  94. }
  95. } else {
  96. for (let i = 0; i < data.data.list.length; i++) {
  97. let thisdata = data.data.list[i];
  98. theArr.push({
  99. key: i,
  100. id: thisdata.id,
  101. status: thisdata.status,
  102. unitName: thisdata.unitName,
  103. orderNo: thisdata.orderno,
  104. name: thisdata.name,
  105. processStatus: thisdata.processStatus,
  106. projectStatus: thisdata.projectStatus,
  107. amount: thisdata.amount,
  108. sumAmount: thisdata.sumAmount,
  109. createTime: thisdata.createTime
  110. ? new Date(thisdata.createTime).toLocaleString()
  111. : "",
  112. settlementAmount: thisdata.settlementAmount,
  113. notAmount: thisdata.notAmount
  114. });
  115. }
  116. }
  117. this.state.pagination.current = data.data.pageNo;
  118. this.state.pagination.total = data.data.totalCount;
  119. if (data.data && data.data.list && !data.data.list.length) {
  120. this.state.pagination.current = 0;
  121. this.state.pagination.total = 0;
  122. }
  123. this.setState({
  124. totalPage: data.data.totalPage,
  125. dataSource: theArr,
  126. pagination: this.state.pagination
  127. });
  128. }.bind(this)
  129. }).always(
  130. function() {
  131. this.setState({
  132. loading: false
  133. });
  134. }.bind(this)
  135. );
  136. },
  137. invoiceData() {
  138. this.setState({
  139. loading: true
  140. });
  141. $.ajax({
  142. method: "get",
  143. dataType: "json",
  144. crossDomain: false,
  145. url:
  146. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  147. data: {
  148. id: this.state.id
  149. },
  150. success: function(data) {
  151. let thisdata = data.data;
  152. this.setState({
  153. contractNo: thisdata.contractNo,
  154. orderNo: thisdata.orderNo,
  155. approval: thisdata.approval,
  156. type: thisdata.type,
  157. status: thisdata.status,
  158. remarks: thisdata.remarks,
  159. invoiceType: thisdata.invoiceType,
  160. unitName: thisdata.unitName,
  161. taxNumber: thisdata.taxNumber,
  162. amount: thisdata.amount,
  163. banks: thisdata.banks,
  164. content: thisdata.content,
  165. unitAddress: thisdata.unitAddress,
  166. invoiceRemarks: thisdata.invoiceRemarks,
  167. unitMobile: thisdata.unitMobile,
  168. post: thisdata.post,
  169. addressee: thisdata.addressee,
  170. addresseeMobile: thisdata.addresseeMobile,
  171. addresseeProvince: thisdata.addresseeProvince,
  172. addresseeCity: thisdata.addresseeCity,
  173. addresseeArea: thisdata.addresseeArea,
  174. alreadyAmount: thisdata.alreadyAmount,
  175. recipientAddress: thisdata.recipientAddress,
  176. orgCodeUrl: thisdata.voucherUrl
  177. ? splitUrl(
  178. thisdata.voucherUrl,
  179. ",",
  180. globalConfig.avatarHost + "/upload"
  181. )
  182. : []
  183. });
  184. }.bind(this)
  185. }).done(
  186. function() {
  187. this.setState({
  188. loading: false
  189. });
  190. }.bind(this)
  191. );
  192. },
  193. getInitialState() {
  194. return {
  195. searchMore: true,
  196. assignVisible: false,
  197. releaseDate: [],
  198. totalPage: 0,
  199. boHuivisible: false,
  200. selectedRowKeys: [],
  201. // 子组件改变的表格title数组
  202. changeList: undefined,
  203. selectedRows: [],
  204. loading: false,
  205. reason: "",
  206. foo: 0,
  207. pagination: {
  208. defaultCurrent: 1,
  209. defaultPageSize: 10,
  210. showQuickJumper: true,
  211. pageSize: 10,
  212. onChange: function(page) {
  213. this.loadData(page);
  214. }.bind(this),
  215. showTotal: function(total) {
  216. return "共" + total + "条数据";
  217. }
  218. },
  219. columns: [
  220. {
  221. title: "编号",
  222. dataIndex: "id",
  223. key: "id"
  224. // fixed: "left"
  225. },
  226. {
  227. title: "客户",
  228. dataIndex: "unitName",
  229. key: "unitName"
  230. },
  231. {
  232. title: "跟单人/签单人",
  233. dataIndex: "name",
  234. key: "name"
  235. },
  236. {
  237. title: "开票状态",
  238. dataIndex: "status",
  239. key: "status",
  240. render: text => {
  241. return getStatus(text);
  242. }
  243. },
  244. {
  245. title: "流程状态",
  246. dataIndex: "processStatus",
  247. key: "processStatus",
  248. render: text => {
  249. return getPeople(text);
  250. }
  251. },
  252. {
  253. title: "项目状态",
  254. dataIndex: "projectStatus",
  255. key: "projectStatus",
  256. render: text => {
  257. return getProjectStatus(text);
  258. }
  259. },
  260. {
  261. title: "申请开票(万)",
  262. dataIndex: "amount",
  263. key: "amount"
  264. },
  265. {
  266. title: "已开票(万)",
  267. dataIndex: "sumAmount",
  268. key: "sumAmount"
  269. },
  270. {
  271. title: "已收款",
  272. dataIndex: "settlementAmount",
  273. key: "settlementAmount"
  274. },
  275. {
  276. title: "未收款",
  277. dataIndex: "notAmount",
  278. key: "notAmount"
  279. },
  280. {
  281. title: "申请时间",
  282. dataIndex: "createTime",
  283. key: "createTime"
  284. },
  285. {
  286. title: "操作",
  287. dataIndex: "caozuo",
  288. key: "caouzo",
  289. render: (text, record, index) => {
  290. return (
  291. <div>
  292. {
  293. <Button
  294. type="primary"
  295. onClick={e => {
  296. e.stopPropagation(), this.visit(index);
  297. }}
  298. style={{ background: "deepskyblue", border: "none" }}
  299. >
  300. 申请内容
  301. </Button>
  302. }
  303. {record.status !== 2 ? (
  304. <Button
  305. type="primary"
  306. style={{ marginLeft: "10px" }}
  307. onClick={e => {
  308. e.stopPropagation(),
  309. this.setState({ examine: 2 }, () => {
  310. this.sende(record);
  311. });
  312. }}
  313. >
  314. 通过
  315. </Button>
  316. ) : (
  317. ""
  318. )}
  319. {record.status !== 2 ? (
  320. <Button
  321. type="danger"
  322. onClick={e => {
  323. e.stopPropagation(),
  324. this.setState({ examine: 3 }, () => {
  325. this.reject(record);
  326. });
  327. }}
  328. style={{ marginLeft: "10px" }}
  329. >
  330. 拒绝
  331. </Button>
  332. ) : (
  333. ""
  334. )}
  335. {record.status === 2 ? (
  336. <Button
  337. style={{ marginLeft: "10px", color: "black" }}
  338. disabled={true}
  339. >
  340. 已通过
  341. </Button>
  342. ) : (
  343. ""
  344. )}
  345. {
  346. <Button
  347. type="primary"
  348. style={{
  349. marginLeft: "10px",
  350. background: "orangered",
  351. border: "none"
  352. }}
  353. onClick={e => {
  354. e.stopPropagation(), this.inRecord(record, index);
  355. }}
  356. >
  357. 开票记录
  358. </Button>
  359. }
  360. </div>
  361. );
  362. }
  363. }
  364. ],
  365. columnsDate: [
  366. {
  367. title: "编号",
  368. dataIndex: "id",
  369. key: "id"
  370. },
  371. {
  372. title: "订单编号",
  373. dataIndex: "orderno",
  374. key: "orderno"
  375. },
  376. {
  377. title: "开票金额(万元)",
  378. dataIndex: "amount",
  379. key: "amount"
  380. },
  381. {
  382. title: "申请时间",
  383. dataIndex: "createTime",
  384. key: "createTime"
  385. },
  386. {
  387. title: "开票状态",
  388. dataIndex: "status",
  389. key: "status",
  390. render: text => {
  391. return getInvoiceStatus(text);
  392. }
  393. }
  394. ],
  395. dataSource: [],
  396. searchTime: [,]
  397. };
  398. },
  399. loadSend(record) {
  400. this.setState({
  401. loading: true
  402. });
  403. if (this.state.examine === 3 && this.state.reason === "") {
  404. message.warning("拒绝理由不能为空!");
  405. return;
  406. }
  407. $.ajax({
  408. method: "post",
  409. dataType: "json",
  410. crossDomain: false,
  411. url: globalConfig.context + "/api/admin/orderInvoice/financeExamine",
  412. data: {
  413. id: this.state.examine === 2 ? record.id : this.state.id,
  414. examine: this.state.examine,
  415. reason: this.state.reason
  416. },
  417. success: function() {}.bind(this)
  418. }).done(
  419. function() {
  420. this.setState({
  421. loading: false
  422. });
  423. if (this.state.examine === 2) {
  424. message.success("通过成功!");
  425. this.loadData();
  426. } else {
  427. message.success("拒绝成功!");
  428. this.resetReason();
  429. this.rejectCancels();
  430. this.loadData();
  431. }
  432. }.bind(this)
  433. );
  434. },
  435. //重置拒绝理由
  436. resetReason() {
  437. this.setState({
  438. reason: ""
  439. });
  440. },
  441. sende(record) {
  442. this.loadSend(record);
  443. },
  444. commit() {
  445. this.loadSend();
  446. this.setState({
  447. avisible: false
  448. });
  449. },
  450. visit(index) {
  451. this.setState(
  452. {
  453. id: this.state.dataSource[index].id,
  454. avisible: true
  455. },
  456. () => {
  457. this.invoiceData();
  458. }
  459. );
  460. },
  461. visitCancels() {
  462. this.setState({
  463. avisible: false
  464. });
  465. },
  466. reject(record) {
  467. this.setState({
  468. visibleR: true,
  469. id: record.id
  470. });
  471. },
  472. rejectCancels() {
  473. this.setState({
  474. visibleR: false
  475. });
  476. },
  477. inRecordData() {
  478. this.setState({
  479. loading: true
  480. });
  481. $.ajax({
  482. method: "get",
  483. dataType: "json",
  484. crossDomain: false,
  485. url:
  486. globalConfig.context +
  487. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  488. data: {
  489. orderNo: this.state.orderNo2
  490. },
  491. success: function(data) {
  492. let theArr = [];
  493. let sum = 0;
  494. if (!data.data) {
  495. if (data.error && data.error.length) {
  496. message.warning(data.error[0].message);
  497. }
  498. } else {
  499. for (let i = 0; i < data.data.list.length; i++) {
  500. let thisdata = data.data.list[i];
  501. sum += parseFloat(thisdata.amount);
  502. theArr.push({
  503. id: thisdata.id,
  504. orderno: thisdata.orderno, //订单编号
  505. amount: thisdata.amount, //签单金额
  506. createTime: thisdata.createTime, //流程状态
  507. status: thisdata.status, //结算状态
  508. rejectReason: thisdata.rejectReason
  509. });
  510. }
  511. }
  512. this.setState({
  513. recordData: theArr,
  514. sum: sum.toFixed(4)
  515. });
  516. }.bind(this)
  517. }).done(
  518. function() {
  519. this.setState({
  520. loading: false
  521. });
  522. }.bind(this)
  523. );
  524. },
  525. inRecord(record) {
  526. this.setState(
  527. {
  528. bvisible: true,
  529. orderNo2: record.orderNo
  530. },
  531. () => {
  532. this.inRecordData();
  533. }
  534. );
  535. },
  536. inRecordCanl() {
  537. this.setState({
  538. bvisible: false
  539. });
  540. },
  541. search() {
  542. this.loadData();
  543. },
  544. componentWillMount() {
  545. this.departmentList();
  546. this.loadData();
  547. },
  548. reset() {
  549. this.state.nameSearch = "";
  550. this.state.releaseDate = [];
  551. this.state.orderNoSearch = "";
  552. this.state.processStatus = [];
  553. this.state.departmenttList = [];
  554. this.loadData();
  555. },
  556. changeList(arr) {
  557. const newArr = [];
  558. this.state.columns.forEach(item => {
  559. arr.forEach(val => {
  560. if (val === item.title) {
  561. newArr.push(item);
  562. }
  563. });
  564. });
  565. this.setState({
  566. changeList: newArr
  567. });
  568. },
  569. tableRowClick(record) {
  570. console.log(record);
  571. this.state.RowData = record;
  572. this.setState({
  573. showDesc: true
  574. });
  575. },
  576. closeDesc(e, s) {
  577. this.state.showDesc = e;
  578. if (s) {
  579. this.loadData(this.state.page);
  580. }
  581. },
  582. render() {
  583. const formItemLayout = {
  584. labelCol: { span: 8 },
  585. wrapperCol: { span: 14 }
  586. };
  587. var departmentArr = this.state.departmentArr || [];
  588. return (
  589. <div className="user-content">
  590. <ShowModalDiv ShowModal={this.state.showModal} />
  591. <div className="content-title">
  592. <span>省内开票审核</span>
  593. </div>
  594. <div className="user-search">
  595. <Input
  596. placeholder="营销员名称"
  597. value={this.state.nameSearch}
  598. onChange={e => {
  599. this.setState({ nameSearch: e.target.value });
  600. }}
  601. />
  602. <Input
  603. placeholder="订单编号"
  604. value={this.state.orderNoSearch}
  605. onChange={e => {
  606. this.setState({ orderNoSearch: e.target.value });
  607. }}
  608. />
  609. <Select
  610. placeholder="订单部门"
  611. style={{ width: 150, marginRight: 10 }}
  612. value={this.state.departmenttList}
  613. onChange={e => {
  614. this.setState({ departmenttList: e });
  615. }}
  616. >
  617. {departmentArr.map(function(item) {
  618. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  619. })}
  620. </Select>
  621. <Button
  622. type="primary"
  623. onClick={this.search}
  624. style={{ marginLeft: 10 }}
  625. >
  626. 搜索
  627. </Button>
  628. <Button onClick={this.reset}>重置</Button>
  629. </div>
  630. <ChooseList
  631. columns={this.state.columns}
  632. changeFn={this.changeList}
  633. changeList={this.state.changeList}
  634. top={55}
  635. />
  636. <div className="patent-table">
  637. <Spin spinning={this.state.loading}>
  638. <Table
  639. columns={
  640. this.state.changeList == undefined
  641. ? this.state.columns
  642. : this.state.changeList
  643. }
  644. scroll={{ x: 1500, y: 0 }}
  645. onRowClick={this.tableRowClick}
  646. dataSource={this.state.dataSource}
  647. pagination={this.state.pagination}
  648. bordered
  649. />
  650. </Spin>
  651. </div>
  652. <Modal
  653. visible={this.state.visibleR}
  654. className="admin-desc-content"
  655. footer=""
  656. title="拒绝理由"
  657. width="400px"
  658. onCancel={this.rejectCancels}
  659. >
  660. <Input.TextArea
  661. placeholder="请输入拒绝理由"
  662. rows={4}
  663. value={this.state.reason}
  664. onChange={e => {
  665. this.setState({ reason: e.target.value });
  666. }}
  667. ></Input.TextArea>
  668. <div className="clearfix" style={{ marginTop: "20px" }}>
  669. <Button
  670. type="primary"
  671. onClick={e => {
  672. e.stopPropagation(), this.commit();
  673. }}
  674. style={{ float: "right" }}
  675. >
  676. 提交
  677. </Button>
  678. </div>
  679. </Modal>
  680. <Modal
  681. className="admin-desc-content"
  682. footer=""
  683. title="开具发票申请单"
  684. width="900px"
  685. visible={this.state.avisible}
  686. onOk={this.visitOks}
  687. onCancel={this.visitCancels}
  688. >
  689. <Form
  690. layout="horizontal"
  691. id="demand-form"
  692. style={{ paddingBottom: "40px" }}
  693. >
  694. <Spin spinning={this.state.loading}>
  695. <div className="clearfix">
  696. <div className="clearfix">
  697. <FormItem
  698. className="half-item"
  699. {...formItemLayout}
  700. label="合同编号"
  701. >
  702. <span>{this.state.contractNo}</span>
  703. </FormItem>
  704. <FormItem
  705. className="half-item"
  706. {...formItemLayout}
  707. label="备注"
  708. >
  709. <span>{this.state.remarks}</span>
  710. </FormItem>
  711. </div>
  712. <div className="clearfix">
  713. <FormItem
  714. className="half-item"
  715. {...formItemLayout}
  716. label={
  717. <span>
  718. <strong style={{ color: "#f00" }}>*</strong>省内/外
  719. </span>
  720. }
  721. >
  722. <span>{getProvinceA(this.state.type)}</span>
  723. </FormItem>
  724. <FormItem
  725. className="half-item"
  726. {...formItemLayout}
  727. label={
  728. <span>
  729. <strong style={{ color: "#f00" }}>*</strong>特批
  730. </span>
  731. }
  732. >
  733. <span>{this.state.approval === 0 ? "否" : "是"}</span>
  734. </FormItem>
  735. </div>
  736. <hr
  737. style={{
  738. border: "1px dashed #aaa",
  739. width: "90%",
  740. margin: "auto"
  741. }}
  742. />
  743. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  744. <span style={{ fontSize: "14px" }}>发票内容</span>
  745. </div>
  746. <div className="clearfix">
  747. <FormItem
  748. className="half-item"
  749. {...formItemLayout}
  750. label={
  751. <span>
  752. <strong style={{ color: "#f00" }}>*</strong>发票类型
  753. </span>
  754. }
  755. >
  756. <span>
  757. {this.state.invoiceType === 0
  758. ? "增值税专用发票"
  759. : this.state.invoiceType === 1
  760. ? "增值税普通发票"
  761. : "其他"}
  762. </span>
  763. </FormItem>
  764. </div>
  765. <div className="clearfix">
  766. <FormItem
  767. className="half-item"
  768. {...formItemLayout}
  769. label={
  770. <span>
  771. <strong style={{ color: "#f00" }}>*</strong>单位名称
  772. </span>
  773. }
  774. >
  775. <span>{this.state.unitName}</span>
  776. </FormItem>
  777. <FormItem
  778. className="half-item"
  779. {...formItemLayout}
  780. label={
  781. <span>
  782. <strong style={{ color: "#f00" }}>*</strong>税号
  783. </span>
  784. }
  785. >
  786. <span>{this.state.taxNumber}</span>
  787. </FormItem>
  788. <FormItem
  789. className="half-item"
  790. {...formItemLayout}
  791. label={
  792. <span>
  793. <strong style={{ color: "#f00" }}>*</strong>
  794. 开票金额(万元)
  795. </span>
  796. }
  797. >
  798. <span>{this.state.amount}</span>
  799. </FormItem>
  800. <FormItem
  801. className="half-item"
  802. {...formItemLayout}
  803. label={
  804. <span>
  805. <strong style={{ color: "#f00" }}>*</strong>
  806. 开户行银行账号
  807. </span>
  808. }
  809. >
  810. <span>{this.state.banks}</span>
  811. </FormItem>
  812. <FormItem
  813. className="half-item"
  814. {...formItemLayout}
  815. label={
  816. <span>
  817. <strong style={{ color: "#f00" }}>*</strong>
  818. 开票内容及说明
  819. </span>
  820. }
  821. >
  822. <span>{this.state.content}</span>
  823. </FormItem>
  824. <FormItem
  825. className="half-item"
  826. {...formItemLayout}
  827. label={
  828. <span>
  829. <strong style={{ color: "#f00" }}>*</strong>单位地址
  830. </span>
  831. }
  832. >
  833. <span>{this.state.unitAddress}</span>
  834. </FormItem>
  835. <FormItem
  836. className="half-item"
  837. {...formItemLayout}
  838. label="备注"
  839. >
  840. <span>{this.state.invoiceRemarks}</span>
  841. </FormItem>
  842. <FormItem
  843. className="half-item"
  844. {...formItemLayout}
  845. label={
  846. <span>
  847. <strong style={{ color: "#f00" }}>*</strong>单位电话
  848. </span>
  849. }
  850. >
  851. <span>{this.state.unitMobile}</span>
  852. </FormItem>
  853. </div>
  854. <div className="clearfix">
  855. <FormItem
  856. labelCol={{ span: 4 }}
  857. wrapperCol={{ span: 18 }}
  858. label={
  859. <span>
  860. <strong style={{ color: "#f00" }}>*</strong>附件
  861. </span>
  862. }
  863. >
  864. <Upload
  865. className="demandDetailShow-upload"
  866. listType="picture-card"
  867. fileList={this.state.orgCodeUrl}
  868. onPreview={file => {
  869. this.setState({
  870. previewImage: file.url || file.thumbUrl,
  871. previewVisible: true
  872. });
  873. }}
  874. ></Upload>
  875. <Modal
  876. maskClosable={false}
  877. footer={null}
  878. visible={this.state.previewVisible}
  879. onCancel={() => {
  880. this.setState({ previewVisible: false });
  881. }}
  882. >
  883. <img
  884. alt=""
  885. style={{ width: "100%" }}
  886. src={this.state.previewImage || ""}
  887. />
  888. </Modal>
  889. </FormItem>
  890. </div>
  891. <hr
  892. style={{
  893. border: "1px dashed #aaa",
  894. width: "90%",
  895. margin: "auto"
  896. }}
  897. />
  898. <div className="clearfix" style={{ marginTop: "10px" }}>
  899. <FormItem
  900. className="half-item"
  901. {...formItemLayout}
  902. label="发票是否邮寄:"
  903. >
  904. <span>{this.state.post === 0 ? "是" : "否"}</span>
  905. </FormItem>
  906. </div>
  907. {this.state.post === 0 ? (
  908. <div>
  909. <div className="clearfix">
  910. <FormItem
  911. className="half-item"
  912. {...formItemLayout}
  913. label="收信人姓名"
  914. >
  915. <span>{this.state.addressee}</span>
  916. </FormItem>
  917. <FormItem
  918. className="half-item"
  919. {...formItemLayout}
  920. label="电话"
  921. >
  922. <span>{this.state.addresseeMobile}</span>
  923. </FormItem>
  924. </div>
  925. <div className="clearfix">
  926. <FormItem
  927. className="half-item"
  928. {...formItemLayout}
  929. label="省-市-区"
  930. >
  931. <span>
  932. {getprovince(this.state.addresseeProvince)}/
  933. {getprovince(this.state.addresseeCity)}/
  934. {getprovince(this.state.addresseeArea)}
  935. </span>
  936. </FormItem>
  937. </div>
  938. <div className="clearfix">
  939. <FormItem
  940. className="half-item"
  941. {...formItemLayout}
  942. label="详细地址"
  943. >
  944. <span>{this.state.recipientAddress}</span>
  945. </FormItem>
  946. </div>
  947. </div>
  948. ) : (
  949. ""
  950. )}
  951. <FormItem
  952. className="half-item"
  953. {...formItemLayout}
  954. label={
  955. <span>
  956. <strong style={{ color: "#f00" }}>*</strong>开票金额总计
  957. </span>
  958. }
  959. >
  960. <span>{this.state.alreadyAmount}万元</span>
  961. </FormItem>
  962. </div>
  963. </Spin>
  964. </Form>
  965. </Modal>
  966. <Modal
  967. visible={this.state.bvisible}
  968. footer=""
  969. title="开票历史记录"
  970. className="admin-desc-content"
  971. width="900px"
  972. onCancel={this.inRecordCanl}
  973. >
  974. <Spin spinning={this.state.loading}>
  975. <div className="patent-table">
  976. <Table
  977. columns={this.state.columnsDate}
  978. dataSource={this.state.recordData}
  979. pagination={false}
  980. />
  981. <div className="clearfix" style={{ marginTop: "20px" }}>
  982. <FormItem
  983. className="half-item"
  984. {...formItemLayout}
  985. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  986. >
  987. <span>{this.state.sum + "(万元)"}</span>
  988. </FormItem>
  989. </div>
  990. </div>
  991. </Spin>
  992. </Modal>
  993. <OrderDesc
  994. data={this.state.RowData}
  995. showDesc={this.state.showDesc}
  996. closeDesc={this.closeDesc.bind(this)}
  997. />
  998. </div>
  999. );
  1000. }
  1001. });
  1002. export default invoiceApplyList;