invoiceApplyListWai.jsx 28 KB

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