outInvoiceQuery.jsx 27 KB

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