invoiceApplyListWai.jsx 28 KB

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