outInvoiceQuery.jsx 29 KB

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