outInvoiceQuery.jsx 28 KB

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