invoiceApplyList.jsx 28 KB

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