outInvoiceQuery.jsx 28 KB

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