invoiceApplyList.jsx 28 KB

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