invoiceApplyListWai.jsx 30 KB

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