outInvoiceQuery.jsx 31 KB

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