outSpecial.jsx 28 KB

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