invoiceApplyListWai.jsx 29 KB

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