invoiceApplyListWai.jsx 29 KB

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