inSpecial.jsx 27 KB

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