invoiceApplyListWai.jsx 28 KB

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