outInvoiceQuery.jsx 29 KB

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