shouKuang.jsx 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611
  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. exportTime () {
  990. const data = {
  991. orderNo: this.state.selectedRowKeys[0]
  992. }
  993. window.location.href =
  994. globalConfig.context +
  995. "/api/admin/orderProject/exportMyTaskList?" +
  996. $.param(data);
  997. },
  998. render() {
  999. const formItemLayout = {
  1000. labelCol: { span: 8 },
  1001. wrapperCol: { span: 14 }
  1002. };
  1003. const { RangePicker } = DatePicker;
  1004. var departmentArr = this.state.departmentArr || [];
  1005. const { loading, selectedRowKeys, visible } = this.state;
  1006. const rowSelection = {
  1007. selectedRowKeys,
  1008. onChange: this.onSelectChange,
  1009. hideDefaultSelections: true,
  1010. type: "radio"
  1011. };
  1012. return (
  1013. <div className="user-content">
  1014. <div className="content-title" style={{ marginBottom: 10 }}>
  1015. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1016. </div>
  1017. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1018. <TabPane tab="更改表格显示数据" key="1">
  1019. <div style={{ marginLeft: 10 }}>
  1020. <ChooseList
  1021. columns={this.state.columns}
  1022. changeFn={this.changeList}
  1023. changeList={this.state.changeList}
  1024. top={55}
  1025. margin={11}
  1026. />
  1027. </div>
  1028. </TabPane>
  1029. <TabPane tab="搜索" key="2">
  1030. <div className="user-search" style={{ marginLeft: 10 }}>
  1031. <Input
  1032. placeholder="订单编号"
  1033. value={this.state.orderNoSearch}
  1034. onChange={e => {
  1035. this.setState({ orderNoSearch: e.target.value });
  1036. }}
  1037. />
  1038. <Input
  1039. placeholder="客户名称"
  1040. value={this.state.nameSearch}
  1041. onChange={e => {
  1042. this.setState({ nameSearch: e.target.value });
  1043. }}
  1044. />
  1045. <Select
  1046. placeholder="订单部门"
  1047. style={{ width: 150, marginRight: 10 }}
  1048. value={this.state.departmenttList}
  1049. onChange={e => {
  1050. this.setState({ departmenttList: e });
  1051. }}
  1052. >
  1053. {departmentArr.map(function(item) {
  1054. return (
  1055. <Select.Option key={item.id}>{item.name}</Select.Option>
  1056. );
  1057. })}
  1058. </Select>
  1059. <Input
  1060. placeholder="合同编号"
  1061. value={this.state.contractNoSearch}
  1062. onChange={e => {
  1063. this.setState({
  1064. contractNoSearch: e.target.value
  1065. });
  1066. }}
  1067. />
  1068. <Select
  1069. placeholder="流程状态"
  1070. onChange={e => {
  1071. this.setState({ processStatusSearch: e });
  1072. }}
  1073. style={{ width: 160, marginRight: 5 }}
  1074. value={this.state.processStatusSearch}
  1075. >
  1076. <Option value="3">未分配</Option>
  1077. <Option value="4">已分配</Option>
  1078. </Select>
  1079. <Select
  1080. placeholder="结算状态"
  1081. onChange={e => {
  1082. this.setState({ liquidationStatus: e });
  1083. }}
  1084. style={{ width: 160, marginRight: 5 }}
  1085. value={this.state.liquidationStatus}
  1086. >
  1087. <Option value="0">首付待付清</Option>
  1088. <Option value="1">尾款待付清</Option>
  1089. <Option value="2">已付清</Option>
  1090. </Select>
  1091. <span style={{}}>下单日期:</span>
  1092. <RangePicker
  1093. value={[
  1094. this.state.releaseDate[0]
  1095. ? moment(this.state.releaseDate[0])
  1096. : null,
  1097. this.state.releaseDate[1]
  1098. ? moment(this.state.releaseDate[1])
  1099. : null
  1100. ]}
  1101. onChange={(data, dataString) => {
  1102. this.setState({ releaseDate: dataString });
  1103. }}
  1104. />
  1105. <span style={{}}>最近收款:</span>
  1106. <RangePicker
  1107. value={[
  1108. this.state.shouKuanDate[0]
  1109. ? moment(this.state.shouKuanDate[0])
  1110. : null,
  1111. this.state.shouKuanDate[1]
  1112. ? moment(this.state.shouKuanDate[1])
  1113. : null
  1114. ]}
  1115. onChange={(data, dataString) => {
  1116. this.setState({ shouKuanDate: dataString });
  1117. }}
  1118. />
  1119. <Button
  1120. type="primary"
  1121. onClick={this.search}
  1122. style={{ marginLeft: 10 }}
  1123. >
  1124. 搜索
  1125. </Button>
  1126. <Button onClick={this.reset}>重置</Button>
  1127. </div>
  1128. </TabPane>
  1129. <TabPane tab="打印" key="3">
  1130. <Button
  1131. type="primary"
  1132. style={{ margin: "11px 0px 10px 10px" }}
  1133. onClick={this.printAll}
  1134. disabled={!this.state.dataSource.length}
  1135. >
  1136. 打印所有列表信息
  1137. </Button>
  1138. <Button
  1139. type="primary"
  1140. disabled={this.state.selectedRowKeys.length != 1}
  1141. style={{ margin: "11px 0px 10px 10px" }}
  1142. onClick={() => {
  1143. this.inRecordData();
  1144. this.setState({
  1145. bvisible: true
  1146. });
  1147. }}
  1148. >
  1149. 打印开票详情
  1150. </Button>
  1151. <Button
  1152. type="primary"
  1153. disabled={this.state.selectedRowKeys.length != 1}
  1154. style={{ margin: "11px 0px 10px 10px" }}
  1155. onClick={() => {
  1156. this.waterData();
  1157. this.setState({
  1158. cvisible: true
  1159. });
  1160. }}
  1161. >
  1162. 打印收款流水
  1163. </Button>
  1164. <Button
  1165. type="primary"
  1166. disabled={this.state.selectedRowKeys.length != 1}
  1167. style={{ margin: "11px 0px 10px 10px" }}
  1168. onClick={() => {
  1169. this.timeData();
  1170. this.setState({
  1171. timeVisible: true
  1172. });
  1173. }}
  1174. >
  1175. 打印工时信息
  1176. </Button>
  1177. <Button
  1178. type="primary"
  1179. disabled={this.state.selectedRowKeys.length != 1}
  1180. style={{ margin: "11px 0px 10px 10px" }}
  1181. onClick={() => {
  1182. this.waterData();
  1183. this.setState({
  1184. cuiVisible: true
  1185. });
  1186. }}
  1187. >
  1188. 打印催款信息
  1189. </Button>
  1190. <Button
  1191. type="primary"
  1192. disabled={this.state.selectedRowKeys.length != 1}
  1193. style={{ margin: "11px 0px 10px 10px" }}
  1194. onClick={() => {
  1195. this.waterData();
  1196. this.setState({
  1197. proVisible: true
  1198. });
  1199. }}
  1200. >
  1201. 打印项目信息
  1202. </Button>
  1203. </TabPane>
  1204. <TabPane tab="导出Excel" key="4">
  1205. <Button
  1206. type="primary"
  1207. style={{ margin: "11px 0px 10px 10px" }}
  1208. onClick={this.exportAll}
  1209. >
  1210. 导出当前列表
  1211. </Button>
  1212. <Button
  1213. type="primary"
  1214. disabled={this.state.selectedRowKeys.length != 1}
  1215. style={{ margin: "11px 0px 10px 10px" }}
  1216. onClick={this.exportKaip}
  1217. >
  1218. 导出所选开票详情
  1219. </Button>
  1220. <Button
  1221. type="primary"
  1222. disabled={this.state.selectedRowKeys.length != 1}
  1223. style={{ margin: "11px 0px 10px 10px" }}
  1224. onClick={this.exportWater}
  1225. >
  1226. 导出所选收款详情流水
  1227. </Button>
  1228. <Button
  1229. type="primary"
  1230. disabled={this.state.selectedRowKeys.length != 1}
  1231. style={{ margin: "11px 0px 10px 10px" }}
  1232. onClick={this.exportTime}
  1233. >
  1234. 导出所选工时信息
  1235. </Button>
  1236. </TabPane>
  1237. <TabPane tab="查看" key="5">
  1238. <Button
  1239. type="primary"
  1240. disabled={this.state.selectedRowKeys.length != 1}
  1241. style={{ margin: "11px 0px 10px 10px" }}
  1242. onClick={() => {
  1243. this.inRecordData();
  1244. this.setState({
  1245. bvisible: true
  1246. });
  1247. }}
  1248. >
  1249. 查看开票详情
  1250. </Button>
  1251. <Button
  1252. type="primary"
  1253. disabled={this.state.selectedRowKeys.length != 1}
  1254. style={{ margin: "11px 0px 10px 10px" }}
  1255. onClick={() => {
  1256. this.waterData();
  1257. this.setState({
  1258. cvisible: true
  1259. });
  1260. }}
  1261. >
  1262. 详情收款流水
  1263. </Button>
  1264. </TabPane>
  1265. {/* <TabPane tab="批量操作" key="6">
  1266. <Button
  1267. type="primary"
  1268. disabled={this.state.selectedRowKeys.length == 0}
  1269. style={{ margin: "0px 0px 10px 10px" }}
  1270. onClick={e => {
  1271. e.stopPropagation(),
  1272. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1273. }}
  1274. >
  1275. 转交
  1276. </Button>
  1277. </TabPane> */}
  1278. </Tabs>
  1279. <div className="patent-table">
  1280. <Spin spinning={this.state.loading}>
  1281. <Table
  1282. bordered
  1283. columns={
  1284. this.state.changeList == undefined
  1285. ? this.state.columns
  1286. : this.state.changeList
  1287. }
  1288. dataSource={this.state.dataSource}
  1289. rowSelection={rowSelection}
  1290. scroll={{ x: "max-content", y: 0 }}
  1291. pagination={this.state.pagination}
  1292. onRowDoubleClick={this.tableRowClick.bind(this)}
  1293. size="small"
  1294. />
  1295. </Spin>
  1296. <p
  1297. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  1298. >
  1299. {
  1300. <span style={{ marginRight: 10 }}>
  1301. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  1302. </span>
  1303. }
  1304. {
  1305. <span>
  1306. {`合同额总计(万元):${
  1307. this.state.totalHui ? this.state.totalHui : "0"
  1308. }`}
  1309. </span>
  1310. }
  1311. </p>
  1312. </div>
  1313. <Assign
  1314. title="任务"
  1315. selApi={"/api/admin/newOrder/updateFinance"}
  1316. data={this.state.assignDataY}
  1317. showDesc={this.state.assignVisibleY}
  1318. closeDesc={this.closeAssignY.bind(this)}
  1319. // fenpaiData={8}
  1320. specially={0}
  1321. roleName={this.state.nub}
  1322. requestMethod={"get"}
  1323. />
  1324. <OrderDesc
  1325. data={this.state.RowData}
  1326. showDesc={this.state.showDesc}
  1327. closeDesc={this.closeDesc.bind(this)}
  1328. />
  1329. <Receivable
  1330. title="收款记录"
  1331. api="/api/admin/financial/addReceiptsFlow"
  1332. data={this.state.assignDataX}
  1333. showDesc={this.state.assignVisibleX}
  1334. closeDesc={this.closeAssignX.bind(this)}
  1335. />
  1336. <Modal
  1337. visible={this.state.boHuiVisible}
  1338. width="400px"
  1339. title="驳回备注"
  1340. footer=""
  1341. onOk={this.boHuiOk}
  1342. onCancel={this.boHuiCancel}
  1343. >
  1344. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1345. <Spin spinning={this.state.loading}>
  1346. <FormItem
  1347. labelCol={{ span: 5 }}
  1348. wrapperCol={{ span: 16 }}
  1349. label={
  1350. <span>
  1351. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1352. </span>
  1353. }
  1354. >
  1355. <Input
  1356. type="textarea"
  1357. rows={4}
  1358. placeholder="请输入驳回原因"
  1359. value={this.state.content}
  1360. onChange={e => {
  1361. this.setState({ content: e.target.value });
  1362. }}
  1363. />
  1364. </FormItem>
  1365. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1366. <Button
  1367. type="primary"
  1368. htmlType="submit"
  1369. style={{ marginRight: 20 }}
  1370. >
  1371. 驳回
  1372. </Button>
  1373. <Button
  1374. type="default"
  1375. onClick={() => {
  1376. this.boHuiCancel();
  1377. }}
  1378. >
  1379. 取消
  1380. </Button>
  1381. </FormItem>
  1382. </Spin>
  1383. </Form>
  1384. </Modal>
  1385. <Modal
  1386. visible={this.state.bvisible}
  1387. footer=""
  1388. title="开票历史记录"
  1389. className="admin-desc-content"
  1390. width="900px"
  1391. onCancel={this.inRecordCanl}
  1392. >
  1393. <Spin spinning={this.state.loading}>
  1394. <div
  1395. className="patent-table"
  1396. ref={e => {
  1397. this.refs.kaiPiao = e;
  1398. }}
  1399. >
  1400. <Table
  1401. columns={this.state.columnsDate}
  1402. dataSource={this.state.recordData}
  1403. pagination={false}
  1404. bordered
  1405. />
  1406. <div className="clearfix" style={{ marginTop: "20px" }}>
  1407. <FormItem
  1408. className="half-item"
  1409. {...formItemLayout}
  1410. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1411. >
  1412. <span>{this.state.sum + "(万元)"}</span>
  1413. </FormItem>
  1414. </div>
  1415. <ReactToPrint
  1416. trigger={() => (
  1417. <Button
  1418. type="primary"
  1419. style={{
  1420. float: "right",
  1421. // marginTop: 10,
  1422. position: "absolute",
  1423. top: -54,
  1424. right: 30
  1425. }}
  1426. >
  1427. 打印
  1428. </Button>
  1429. )}
  1430. content={() => this.refs.kaiPiao}
  1431. />
  1432. </div>
  1433. </Spin>
  1434. </Modal>
  1435. <Modal
  1436. visible={this.state.cvisible}
  1437. footer=""
  1438. title="详细收款流水"
  1439. className="admin-desc-content"
  1440. width="1300px"
  1441. onCancel={this.waterCanl}
  1442. >
  1443. <Spin spinning={this.state.loading}>
  1444. <div
  1445. className="patent-table"
  1446. ref={e => {
  1447. this.refs.shouKuan = e;
  1448. }}
  1449. >
  1450. <Table
  1451. columns={this.state.waterlistDate}
  1452. dataSource={this.state.waterData}
  1453. pagination={false}
  1454. bordered
  1455. />
  1456. <div className="clearfix" style={{ marginTop: "20px" }}>
  1457. <FormItem
  1458. className="half-item"
  1459. {...formItemLayout}
  1460. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  1461. >
  1462. <span>{this.state.waterSum + "(万元)"}</span>
  1463. </FormItem>
  1464. </div>
  1465. <ReactToPrint
  1466. trigger={() => (
  1467. <Button
  1468. type="primary"
  1469. style={{
  1470. float: "right",
  1471. position: "absolute",
  1472. top: -54,
  1473. right: 30
  1474. }}
  1475. >
  1476. 打印
  1477. </Button>
  1478. )}
  1479. content={() => this.refs.shouKuan}
  1480. />
  1481. </div>
  1482. </Spin>
  1483. </Modal>
  1484. <Modal
  1485. visible={this.state.dvisible}
  1486. footer=""
  1487. title="所有列表信息"
  1488. className="admin-desc-content"
  1489. width="1300px"
  1490. onCancel={() => {
  1491. this.loadData();
  1492. this.setState({
  1493. dvisible: false
  1494. });
  1495. }}
  1496. >
  1497. <Spin spinning={this.state.loading}>
  1498. <div
  1499. className="patent-table"
  1500. style={{
  1501. // width: 900,
  1502. // position: "relative",
  1503. // left: "50%",
  1504. // transform: "translate(-50%)",
  1505. padding: "25px 0 30px 30px"
  1506. }}
  1507. ref={e => {
  1508. this.refs.all = e;
  1509. }}
  1510. >
  1511. <Table
  1512. columns={this.state.printColumns}
  1513. dataSource={this.state.dataSource}
  1514. pagination={false}
  1515. bordered
  1516. size="small"
  1517. />
  1518. </div>
  1519. </Spin>
  1520. <ReactToPrint
  1521. trigger={() => (
  1522. <Button
  1523. type="primary"
  1524. style={{
  1525. float: "right",
  1526. marginTop: 10,
  1527. position: "absolute",
  1528. top: 0,
  1529. right: 30
  1530. }}
  1531. >
  1532. 打印
  1533. </Button>
  1534. )}
  1535. content={() => this.refs.all}
  1536. />
  1537. </Modal>
  1538. <Modal
  1539. visible={this.state.timeVisible}
  1540. footer=""
  1541. title="工时详情"
  1542. className="admin-desc-content"
  1543. width="1300px"
  1544. pagination={false}
  1545. onCancel={() => {
  1546. this.loadData();
  1547. this.setState({
  1548. timeVisible: false
  1549. });
  1550. }}
  1551. >
  1552. <Spin spinning={this.state.loading}>
  1553. <div
  1554. className="patent-table"
  1555. style={
  1556. {
  1557. // width: 900,
  1558. // position: "relative",
  1559. // left: "50%",
  1560. // transform: "translate(-50%)",
  1561. // padding: "25px 0 30px 30px"
  1562. }
  1563. }
  1564. ref={e => {
  1565. this.refs.all = e;
  1566. }}
  1567. >
  1568. <Table
  1569. columns={this.state.timeColumns}
  1570. dataSource={this.state.timeDataList}
  1571. pagination={false}
  1572. bordered
  1573. size="small"
  1574. />
  1575. </div>
  1576. </Spin>
  1577. <ReactToPrint
  1578. trigger={() => (
  1579. <Button
  1580. type="primary"
  1581. style={{
  1582. float: "right",
  1583. marginTop: 10,
  1584. position: "absolute",
  1585. top: 0,
  1586. right: 30
  1587. }}
  1588. >
  1589. 打印
  1590. </Button>
  1591. )}
  1592. content={() => this.refs.all}
  1593. />
  1594. </Modal>
  1595. </div>
  1596. );
  1597. }
  1598. });
  1599. export default ShouKuang;