shouKuang.jsx 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import "./shouKuan.less";
  6. import {
  7. Button,
  8. Form,
  9. Input,
  10. Spin,
  11. Table,
  12. Select,
  13. message,
  14. DatePicker,
  15. Modal,
  16. Tabs,
  17. Col
  18. } from "antd";
  19. import OrderDesc from "../orderDetail/orderDesc";
  20. import Receivable from "./receivable";
  21. import Assign from "@/manageCenter/publicComponent/assign";
  22. import ReactToPrint from "react-to-print";
  23. import {
  24. getLiquidationStatus,
  25. getProcessStatus,
  26. getApproval,
  27. getInvoiceStatus,
  28. getTransactionProject,
  29. getTaskStatus
  30. } from "@/tools";
  31. import { ChooseList } from "../../order/orderNew/chooseList"
  32. const FormItem = Form.Item;
  33. const { TabPane } = Tabs;
  34. const ShouKuang = React.createClass({
  35. departmentList() {
  36. this.setState({
  37. loading: true
  38. });
  39. $.ajax({
  40. method: "get",
  41. dataType: "json",
  42. crossDomain: false,
  43. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  44. data: {},
  45. success: function(data) {
  46. let thedata = data.data;
  47. let theArr = [];
  48. if (!thedata) {
  49. if (data.error && data.error.length) {
  50. message.warning(data.error[0].message);
  51. }
  52. } else {
  53. thedata.map(function(item, index) {
  54. theArr.push({
  55. key: index,
  56. name: item.name,
  57. id: item.id
  58. });
  59. });
  60. }
  61. this.setState({
  62. departmentArr: theArr
  63. });
  64. }.bind(this)
  65. }).always(
  66. function() {
  67. this.setState({
  68. loading: false
  69. });
  70. }.bind(this)
  71. );
  72. },
  73. loadData(pageNo,pageSize) {
  74. this.state.data = [];
  75. this.state.pagination.pageSize = 10
  76. this.setState({
  77. // selectedRowKeys: [],
  78. // selectedRowKey: [],
  79. page: pageNo,
  80. loading: true,
  81. pagination: this.state.pagination
  82. });
  83. $.ajax({
  84. method: "get",
  85. dataType: "json",
  86. crossDomain: false,
  87. url: globalConfig.context + "/api/admin/financial/financeList",
  88. data: {
  89. pageNo: pageNo || 1,
  90. pageSize: pageSize || this.state.pagination.pageSize,
  91. buyerName: this.state.nameSearch, //客户名称
  92. orderNo: this.state.orderNoSearch,
  93. startTime: this.state.releaseDate[0],
  94. endTime: this.state.releaseDate[1],
  95. startFinalReceivablesTime: this.state.shouKuanDate[0],
  96. endFinalReceivablesTime: this.state.shouKuanDate[1],
  97. departmentId: this.state.departmenttList,
  98. processStatus: this.state.processStatusSearch,
  99. contractNo: this.state.contractNoSearch,
  100. liquidationStatus: this.state.liquidationStatus
  101. },
  102. success: function(data) {
  103. let theArr = [];
  104. if (!data.data || !data.data.pagination.list) {
  105. if (data.error && data.error.length) {
  106. message.warning(data.error[0].message);
  107. }
  108. } else {
  109. for (let i = 0; i < data.data.pagination.list.length; i++) {
  110. let thisdata = data.data.pagination.list[i];
  111. theArr.push({
  112. key: thisdata.orderNo,
  113. orderNo: thisdata.orderNo,
  114. orderType: thisdata.orderType,
  115. orderStatus: thisdata.orderStatus,
  116. sellerName: thisdata.sellerName,
  117. processStatus: thisdata.processStatus,
  118. liquidationStatus: thisdata.liquidationStatus,
  119. approval: thisdata.approval,
  120. buyerName: thisdata.buyerName,
  121. actuallyTotalAmount: thisdata.actuallyTotalAmount,
  122. signTime: thisdata.signTime,
  123. companyId: thisdata.companyId,
  124. companyName: thisdata.companyName,
  125. buyerId: thisdata.buyerId,
  126. buyerName: thisdata.buyerName,
  127. contractNo: thisdata.contractNo,
  128. createTime: thisdata.createTime,
  129. departmentName: thisdata.departmentName,
  130. invoiceAmount: thisdata.invoiceAmount,
  131. finalReceivables: thisdata.finalReceivables,
  132. finalReceivablesTime: thisdata.finalReceivablesTime,
  133. signTotalAmount: thisdata.signTotalAmount,
  134. financeName: thisdata.financeName
  135. });
  136. }
  137. }
  138. this.state.pagination.current = data.data.pagination.pageNo;
  139. this.state.pagination.total = data.data.pagination.totalCount;
  140. if (
  141. data.data &&
  142. data.data.pagination.list &&
  143. !data.data.pagination.list.length
  144. ) {
  145. this.state.pagination.current = 0;
  146. this.state.pagination.total = 0;
  147. }
  148. this.setState({
  149. totalPage: data.data.pagination.totalPage,
  150. dataSource: theArr,
  151. pagination: this.state.pagination,
  152. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  153. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0
  154. });
  155. }.bind(this)
  156. }).always(
  157. function() {
  158. this.setState({
  159. loading: false
  160. });
  161. }.bind(this)
  162. );
  163. },
  164. getInitialState() {
  165. return {
  166. searchMore: true,
  167. dvisible: false,
  168. assignVisibleX: false,
  169. assignVisibleY: false,
  170. releaseDate: [],
  171. shouKuanDate: [],
  172. assignDataX: [],
  173. assignDataY: [],
  174. totalPage: 0,
  175. processStatusSearch: "3",
  176. boHuivisible: false,
  177. selectedRowKeys: [],
  178. selectedRows: [],
  179. loading: false,
  180. pagination: {
  181. defaultCurrent: 1,
  182. defaultPageSize: 10,
  183. showQuickJumper: true,
  184. pageSize: 10,
  185. onChange: function(page) {
  186. this.loadData(page);
  187. }.bind(this),
  188. showTotal: function(total) {
  189. return "共" + total + "条数据";
  190. }
  191. },
  192. // 子组件改变的表格title数组
  193. changeList: undefined,
  194. timeColumns: [
  195. {
  196. title: "序号",
  197. dataIndex: "key",
  198. key: "key"
  199. },
  200. {
  201. title: "合同编号",
  202. dataIndex: "contractNo",
  203. key: "contractNo"
  204. },
  205. {
  206. title: "订单编号",
  207. dataIndex: "orderNo",
  208. key: "orderNo"
  209. },
  210. {
  211. title: "客户名称",
  212. dataIndex: "userName",
  213. key: "userName"
  214. },
  215. {
  216. title: "项目负责人",
  217. dataIndex: "receiverName",
  218. key: "receiverName"
  219. },
  220. {
  221. title: "项目类别",
  222. dataIndex: "cname",
  223. key: "cname"
  224. },
  225. {
  226. title: "项目编号",
  227. dataIndex: "id",
  228. key: "id"
  229. },
  230. {
  231. title: "项目名称",
  232. dataIndex: "taskName",
  233. key: "taskName"
  234. },
  235. {
  236. title: "项目状态",
  237. dataIndex: "taskStatus",
  238. key: "taskStatus",
  239. render: text => {
  240. return getTaskStatus(text);
  241. }
  242. },
  243. {
  244. title: "工时",
  245. dataIndex: "hours",
  246. key: "hours"
  247. },
  248. {
  249. title: "分配时间",
  250. dataIndex: "taskDistributionTime",
  251. key: "taskDistributionTime"
  252. },
  253. {
  254. title: "完成时间",
  255. dataIndex: "taskEndTime",
  256. key: "taskEndTime"
  257. }
  258. ],
  259. printColumns: [
  260. {
  261. title: "合同编号",
  262. dataIndex: "contractNo",
  263. key: "contractNo"
  264. },
  265. {
  266. title: "订单编号",
  267. dataIndex: "orderNo",
  268. key: "orderNo"
  269. // fixed: "left"
  270. },
  271. {
  272. title: "客户名称",
  273. dataIndex: "buyerName",
  274. key: "buyerName"
  275. },
  276. {
  277. title: "订单部门",
  278. dataIndex: "departmentName",
  279. key: "departmentName"
  280. },
  281. {
  282. title: "订单负责人",
  283. dataIndex: "sellerName",
  284. key: "sellerName"
  285. },
  286. {
  287. title: "签单日期",
  288. dataIndex: "signTime",
  289. key: "signTime"
  290. },
  291. {
  292. title: "下单日期",
  293. dataIndex: "createTime",
  294. key: "createTime"
  295. },
  296. {
  297. title: "签单金额(万元)",
  298. dataIndex: "signTotalAmount",
  299. key: "signTotalAmount"
  300. },
  301. {
  302. title: "开票金额(万元)",
  303. dataIndex: "invoiceAmount",
  304. key: "invoiceAmount"
  305. },
  306. {
  307. title: "已收款(万元)",
  308. dataIndex: "actuallyTotalAmount",
  309. key: "actuallyTotalAmount"
  310. },
  311. {
  312. title: "最近收款(万元)",
  313. dataIndex: "finalReceivables",
  314. key: "finalReceivables"
  315. },
  316. {
  317. title: "最近收款时间",
  318. dataIndex: "finalReceivablesTime",
  319. key: "finalReceivablesTime"
  320. },
  321. {
  322. title: "结算状态",
  323. dataIndex: "liquidationStatus",
  324. key: "liquidationStatus",
  325. render: text => {
  326. return getLiquidationStatus(text);
  327. }
  328. },
  329. {
  330. title: "流程状态",
  331. dataIndex: "processStatus",
  332. key: "processStatus",
  333. render: text => {
  334. return getProcessStatus(text);
  335. }
  336. },
  337. {
  338. title: "特批状态",
  339. dataIndex: "approval",
  340. key: "approval",
  341. render: text => {
  342. return getApproval(text);
  343. }
  344. }
  345. ],
  346. columns: [
  347. {
  348. title: "合同编号",
  349. dataIndex: "contractNo",
  350. key: "contractNo",
  351. className: "title-table"
  352. },
  353. {
  354. title: "订单编号",
  355. dataIndex: "orderNo",
  356. key: "orderNo",
  357. className: "title-table"
  358. // fixed: "left"
  359. },
  360. {
  361. title: "客户名称",
  362. dataIndex: "buyerName",
  363. key: "buyerName",
  364. className: "title-table"
  365. },
  366. {
  367. title: "订单部门",
  368. dataIndex: "departmentName",
  369. key: "departmentName",
  370. className: "title-table"
  371. },
  372. {
  373. title: "订单负责人",
  374. dataIndex: "sellerName",
  375. key: "sellerName",
  376. className: "title-table"
  377. },
  378. {
  379. title: "财务负责人",
  380. dataIndex: "financeName",
  381. key: "financeName",
  382. className: "title-table"
  383. },
  384. {
  385. title: "签单日期",
  386. dataIndex: "signTime",
  387. key: "signTime",
  388. className: "title-table"
  389. },
  390. {
  391. title: "下单日期",
  392. dataIndex: "createTime",
  393. key: "createTime",
  394. className: "title-table"
  395. },
  396. {
  397. title: "签单金额(万元)",
  398. dataIndex: "signTotalAmount",
  399. key: "signTotalAmount",
  400. className: "title-table"
  401. },
  402. {
  403. title: "开票金额(万元)",
  404. dataIndex: "invoiceAmount",
  405. key: "invoiceAmount",
  406. className: "title-table"
  407. },
  408. {
  409. title: "已收款(万元)",
  410. dataIndex: "actuallyTotalAmount",
  411. key: "actuallyTotalAmount",
  412. className: "title-table"
  413. },
  414. {
  415. title: "最近收款(万元)",
  416. dataIndex: "finalReceivables",
  417. key: "finalReceivables",
  418. className: "title-table"
  419. },
  420. {
  421. title: "最近收款时间",
  422. dataIndex: "finalReceivablesTime",
  423. key: "finalReceivablesTime",
  424. className: "title-table"
  425. },
  426. {
  427. title: "结算状态",
  428. dataIndex: "liquidationStatus",
  429. key: "liquidationStatus",
  430. className: "title-table",
  431. render: text => {
  432. return getLiquidationStatus(text);
  433. }
  434. },
  435. {
  436. title: "流程状态",
  437. dataIndex: "processStatus",
  438. key: "processStatus",
  439. className: "title-table",
  440. render: text => {
  441. return getProcessStatus(text);
  442. }
  443. },
  444. {
  445. title: "特批状态",
  446. dataIndex: "approval",
  447. key: "approval",
  448. className: "title-table",
  449. render: text => {
  450. return getApproval(text);
  451. }
  452. },
  453. // {
  454. // title: '订单状态',
  455. // dataIndex: 'orderStatus',
  456. // key: 'orderStatus',
  457. // render: text => { return getNewOrderStatus(text)}
  458. // },
  459. {
  460. title: "操作",
  461. dataIndex: "caozuo",
  462. key: "caouzo",
  463. className: "title-table",
  464. render: (text, recard) => {
  465. return (
  466. <div>
  467. {recard.liquidationStatus < 2 &&
  468. (recard.approval === 1 || recard.approval === 2) ? (
  469. <Button
  470. style={{ background: "rgb(192,192,192)" }}
  471. onClick={e => {
  472. e.stopPropagation(), this.evaluateX(recard);
  473. }}
  474. >
  475. 收款
  476. </Button>
  477. ) : (
  478. <Button
  479. type="primary"
  480. onClick={e => {
  481. e.stopPropagation(), this.evaluateX(recard);
  482. }}
  483. >
  484. 收款
  485. </Button>
  486. )}
  487. {recard.processStatus < 4 ? (
  488. <Button
  489. type="primary"
  490. onClick={e => {
  491. e.stopPropagation(), this.evaluateZ(recard);
  492. }}
  493. style={{ marginLeft: "5px" }}
  494. >
  495. 通过
  496. </Button>
  497. ) : (
  498. ""
  499. )}
  500. {!(
  501. recard.actuallyTotalAmount &&
  502. Number(recard.actuallyTotalAmount) > 0
  503. ) && (
  504. <Button
  505. type="danger"
  506. style={{ marginLeft: "5px" }}
  507. onClick={e => {
  508. e.stopPropagation(), this.reject(recard);
  509. }}
  510. >
  511. 驳回
  512. </Button>
  513. )}
  514. {
  515. // <Button
  516. // type="primary"
  517. // style={{ marginLeft: "5px" }}
  518. // onClick={e => {
  519. // e.stopPropagation(), this.evaluateY(recard, "财务专员");
  520. // console.log(recard);
  521. // }}
  522. // >
  523. // 转交
  524. // </Button>
  525. }
  526. </div>
  527. );
  528. }
  529. }
  530. ],
  531. dataSource: [],
  532. searchTime: [],
  533. columnsDate: [
  534. {
  535. title: "编号",
  536. dataIndex: "id",
  537. key: "id"
  538. },
  539. {
  540. title: "订单编号",
  541. dataIndex: "orderno",
  542. key: "orderno"
  543. },
  544. {
  545. title: "开票金额(万元)",
  546. dataIndex: "amount",
  547. key: "amount"
  548. },
  549. {
  550. title: "申请时间",
  551. dataIndex: "createTime",
  552. key: "createTime"
  553. },
  554. {
  555. title: "开票状态",
  556. dataIndex: "status",
  557. key: "status",
  558. render: text => {
  559. return getInvoiceStatus(text);
  560. }
  561. }
  562. ],
  563. waterlistDate: [
  564. {
  565. title: "订单编号",
  566. dataIndex: "orderNo",
  567. key: "orderNo"
  568. },
  569. {
  570. title: "平台流水号",
  571. dataIndex: "billNo",
  572. key: "billNo"
  573. // fixed: "left"
  574. },
  575. {
  576. title: "收款金额(万元)",
  577. dataIndex: "transactionAmount",
  578. key: "transactionAmount"
  579. },
  580. {
  581. title: "收款方",
  582. dataIndex: "payeeName",
  583. key: "payeeName"
  584. },
  585. {
  586. title: "付款方",
  587. dataIndex: "payerName",
  588. key: "payerName"
  589. },
  590. {
  591. title: "流水科目",
  592. dataIndex: "transactionSubject",
  593. key: "transactionSubject",
  594. render: text => {
  595. return getTransactionProject(text);
  596. }
  597. },
  598. {
  599. title: "收款类型",
  600. dataIndex: "type",
  601. key: "type"
  602. },
  603. {
  604. title: "财务流水时间",
  605. dataIndex: "financialPayTimes",
  606. key: "financialPayTimes"
  607. },
  608. {
  609. title: "财务流水号",
  610. dataIndex: "financialPayNo",
  611. key: "financialPayNo"
  612. },
  613. {
  614. title: "订单负责人",
  615. dataIndex: "saleName",
  616. key: "saleName"
  617. },
  618. {
  619. title: "创建时间",
  620. dataIndex: "createTimes",
  621. key: "createTimes"
  622. }
  623. ],
  624. waterData: []
  625. };
  626. },
  627. // 特批通过
  628. evaluateZ(record) {
  629. $.ajax({
  630. method: "POST",
  631. dataType: "json",
  632. crossDomain: false,
  633. url: globalConfig.context + "/api/admin/financial/financeApproval",
  634. data: {
  635. orderNo: record.orderNo
  636. }
  637. }).done(
  638. function(data) {
  639. if (!data.error.length) {
  640. message.success("通过成功!");
  641. this.setState({
  642. loading: false
  643. });
  644. this.loadData();
  645. } else {
  646. message.warning(data.error[0].message);
  647. }
  648. }.bind(this)
  649. );
  650. },
  651. /* 收款 */
  652. evaluateX(recard) {
  653. this.state.assignDataX = recard;
  654. this.setState({
  655. assignVisibleX: true
  656. });
  657. },
  658. /* 转交 */
  659. evaluateY(recard, nub) {
  660. this.state.assignDataY = recard;
  661. this.setState({
  662. nub,
  663. assignVisibleY: true
  664. });
  665. },
  666. /* 驳回 */
  667. reject(recard) {
  668. this.setState({
  669. bohuiData: recard,
  670. boHuiVisible: true,
  671. content: ""
  672. });
  673. },
  674. boHuiOk() {
  675. this.setState({
  676. boHuiVisible: false
  677. });
  678. if (
  679. this.state.pagination.current == this.state.totalPage &&
  680. this.state.pagination.total % 10 == 1
  681. ) {
  682. this.loadData(this.state.page - 1);
  683. } else {
  684. this.loadData(this.state.page);
  685. }
  686. },
  687. boHuiCancel() {
  688. this.setState({
  689. boHuiVisible: false
  690. });
  691. },
  692. componentWillMount() {
  693. this.loadData();
  694. this.departmentList();
  695. },
  696. tableRowClick(record) {
  697. this.state.RowData = record;
  698. this.setState({
  699. showDesc: true
  700. });
  701. },
  702. closeDesc(e, s) {
  703. this.state.showDesc = e;
  704. if (s) {
  705. this.loadData(this.state.page);
  706. }
  707. },
  708. closeAssignX(e, s) {
  709. this.state.assignDataX = {};
  710. this.state.assignVisibleX = e;
  711. if (s) {
  712. this.loadData(this.state.page);
  713. }
  714. },
  715. closeAssignY(e, s) {
  716. this.state.assignDataY = {};
  717. this.state.assignVisibleY = e;
  718. if (s) {
  719. this.loadData(this.state.page);
  720. }
  721. },
  722. search() {
  723. this.loadData();
  724. },
  725. reset() {
  726. this.state.nameSearch = "";
  727. this.state.releaseDate = [];
  728. this.state.shouKuanDate = [];
  729. this.state.orderNoSearch = "";
  730. this.state.departmenttList = undefined;
  731. this.state.processStatus = [];
  732. this.state.contractNoSearch = "";
  733. this.loadData();
  734. },
  735. //驳回
  736. boHuiSubmit(e) {
  737. e.preventDefault();
  738. if (!this.state.content) {
  739. message.warning("请填写驳回原因");
  740. return false;
  741. }
  742. this.setState({
  743. loading: true
  744. });
  745. $.ajax({
  746. method: "POST",
  747. dataType: "json",
  748. crossDomain: false,
  749. url: globalConfig.context + "/api/admin/financial/reject",
  750. data: {
  751. orderNo: this.state.bohuiData.orderNo,
  752. reason: this.state.content
  753. }
  754. }).done(
  755. function(data) {
  756. if (!data.error.length) {
  757. message.success("驳回成功!");
  758. this.setState({
  759. loading: false
  760. });
  761. this.boHuiOk();
  762. } else {
  763. message.warning(data.error[0].message);
  764. }
  765. }.bind(this)
  766. );
  767. },
  768. searchSwitch() {
  769. this.setState({
  770. searchMore: !this.state.searchMore
  771. });
  772. },
  773. changeList(arr) {
  774. const newArr = [];
  775. this.state.columns.forEach(item => {
  776. arr.forEach(val => {
  777. if (val === item.title) {
  778. newArr.push(item);
  779. }
  780. });
  781. });
  782. this.setState({
  783. changeList: newArr
  784. });
  785. },
  786. callback(key) {
  787. console.log(key);
  788. },
  789. onSelectChange(selectedRowKeys) {
  790. // for(var i=0; i<selectedRowKeys.length; i++){
  791. // for(var j=i+1; j<selectedRowKeys.length; j++){
  792. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  793. // selectedRowKeys.splice(j,1);
  794. // j--;
  795. // }
  796. // }
  797. // }
  798. this.setState({ selectedRowKeys });
  799. },
  800. inRecordCanl() {
  801. this.setState({
  802. bvisible: false
  803. });
  804. },
  805. inRecordData() {
  806. this.setState({
  807. loading: true
  808. });
  809. $.ajax({
  810. method: "get",
  811. dataType: "json",
  812. crossDomain: false,
  813. url:
  814. globalConfig.context +
  815. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  816. data: {
  817. orderNo: this.state.selectedRowKeys[0],
  818. pageSize: 9999
  819. },
  820. success: function(data) {
  821. let theArr = [];
  822. let sum = 0;
  823. if (!data.data) {
  824. if (data.error && data.error.length) {
  825. message.warning(data.error[0].message);
  826. }
  827. } else {
  828. for (let i = 0; i < data.data.list.length; i++) {
  829. let thisdata = data.data.list[i];
  830. sum += parseFloat(thisdata.amount);
  831. theArr.push({
  832. id: thisdata.id,
  833. orderno: thisdata.orderno, //订单编号
  834. amount: thisdata.amount, //签单金额
  835. createTime: thisdata.createTime, //流程状态
  836. status: thisdata.status, //结算状态
  837. rejectReason: thisdata.rejectReason
  838. });
  839. }
  840. }
  841. this.setState({
  842. recordData: theArr,
  843. sum: sum.toFixed(4)
  844. });
  845. }.bind(this)
  846. }).done(
  847. function() {
  848. this.setState({
  849. loading: false
  850. });
  851. }.bind(this)
  852. );
  853. },
  854. waterData() {
  855. this.state.data = [];
  856. this.setState({
  857. loading: true
  858. });
  859. $.ajax({
  860. method: "get",
  861. dataType: "json",
  862. crossDomain: false,
  863. url: globalConfig.context + "/api/admin/financial/myBillList",
  864. data: {
  865. orderNo: this.state.selectedRowKeys[0],
  866. pageSize: 9999
  867. },
  868. success: function(data) {
  869. let theArr = [];
  870. let waterSum = 0;
  871. if (!data.data || !data.data.list) {
  872. if (data.error && data.error.length) {
  873. message.warning(data.error[0].message);
  874. }
  875. } else {
  876. for (let i = 0; i < data.data.list.length; i++) {
  877. let thisdata = data.data.list[i];
  878. waterSum += parseFloat(thisdata.transactionAmount);
  879. theArr.push({
  880. key: i,
  881. orderNo: thisdata.orderNo,
  882. billNo: thisdata.billNo,
  883. transactionAmount: thisdata.transactionAmount,
  884. payeeName: thisdata.payeeName,
  885. payerName: thisdata.payerName,
  886. transactionSubject: thisdata.transactionSubject,
  887. transactionChannel: thisdata.transactionChannel,
  888. financialPayTimes: thisdata.financialPayTimes,
  889. financialPayNo: thisdata.financialPayNo,
  890. createrName: thisdata.createrName,
  891. saleName: thisdata.saleName,
  892. createTimes: thisdata.createTimes,
  893. type: thisdata.type == 0 ? "手工" : "批量"
  894. });
  895. }
  896. }
  897. this.setState({
  898. waterData: theArr,
  899. waterSum: (Math.round(waterSum* 10000) / 10000).toFixed(4)
  900. });
  901. }.bind(this)
  902. }).always(
  903. function() {
  904. this.setState({
  905. loading: false
  906. });
  907. }.bind(this)
  908. );
  909. },
  910. waterCanl() {
  911. this.setState({
  912. cvisible: false
  913. });
  914. },
  915. exportKaip() {
  916. window.location.href =
  917. globalConfig.context +
  918. "/api/admin/receivables/exportInvoice?" +
  919. `orderNo=${this.state.selectedRowKeys}`;
  920. },
  921. exportAll() {
  922. window.location.href =
  923. globalConfig.context +
  924. "/api/admin/receivables/exportReceivables?" +
  925. `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""}&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""}&departmentId=${this.state.departmenttList ? this.state.departmenttList : ""}&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""}&processStatus=${this.state.processStatusSearch}`;
  926. },
  927. exportWater() {
  928. window.location.href =
  929. globalConfig.context +
  930. "/api/admin/receivables/exportMyBill?" +
  931. `orderNo=${this.state.selectedRowKeys}`;
  932. },
  933. printAll() {
  934. this.setState({
  935. dvisible: true,
  936. });
  937. this.loadData(1,9999)
  938. },
  939. timeData() {
  940. this.setState({
  941. loading: true
  942. });
  943. $.ajax({
  944. method: "get",
  945. dataType: "json",
  946. crossDomain: false,
  947. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  948. data: {
  949. orderNo: this.state.selectedRowKeys[0],
  950. pageSize: 9999
  951. },
  952. success: function(data) {
  953. let theArr = [];
  954. if (!data.data || !data.data.list) {
  955. if (data.error && data.error.length) {
  956. message.warning(data.error[0].message);
  957. }
  958. } else {
  959. for (let i = 0; i < data.data.list.length; i++) {
  960. let thisdata = data.data.list[i];
  961. theArr.push({
  962. key: i + 1,
  963. orderNo: thisdata.orderNo,
  964. contractNo: thisdata.contractNo,
  965. userName: thisdata.userName,
  966. receiverName: thisdata.receiverName,
  967. taskStatus: thisdata.taskStatus,
  968. cname: thisdata.cname,
  969. id: thisdata.id,
  970. taskName: thisdata.taskName,
  971. hours: thisdata.hours,
  972. taskDistributionTime: thisdata.taskDistributionTime,
  973. taskEndTime: thisdata.taskEndTime,
  974. });
  975. }
  976. }
  977. this.setState({
  978. timeDataList: theArr
  979. });
  980. }.bind(this)
  981. }).always(
  982. function() {
  983. this.setState({
  984. loading: false
  985. });
  986. }.bind(this)
  987. );
  988. },
  989. render() {
  990. const formItemLayout = {
  991. labelCol: { span: 8 },
  992. wrapperCol: { span: 14 }
  993. };
  994. const { RangePicker } = DatePicker;
  995. var departmentArr = this.state.departmentArr || [];
  996. const { loading, selectedRowKeys, visible } = this.state;
  997. const rowSelection = {
  998. selectedRowKeys,
  999. onChange: this.onSelectChange,
  1000. hideDefaultSelections: true,
  1001. type: "radio"
  1002. };
  1003. return (
  1004. <div className="user-content">
  1005. <div className="content-title" style={{ marginBottom: 10 }}>
  1006. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1007. </div>
  1008. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1009. <TabPane tab="更改表格显示数据" key="1">
  1010. <div style={{ marginLeft: 10 }}>
  1011. <ChooseList
  1012. columns={this.state.columns}
  1013. changeFn={this.changeList}
  1014. changeList={this.state.changeList}
  1015. top={55}
  1016. margin={11}
  1017. />
  1018. </div>
  1019. </TabPane>
  1020. <TabPane tab="搜索" key="2">
  1021. <div className="user-search" style={{ marginLeft: 10 }}>
  1022. <Input
  1023. placeholder="订单编号"
  1024. value={this.state.orderNoSearch}
  1025. onChange={e => {
  1026. this.setState({ orderNoSearch: e.target.value });
  1027. }}
  1028. />
  1029. <Input
  1030. placeholder="客户名称"
  1031. value={this.state.nameSearch}
  1032. onChange={e => {
  1033. this.setState({ nameSearch: e.target.value });
  1034. }}
  1035. />
  1036. <Select
  1037. placeholder="订单部门"
  1038. style={{ width: 150, marginRight: 10 }}
  1039. value={this.state.departmenttList}
  1040. onChange={e => {
  1041. this.setState({ departmenttList: e });
  1042. }}
  1043. >
  1044. {departmentArr.map(function(item) {
  1045. return (
  1046. <Select.Option key={item.id}>{item.name}</Select.Option>
  1047. );
  1048. })}
  1049. </Select>
  1050. <Input
  1051. placeholder="合同编号"
  1052. value={this.state.contractNoSearch}
  1053. onChange={e => {
  1054. this.setState({
  1055. contractNoSearch: e.target.value
  1056. });
  1057. }}
  1058. />
  1059. <Select
  1060. placeholder="流程状态"
  1061. onChange={e => {
  1062. this.setState({ processStatusSearch: e });
  1063. }}
  1064. style={{ width: 160, marginRight: 5 }}
  1065. value={this.state.processStatusSearch}
  1066. >
  1067. <Option value="3">未分配</Option>
  1068. <Option value="4">已分配</Option>
  1069. </Select>
  1070. <Select
  1071. placeholder="结算状态"
  1072. onChange={e => {
  1073. this.setState({ liquidationStatus: e });
  1074. }}
  1075. style={{ width: 160, marginRight: 5 }}
  1076. value={this.state.liquidationStatus}
  1077. >
  1078. <Option value="0">首付待付清</Option>
  1079. <Option value="1">尾款待付清</Option>
  1080. <Option value="2">已付清</Option>
  1081. </Select>
  1082. <span style={{}}>下单日期:</span>
  1083. <RangePicker
  1084. value={[
  1085. this.state.releaseDate[0]
  1086. ? moment(this.state.releaseDate[0])
  1087. : null,
  1088. this.state.releaseDate[1]
  1089. ? moment(this.state.releaseDate[1])
  1090. : null
  1091. ]}
  1092. onChange={(data, dataString) => {
  1093. this.setState({ releaseDate: dataString });
  1094. }}
  1095. />
  1096. <span style={{}}>最近收款:</span>
  1097. <RangePicker
  1098. value={[
  1099. this.state.shouKuanDate[0]
  1100. ? moment(this.state.shouKuanDate[0])
  1101. : null,
  1102. this.state.shouKuanDate[1]
  1103. ? moment(this.state.shouKuanDate[1])
  1104. : null
  1105. ]}
  1106. onChange={(data, dataString) => {
  1107. this.setState({ shouKuanDate: dataString });
  1108. }}
  1109. />
  1110. <Button
  1111. type="primary"
  1112. onClick={this.search}
  1113. style={{ marginLeft: 10 }}
  1114. >
  1115. 搜索
  1116. </Button>
  1117. <Button onClick={this.reset}>重置</Button>
  1118. </div>
  1119. </TabPane>
  1120. <TabPane tab="打印" key="3">
  1121. <Button
  1122. type="primary"
  1123. style={{ margin: "11px 0px 10px 10px" }}
  1124. onClick={this.printAll}
  1125. disabled={!this.state.dataSource.length}
  1126. >
  1127. 打印所有列表信息
  1128. </Button>
  1129. <Button
  1130. type="primary"
  1131. disabled={this.state.selectedRowKeys.length != 1}
  1132. style={{ margin: "11px 0px 10px 10px" }}
  1133. onClick={() => {
  1134. this.inRecordData();
  1135. this.setState({
  1136. bvisible: true
  1137. });
  1138. }}
  1139. >
  1140. 打印开票详情
  1141. </Button>
  1142. <Button
  1143. type="primary"
  1144. disabled={this.state.selectedRowKeys.length != 1}
  1145. style={{ margin: "11px 0px 10px 10px" }}
  1146. onClick={() => {
  1147. this.waterData();
  1148. this.setState({
  1149. cvisible: true
  1150. });
  1151. }}
  1152. >
  1153. 打印收款流水
  1154. </Button>
  1155. <Button
  1156. type="primary"
  1157. disabled={this.state.selectedRowKeys.length != 1}
  1158. style={{ margin: "11px 0px 10px 10px" }}
  1159. onClick={() => {
  1160. this.timeData();
  1161. this.setState({
  1162. timeVisible: true
  1163. });
  1164. }}
  1165. >
  1166. 打印工时信息
  1167. </Button>
  1168. <Button
  1169. type="primary"
  1170. disabled={this.state.selectedRowKeys.length != 1}
  1171. style={{ margin: "11px 0px 10px 10px" }}
  1172. onClick={() => {
  1173. this.waterData();
  1174. this.setState({
  1175. cuiVisible: true
  1176. });
  1177. }}
  1178. >
  1179. 打印催款信息
  1180. </Button>
  1181. <Button
  1182. type="primary"
  1183. disabled={this.state.selectedRowKeys.length != 1}
  1184. style={{ margin: "11px 0px 10px 10px" }}
  1185. onClick={() => {
  1186. this.waterData();
  1187. this.setState({
  1188. proVisible: true
  1189. });
  1190. }}
  1191. >
  1192. 打印项目信息
  1193. </Button>
  1194. </TabPane>
  1195. <TabPane tab="导出Excel" key="4">
  1196. <Button
  1197. type="primary"
  1198. style={{ margin: "11px 0px 10px 10px" }}
  1199. onClick={this.exportAll}
  1200. >
  1201. 导出当前列表
  1202. </Button>
  1203. <Button
  1204. type="primary"
  1205. disabled={this.state.selectedRowKeys.length != 1}
  1206. style={{ margin: "11px 0px 10px 10px" }}
  1207. onClick={this.exportKaip}
  1208. >
  1209. 导出所选开票详情
  1210. </Button>
  1211. <Button
  1212. type="primary"
  1213. disabled={this.state.selectedRowKeys.length != 1}
  1214. style={{ margin: "11px 0px 10px 10px" }}
  1215. onClick={this.exportWater}
  1216. >
  1217. 导出所选收款详情流水
  1218. </Button>
  1219. </TabPane>
  1220. <TabPane tab="查看" key="5">
  1221. <Button
  1222. type="primary"
  1223. disabled={this.state.selectedRowKeys.length != 1}
  1224. style={{ margin: "11px 0px 10px 10px" }}
  1225. onClick={() => {
  1226. this.inRecordData();
  1227. this.setState({
  1228. bvisible: true
  1229. });
  1230. }}
  1231. >
  1232. 查看开票详情
  1233. </Button>
  1234. <Button
  1235. type="primary"
  1236. disabled={this.state.selectedRowKeys.length != 1}
  1237. style={{ margin: "11px 0px 10px 10px" }}
  1238. onClick={() => {
  1239. this.waterData();
  1240. this.setState({
  1241. cvisible: true
  1242. });
  1243. }}
  1244. >
  1245. 详情收款流水
  1246. </Button>
  1247. </TabPane>
  1248. {/* <TabPane tab="批量操作" key="6">
  1249. <Button
  1250. type="primary"
  1251. disabled={this.state.selectedRowKeys.length == 0}
  1252. style={{ margin: "0px 0px 10px 10px" }}
  1253. onClick={e => {
  1254. e.stopPropagation(),
  1255. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1256. }}
  1257. >
  1258. 转交
  1259. </Button>
  1260. </TabPane> */}
  1261. </Tabs>
  1262. <div className="patent-table">
  1263. <Spin spinning={this.state.loading}>
  1264. <Table
  1265. bordered
  1266. columns={
  1267. this.state.changeList == undefined
  1268. ? this.state.columns
  1269. : this.state.changeList
  1270. }
  1271. dataSource={this.state.dataSource}
  1272. rowSelection={rowSelection}
  1273. scroll={{ x: "max-content", y: 0 }}
  1274. pagination={this.state.pagination}
  1275. onRowDoubleClick={this.tableRowClick.bind(this)}
  1276. size="small"
  1277. />
  1278. </Spin>
  1279. <p
  1280. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  1281. >
  1282. {
  1283. <span style={{ marginRight: 10 }}>
  1284. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  1285. </span>
  1286. }
  1287. {
  1288. <span>
  1289. {`合同额总计(万元):${
  1290. this.state.totalHui ? this.state.totalHui : "0"
  1291. }`}
  1292. </span>
  1293. }
  1294. </p>
  1295. </div>
  1296. <Assign
  1297. title="任务"
  1298. selApi={"/api/admin/newOrder/updateFinance"}
  1299. data={this.state.assignDataY}
  1300. showDesc={this.state.assignVisibleY}
  1301. closeDesc={this.closeAssignY.bind(this)}
  1302. // fenpaiData={8}
  1303. specially={0}
  1304. roleName={this.state.nub}
  1305. requestMethod={"get"}
  1306. />
  1307. <OrderDesc
  1308. data={this.state.RowData}
  1309. showDesc={this.state.showDesc}
  1310. closeDesc={this.closeDesc.bind(this)}
  1311. />
  1312. <Receivable
  1313. title="收款记录"
  1314. api="/api/admin/financial/addReceiptsFlow"
  1315. data={this.state.assignDataX}
  1316. showDesc={this.state.assignVisibleX}
  1317. closeDesc={this.closeAssignX.bind(this)}
  1318. />
  1319. <Modal
  1320. visible={this.state.boHuiVisible}
  1321. width="400px"
  1322. title="驳回备注"
  1323. footer=""
  1324. onOk={this.boHuiOk}
  1325. onCancel={this.boHuiCancel}
  1326. >
  1327. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1328. <Spin spinning={this.state.loading}>
  1329. <FormItem
  1330. labelCol={{ span: 5 }}
  1331. wrapperCol={{ span: 16 }}
  1332. label={
  1333. <span>
  1334. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1335. </span>
  1336. }
  1337. >
  1338. <Input
  1339. type="textarea"
  1340. rows={4}
  1341. placeholder="请输入驳回原因"
  1342. value={this.state.content}
  1343. onChange={e => {
  1344. this.setState({ content: e.target.value });
  1345. }}
  1346. />
  1347. </FormItem>
  1348. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1349. <Button
  1350. type="primary"
  1351. htmlType="submit"
  1352. style={{ marginRight: 20 }}
  1353. >
  1354. 驳回
  1355. </Button>
  1356. <Button
  1357. type="default"
  1358. onClick={() => {
  1359. this.boHuiCancel();
  1360. }}
  1361. >
  1362. 取消
  1363. </Button>
  1364. </FormItem>
  1365. </Spin>
  1366. </Form>
  1367. </Modal>
  1368. <Modal
  1369. visible={this.state.bvisible}
  1370. footer=""
  1371. title="开票历史记录"
  1372. className="admin-desc-content"
  1373. width="900px"
  1374. onCancel={this.inRecordCanl}
  1375. >
  1376. <Spin spinning={this.state.loading}>
  1377. <div
  1378. className="patent-table"
  1379. ref={e => {
  1380. this.refs.kaiPiao = e;
  1381. }}
  1382. >
  1383. <Table
  1384. columns={this.state.columnsDate}
  1385. dataSource={this.state.recordData}
  1386. pagination={false}
  1387. bordered
  1388. />
  1389. <div className="clearfix" style={{ marginTop: "20px" }}>
  1390. <FormItem
  1391. className="half-item"
  1392. {...formItemLayout}
  1393. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1394. >
  1395. <span>{this.state.sum + "(万元)"}</span>
  1396. </FormItem>
  1397. </div>
  1398. <ReactToPrint
  1399. trigger={() => (
  1400. <Button
  1401. type="primary"
  1402. style={{
  1403. float: "right",
  1404. // marginTop: 10,
  1405. position: "absolute",
  1406. top: -54,
  1407. right: 30
  1408. }}
  1409. >
  1410. 打印
  1411. </Button>
  1412. )}
  1413. content={() => this.refs.kaiPiao}
  1414. />
  1415. </div>
  1416. </Spin>
  1417. </Modal>
  1418. <Modal
  1419. visible={this.state.cvisible}
  1420. footer=""
  1421. title="详细收款流水"
  1422. className="admin-desc-content"
  1423. width="1300px"
  1424. onCancel={this.waterCanl}
  1425. >
  1426. <Spin spinning={this.state.loading}>
  1427. <div
  1428. className="patent-table"
  1429. ref={e => {
  1430. this.refs.shouKuan = e;
  1431. }}
  1432. >
  1433. <Table
  1434. columns={this.state.waterlistDate}
  1435. dataSource={this.state.waterData}
  1436. pagination={false}
  1437. bordered
  1438. />
  1439. <div className="clearfix" style={{ marginTop: "20px" }}>
  1440. <FormItem
  1441. className="half-item"
  1442. {...formItemLayout}
  1443. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  1444. >
  1445. <span>{this.state.waterSum + "(万元)"}</span>
  1446. </FormItem>
  1447. </div>
  1448. <ReactToPrint
  1449. trigger={() => (
  1450. <Button
  1451. type="primary"
  1452. style={{
  1453. float: "right",
  1454. position: "absolute",
  1455. top: -54,
  1456. right: 30
  1457. }}
  1458. >
  1459. 打印
  1460. </Button>
  1461. )}
  1462. content={() => this.refs.shouKuan}
  1463. />
  1464. </div>
  1465. </Spin>
  1466. </Modal>
  1467. <Modal
  1468. visible={this.state.dvisible}
  1469. footer=""
  1470. title="所有列表信息"
  1471. className="admin-desc-content"
  1472. width="1300px"
  1473. onCancel={() => {
  1474. this.loadData();
  1475. this.setState({
  1476. dvisible: false
  1477. });
  1478. }}
  1479. >
  1480. <Spin spinning={this.state.loading}>
  1481. <div
  1482. className="patent-table"
  1483. style={{
  1484. // width: 900,
  1485. // position: "relative",
  1486. // left: "50%",
  1487. // transform: "translate(-50%)",
  1488. padding: "25px 0 30px 30px"
  1489. }}
  1490. ref={e => {
  1491. this.refs.all = e;
  1492. }}
  1493. >
  1494. <Table
  1495. columns={this.state.printColumns}
  1496. dataSource={this.state.dataSource}
  1497. pagination={false}
  1498. bordered
  1499. size="small"
  1500. />
  1501. </div>
  1502. </Spin>
  1503. <ReactToPrint
  1504. trigger={() => (
  1505. <Button
  1506. type="primary"
  1507. style={{
  1508. float: "right",
  1509. marginTop: 10,
  1510. position: "absolute",
  1511. top: 0,
  1512. right: 30
  1513. }}
  1514. >
  1515. 打印
  1516. </Button>
  1517. )}
  1518. content={() => this.refs.all}
  1519. />
  1520. </Modal>
  1521. <Modal
  1522. visible={this.state.timeVisible}
  1523. footer=""
  1524. title="工时详情"
  1525. className="admin-desc-content"
  1526. width="1300px"
  1527. pagination={false}
  1528. onCancel={() => {
  1529. this.loadData();
  1530. this.setState({
  1531. timeVisible: false
  1532. });
  1533. }}
  1534. >
  1535. <Spin spinning={this.state.loading}>
  1536. <div
  1537. className="patent-table"
  1538. style={
  1539. {
  1540. // width: 900,
  1541. // position: "relative",
  1542. // left: "50%",
  1543. // transform: "translate(-50%)",
  1544. // padding: "25px 0 30px 30px"
  1545. }
  1546. }
  1547. ref={e => {
  1548. this.refs.all = e;
  1549. }}
  1550. >
  1551. <Table
  1552. columns={this.state.timeColumns}
  1553. dataSource={this.state.timeDataList}
  1554. pagination={false}
  1555. bordered
  1556. size="small"
  1557. />
  1558. </div>
  1559. </Spin>
  1560. <ReactToPrint
  1561. trigger={() => (
  1562. <Button
  1563. type="primary"
  1564. style={{
  1565. float: "right",
  1566. marginTop: 10,
  1567. position: "absolute",
  1568. top: 0,
  1569. right: 30
  1570. }}
  1571. >
  1572. 打印
  1573. </Button>
  1574. )}
  1575. content={() => this.refs.all}
  1576. />
  1577. </Modal>
  1578. </div>
  1579. );
  1580. }
  1581. });
  1582. export default ShouKuang;