invoiceApplyListQuery.jsx 28 KB

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