invoiceApplyListWai.jsx 29 KB

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