shouKuanAll.jsx 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122
  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. getNewOrderStatus,
  31. getProjectStatus,
  32. getjiedian
  33. } from "@/tools";
  34. import { ChooseList } from "../../order/orderNew/chooseList";
  35. const FormItem = Form.Item;
  36. const { TabPane } = Tabs;
  37. const ShouKuang = React.createClass({
  38. departmentList() {
  39. this.setState({
  40. loading: true
  41. });
  42. $.ajax({
  43. method: "get",
  44. dataType: "json",
  45. crossDomain: false,
  46. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  47. data: {},
  48. success: function(data) {
  49. let thedata = data.data;
  50. let theArr = [];
  51. if (!thedata) {
  52. if (data.error && data.error.length) {
  53. message.warning(data.error[0].message);
  54. }
  55. } else {
  56. thedata.map(function(item, index) {
  57. theArr.push({
  58. key: index,
  59. name: item.name,
  60. id: item.id
  61. });
  62. });
  63. }
  64. this.setState({
  65. departmentArr: theArr
  66. });
  67. }.bind(this)
  68. }).always(
  69. function() {
  70. this.setState({
  71. loading: false
  72. });
  73. }.bind(this)
  74. );
  75. },
  76. loadData(pageNo, pageSize) {
  77. this.state.data = [];
  78. this.state.pagination.pageSize = 10;
  79. this.setState({
  80. // selectedRowKeys: [],
  81. // selectedRowKey: [],
  82. page: pageNo,
  83. loading: true,
  84. pagination: this.state.pagination
  85. });
  86. $.ajax({
  87. method: "get",
  88. dataType: "json",
  89. crossDomain: false,
  90. url: globalConfig.context + "/api/admin/financial/financeList",
  91. data: {
  92. pageNo: pageNo || 1,
  93. pageSize: pageSize || this.state.pagination.pageSize,
  94. buyerName: this.state.nameSearch, //客户名称
  95. orderNo: this.state.orderNoSearch,
  96. startTime: this.state.releaseDate[0],
  97. endTime: this.state.releaseDate[1],
  98. startFinalReceivablesTime: this.state.shouKuanDate[0],
  99. endFinalReceivablesTime: this.state.shouKuanDate[1],
  100. departmentId: this.state.departmenttList,
  101. processStatus: this.state.processStatusSearch,
  102. contractNo: this.state.contractNoSearch,
  103. liquidationStatus: this.state.liquidationStatus
  104. },
  105. success: function(data) {
  106. let theArr = [];
  107. if (!data.data || !data.data.pagination.list) {
  108. if (data.error && data.error.length) {
  109. message.warning(data.error[0].message);
  110. }
  111. } else {
  112. for (let i = 0; i < data.data.pagination.list.length; i++) {
  113. let thisdata = data.data.pagination.list[i];
  114. theArr.push({
  115. key: thisdata.orderNo,
  116. orderNo: thisdata.orderNo,
  117. orderType: thisdata.orderType,
  118. orderStatus: thisdata.orderStatus,
  119. sellerName: thisdata.sellerName,
  120. processStatus: thisdata.processStatus,
  121. liquidationStatus: thisdata.liquidationStatus,
  122. approval: thisdata.approval,
  123. buyerName: thisdata.buyerName,
  124. actuallyTotalAmount: thisdata.actuallyTotalAmount,
  125. signTime: thisdata.signTime,
  126. companyId: thisdata.companyId,
  127. companyName: thisdata.companyName,
  128. buyerId: thisdata.buyerId,
  129. buyerName: thisdata.buyerName,
  130. contractNo: thisdata.contractNo,
  131. createTime: thisdata.createTime,
  132. departmentName: thisdata.departmentName,
  133. invoiceAmount: thisdata.invoiceAmount,
  134. finalReceivables: thisdata.finalReceivables,
  135. finalReceivablesTime: thisdata.finalReceivablesTime,
  136. signTotalAmount: thisdata.signTotalAmount,
  137. financeName: thisdata.financeName
  138. });
  139. }
  140. }
  141. this.state.pagination.current = data.data.pagination.pageNo;
  142. this.state.pagination.total = data.data.pagination.totalCount;
  143. if (
  144. data.data &&
  145. data.data.pagination.list &&
  146. !data.data.pagination.list.length
  147. ) {
  148. this.state.pagination.current = 0;
  149. this.state.pagination.total = 0;
  150. }
  151. this.setState({
  152. totalPage: data.data.pagination.totalPage,
  153. dataSource: theArr,
  154. pagination: this.state.pagination,
  155. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  156. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0
  157. });
  158. }.bind(this)
  159. }).always(
  160. function() {
  161. this.setState({
  162. loading: false
  163. });
  164. }.bind(this)
  165. );
  166. },
  167. getInitialState() {
  168. return {
  169. searchMore: true,
  170. dvisible: false,
  171. assignVisibleX: false,
  172. assignVisibleY: false,
  173. releaseDate: [],
  174. shouKuanDate: [],
  175. assignDataX: [],
  176. assignDataY: [],
  177. totalPage: 0,
  178. processStatusSearch: "3",
  179. boHuivisible: false,
  180. selectedRowKeys: [],
  181. selectedRows: [],
  182. loading: false,
  183. pagination: {
  184. defaultCurrent: 1,
  185. defaultPageSize: 10,
  186. showQuickJumper: true,
  187. pageSize: 10,
  188. onChange: function(page) {
  189. this.loadData(page);
  190. }.bind(this),
  191. showTotal: function(total) {
  192. return "共" + total + "条数据";
  193. }
  194. },
  195. // 子组件改变的表格title数组
  196. changeList: undefined,
  197. proColumns: [
  198. {
  199. title: "序号",
  200. dataIndex: "key",
  201. key: "key"
  202. },
  203. {
  204. title: "合同编号",
  205. dataIndex: "contractNo",
  206. key: "contractNo"
  207. },
  208. {
  209. title: "订单编号",
  210. dataIndex: "orderNo",
  211. key: "orderNo"
  212. },
  213. {
  214. title: "客户名称",
  215. dataIndex: "userName",
  216. key: "userName"
  217. },
  218. {
  219. title: "订单负责人",
  220. dataIndex: "salesmanName",
  221. key: "salesmanName"
  222. },
  223. {
  224. title: "是否主项目",
  225. dataIndex: "main",
  226. key: "main",
  227. render: text => {
  228. return text == 0 ? "否" : "是";
  229. }
  230. },
  231. {
  232. title: "项目类别",
  233. dataIndex: "cname",
  234. key: "cname"
  235. },
  236. {
  237. title: "项目名称",
  238. dataIndex: "commodityName",
  239. key: "commodityName"
  240. },
  241. {
  242. title: "项目数量",
  243. dataIndex: "commodityQuantity",
  244. key: "commodityQuantity"
  245. },
  246. {
  247. title: "服务市价",
  248. dataIndex: "commodityPrice",
  249. key: "commodityPrice"
  250. },
  251. {
  252. title: "证书编号",
  253. dataIndex: "certificateNumber",
  254. key: "certificateNumber"
  255. },
  256. {
  257. title: "项目状态",
  258. dataIndex: "projectStatus",
  259. key: "projectStatus",
  260. render: text => {
  261. return getProjectStatus(text);
  262. }
  263. },
  264. {
  265. title: "项目说明",
  266. dataIndex: "taskComment",
  267. key: "taskComment"
  268. },
  269. {
  270. title: "外包(内部)公司",
  271. dataIndex: "outsourceName",
  272. key: "outsourceName"
  273. },
  274. {
  275. title: "外包(内部)价格",
  276. dataIndex: "outsourcePrice",
  277. key: "outsourcePrice"
  278. }
  279. ],
  280. cuiColumns: [
  281. {
  282. title: "序号",
  283. dataIndex: "key",
  284. key: "key"
  285. },
  286. {
  287. title: "合同编号",
  288. dataIndex: "contractNo",
  289. key: "contractNo"
  290. },
  291. {
  292. title: "订单编号",
  293. dataIndex: "orderNo",
  294. key: "orderNo"
  295. },
  296. {
  297. title: "客户名称",
  298. dataIndex: "userName",
  299. key: "userName"
  300. },
  301. {
  302. title: "订单负责人",
  303. dataIndex: "salesmanName",
  304. key: "salesmanName"
  305. },
  306. {
  307. title: "订单部门",
  308. dataIndex: "depName",
  309. key: "depName"
  310. },
  311. {
  312. title: "订单状态",
  313. dataIndex: "orderStatus",
  314. key: "orderStatus",
  315. render: text => {
  316. return getNewOrderStatus(text);
  317. }
  318. },
  319. {
  320. title: "项目状态",
  321. dataIndex: "projectStatus",
  322. key: "projectStatus",
  323. render: text => {
  324. return getProjectStatus(text);
  325. }
  326. },
  327. {
  328. title: "签单金额",
  329. dataIndex: "totalAmount",
  330. key: "totalAmount"
  331. },
  332. {
  333. title: "结算状态",
  334. dataIndex: "liquidationStatus",
  335. key: "liquidationStatus",
  336. render: text => {
  337. return getLiquidationStatus(text);
  338. }
  339. },
  340. {
  341. title: "已收款",
  342. dataIndex: "settlementAmount",
  343. key: "settlementAmount"
  344. },
  345. {
  346. title: "应收款",
  347. dataIndex: "accountsReceivable",
  348. key: "accountsReceivable"
  349. },
  350. {
  351. title: "催收科目",
  352. dataIndex: "dunSubject",
  353. key: "dunSubject",
  354. render: text => {
  355. return getjiedian(text);
  356. }
  357. },
  358. {
  359. title: "催收启动时间",
  360. dataIndex: "startDate",
  361. key: "startDate"
  362. }
  363. ],
  364. timeColumns: [
  365. {
  366. title: "序号",
  367. dataIndex: "key",
  368. key: "key"
  369. },
  370. {
  371. title: "合同编号",
  372. dataIndex: "contractNo",
  373. key: "contractNo"
  374. },
  375. {
  376. title: "订单编号",
  377. dataIndex: "orderNo",
  378. key: "orderNo"
  379. },
  380. {
  381. title: "客户名称",
  382. dataIndex: "userName",
  383. key: "userName"
  384. },
  385. {
  386. title: "项目负责人",
  387. dataIndex: "receiverName",
  388. key: "receiverName"
  389. },
  390. {
  391. title: "项目类别",
  392. dataIndex: "cname",
  393. key: "cname"
  394. },
  395. {
  396. title: "项目编号",
  397. dataIndex: "id",
  398. key: "id"
  399. },
  400. {
  401. title: "项目名称",
  402. dataIndex: "taskName",
  403. key: "taskName"
  404. },
  405. {
  406. title: "项目状态",
  407. dataIndex: "taskStatus",
  408. key: "taskStatus",
  409. render: text => {
  410. return getTaskStatus(text);
  411. }
  412. },
  413. {
  414. title: "工时",
  415. dataIndex: "hours",
  416. key: "hours"
  417. },
  418. {
  419. title: "分配时间",
  420. dataIndex: "taskDistributionTime",
  421. key: "taskDistributionTime"
  422. },
  423. {
  424. title: "完成时间",
  425. dataIndex: "taskEndTime",
  426. key: "taskEndTime"
  427. }
  428. ],
  429. printColumns: [
  430. {
  431. title: "合同编号",
  432. dataIndex: "contractNo",
  433. key: "contractNo"
  434. },
  435. {
  436. title: "订单编号",
  437. dataIndex: "orderNo",
  438. key: "orderNo"
  439. // fixed: "left"
  440. },
  441. {
  442. title: "客户名称",
  443. dataIndex: "buyerName",
  444. key: "buyerName"
  445. },
  446. {
  447. title: "订单部门",
  448. dataIndex: "departmentName",
  449. key: "departmentName"
  450. },
  451. {
  452. title: "订单负责人",
  453. dataIndex: "sellerName",
  454. key: "sellerName"
  455. },
  456. {
  457. title: "签单日期",
  458. dataIndex: "signTime",
  459. key: "signTime"
  460. },
  461. {
  462. title: "下单日期",
  463. dataIndex: "createTime",
  464. key: "createTime"
  465. },
  466. {
  467. title: "签单金额(万元)",
  468. dataIndex: "signTotalAmount",
  469. key: "signTotalAmount"
  470. },
  471. {
  472. title: "开票金额(万元)",
  473. dataIndex: "invoiceAmount",
  474. key: "invoiceAmount"
  475. },
  476. {
  477. title: "已收款(万元)",
  478. dataIndex: "actuallyTotalAmount",
  479. key: "actuallyTotalAmount"
  480. },
  481. {
  482. title: "最近收款(万元)",
  483. dataIndex: "finalReceivables",
  484. key: "finalReceivables"
  485. },
  486. {
  487. title: "最近收款时间",
  488. dataIndex: "finalReceivablesTime",
  489. key: "finalReceivablesTime"
  490. },
  491. {
  492. title: "结算状态",
  493. dataIndex: "liquidationStatus",
  494. key: "liquidationStatus",
  495. render: text => {
  496. return getLiquidationStatus(text);
  497. }
  498. },
  499. {
  500. title: "流程状态",
  501. dataIndex: "processStatus",
  502. key: "processStatus",
  503. render: text => {
  504. return getProcessStatus(text);
  505. }
  506. },
  507. {
  508. title: "特批状态",
  509. dataIndex: "approval",
  510. key: "approval",
  511. render: text => {
  512. return getApproval(text);
  513. }
  514. }
  515. ],
  516. columns: [
  517. {
  518. title: "合同编号",
  519. dataIndex: "contractNo",
  520. key: "contractNo",
  521. className: "title-table"
  522. },
  523. {
  524. title: "订单编号",
  525. dataIndex: "orderNo",
  526. key: "orderNo",
  527. className: "title-table"
  528. // fixed: "left"
  529. },
  530. {
  531. title: "客户名称",
  532. dataIndex: "buyerName",
  533. key: "buyerName",
  534. className: "title-table"
  535. },
  536. {
  537. title: "订单部门",
  538. dataIndex: "departmentName",
  539. key: "departmentName",
  540. className: "title-table"
  541. },
  542. {
  543. title: "订单负责人",
  544. dataIndex: "sellerName",
  545. key: "sellerName",
  546. className: "title-table"
  547. },
  548. {
  549. title: "财务负责人",
  550. dataIndex: "financeName",
  551. key: "financeName",
  552. className: "title-table"
  553. },
  554. {
  555. title: "签单日期",
  556. dataIndex: "signTime",
  557. key: "signTime",
  558. className: "title-table"
  559. },
  560. {
  561. title: "下单日期",
  562. dataIndex: "createTime",
  563. key: "createTime",
  564. className: "title-table"
  565. },
  566. {
  567. title: "签单金额(万元)",
  568. dataIndex: "signTotalAmount",
  569. key: "signTotalAmount",
  570. className: "title-table"
  571. },
  572. {
  573. title: "开票金额(万元)",
  574. dataIndex: "invoiceAmount",
  575. key: "invoiceAmount",
  576. className: "title-table"
  577. },
  578. {
  579. title: "已收款(万元)",
  580. dataIndex: "actuallyTotalAmount",
  581. key: "actuallyTotalAmount",
  582. className: "title-table"
  583. },
  584. {
  585. title: "最近收款(万元)",
  586. dataIndex: "finalReceivables",
  587. key: "finalReceivables",
  588. className: "title-table"
  589. },
  590. {
  591. title: "最近收款时间",
  592. dataIndex: "finalReceivablesTime",
  593. key: "finalReceivablesTime",
  594. className: "title-table"
  595. },
  596. {
  597. title: "结算状态",
  598. dataIndex: "liquidationStatus",
  599. key: "liquidationStatus",
  600. className: "title-table",
  601. render: text => {
  602. return getLiquidationStatus(text);
  603. }
  604. },
  605. {
  606. title: "流程状态",
  607. dataIndex: "processStatus",
  608. key: "processStatus",
  609. className: "title-table",
  610. render: text => {
  611. return getProcessStatus(text);
  612. }
  613. },
  614. {
  615. title: "特批状态",
  616. dataIndex: "approval",
  617. key: "approval",
  618. className: "title-table",
  619. render: text => {
  620. return getApproval(text);
  621. }
  622. }
  623. // {
  624. // title: '订单状态',
  625. // dataIndex: 'orderStatus',
  626. // key: 'orderStatus',
  627. // render: text => { return getNewOrderStatus(text)}
  628. // },
  629. // {
  630. // title: "操作",
  631. // dataIndex: "caozuo",
  632. // key: "caouzo",
  633. // className: "title-table",
  634. // render: (text, recard) => {
  635. // return (
  636. // <div>
  637. // {recard.liquidationStatus < 2 &&
  638. // (recard.approval === 1 || recard.approval === 2) ? (
  639. // <Button
  640. // style={{ background: "rgb(192,192,192)" }}
  641. // onClick={e => {
  642. // e.stopPropagation(), this.evaluateX(recard);
  643. // }}
  644. // >
  645. // 收款
  646. // </Button>
  647. // ) : (
  648. // <Button
  649. // type="primary"
  650. // onClick={e => {
  651. // e.stopPropagation(), this.evaluateX(recard);
  652. // }}
  653. // >
  654. // 收款
  655. // </Button>
  656. // )}
  657. // {recard.processStatus < 4 ? (
  658. // <Button
  659. // type="primary"
  660. // onClick={e => {
  661. // e.stopPropagation(), this.evaluateZ(recard);
  662. // }}
  663. // style={{ marginLeft: "5px" }}
  664. // >
  665. // 通过
  666. // </Button>
  667. // ) : (
  668. // ""
  669. // )}
  670. // {!(
  671. // recard.actuallyTotalAmount &&
  672. // Number(recard.actuallyTotalAmount) > 0
  673. // ) && (
  674. // <Button
  675. // type="danger"
  676. // style={{ marginLeft: "5px" }}
  677. // onClick={e => {
  678. // e.stopPropagation(), this.reject(recard);
  679. // }}
  680. // >
  681. // 驳回
  682. // </Button>
  683. // )}
  684. // {
  685. // // <Button
  686. // // type="primary"
  687. // // style={{ marginLeft: "5px" }}
  688. // // onClick={e => {
  689. // // e.stopPropagation(), this.evaluateY(recard, "财务专员");
  690. // // console.log(recard);
  691. // // }}
  692. // // >
  693. // // 转交
  694. // // </Button>
  695. // }
  696. // </div>
  697. // );
  698. // }
  699. // }
  700. ],
  701. dataSource: [],
  702. searchTime: [],
  703. columnsDate: [
  704. {
  705. title: "编号",
  706. dataIndex: "id",
  707. key: "id"
  708. },
  709. {
  710. title: "订单编号",
  711. dataIndex: "orderno",
  712. key: "orderno"
  713. },
  714. {
  715. title: "开票金额(万元)",
  716. dataIndex: "amount",
  717. key: "amount"
  718. },
  719. {
  720. title: "申请时间",
  721. dataIndex: "createTime",
  722. key: "createTime"
  723. },
  724. {
  725. title: "开票状态",
  726. dataIndex: "status",
  727. key: "status",
  728. render: text => {
  729. return getInvoiceStatus(text);
  730. }
  731. }
  732. ],
  733. waterlistDate: [
  734. {
  735. title: "订单编号",
  736. dataIndex: "orderNo",
  737. key: "orderNo"
  738. },
  739. {
  740. title: "平台流水号",
  741. dataIndex: "billNo",
  742. key: "billNo"
  743. // fixed: "left"
  744. },
  745. {
  746. title: "收款金额(万元)",
  747. dataIndex: "transactionAmount",
  748. key: "transactionAmount"
  749. },
  750. {
  751. title: "收款方",
  752. dataIndex: "payeeName",
  753. key: "payeeName"
  754. },
  755. {
  756. title: "付款方",
  757. dataIndex: "payerName",
  758. key: "payerName"
  759. },
  760. {
  761. title: "流水科目",
  762. dataIndex: "transactionSubject",
  763. key: "transactionSubject",
  764. render: text => {
  765. return getTransactionProject(text);
  766. }
  767. },
  768. {
  769. title: "收款类型",
  770. dataIndex: "type",
  771. key: "type"
  772. },
  773. {
  774. title: "财务流水时间",
  775. dataIndex: "financialPayTimes",
  776. key: "financialPayTimes"
  777. },
  778. {
  779. title: "财务流水号",
  780. dataIndex: "financialPayNo",
  781. key: "financialPayNo"
  782. },
  783. {
  784. title: "订单负责人",
  785. dataIndex: "saleName",
  786. key: "saleName"
  787. },
  788. {
  789. title: "创建时间",
  790. dataIndex: "createTimes",
  791. key: "createTimes"
  792. }
  793. ],
  794. waterData: []
  795. };
  796. },
  797. // 特批通过
  798. evaluateZ(record) {
  799. $.ajax({
  800. method: "POST",
  801. dataType: "json",
  802. crossDomain: false,
  803. url: globalConfig.context + "/api/admin/financial/financeApproval",
  804. data: {
  805. orderNo: record.orderNo
  806. }
  807. }).done(
  808. function(data) {
  809. if (!data.error.length) {
  810. message.success("通过成功!");
  811. this.setState({
  812. loading: false
  813. });
  814. this.loadData();
  815. } else {
  816. message.warning(data.error[0].message);
  817. }
  818. }.bind(this)
  819. );
  820. },
  821. /* 收款 */
  822. evaluateX(recard) {
  823. this.state.assignDataX = recard;
  824. this.setState({
  825. assignVisibleX: true
  826. });
  827. },
  828. /* 转交 */
  829. evaluateY(recard, nub) {
  830. this.state.assignDataY = recard;
  831. this.setState({
  832. nub,
  833. assignVisibleY: true
  834. });
  835. },
  836. /* 驳回 */
  837. reject(recard) {
  838. this.setState({
  839. bohuiData: recard,
  840. boHuiVisible: true,
  841. content: ""
  842. });
  843. },
  844. boHuiOk() {
  845. this.setState({
  846. boHuiVisible: false
  847. });
  848. if (
  849. this.state.pagination.current == this.state.totalPage &&
  850. this.state.pagination.total % 10 == 1
  851. ) {
  852. this.loadData(this.state.page - 1);
  853. } else {
  854. this.loadData(this.state.page);
  855. }
  856. },
  857. boHuiCancel() {
  858. this.setState({
  859. boHuiVisible: false
  860. });
  861. },
  862. componentWillMount() {
  863. this.loadData();
  864. this.departmentList();
  865. },
  866. tableRowClick(record) {
  867. this.state.RowData = record;
  868. this.setState({
  869. showDesc: true
  870. });
  871. },
  872. closeDesc(e, s) {
  873. this.state.showDesc = e;
  874. if (s) {
  875. this.loadData(this.state.page);
  876. }
  877. },
  878. closeAssignX(e, s) {
  879. this.state.assignDataX = {};
  880. this.state.assignVisibleX = e;
  881. if (s) {
  882. this.loadData(this.state.page);
  883. }
  884. },
  885. closeAssignY(e, s) {
  886. this.state.assignDataY = {};
  887. this.state.assignVisibleY = e;
  888. if (s) {
  889. this.loadData(this.state.page);
  890. }
  891. },
  892. search() {
  893. this.loadData();
  894. },
  895. reset() {
  896. this.state.nameSearch = "";
  897. this.state.releaseDate = [];
  898. this.state.shouKuanDate = [];
  899. this.state.orderNoSearch = "";
  900. this.state.departmenttList = undefined;
  901. this.state.processStatus = [];
  902. this.state.contractNoSearch = "";
  903. this.state.liquidationStatus = [];
  904. this.state.contractNo = "";
  905. this.loadData();
  906. },
  907. //驳回
  908. boHuiSubmit(e) {
  909. e.preventDefault();
  910. if (!this.state.content) {
  911. message.warning("请填写驳回原因");
  912. return false;
  913. }
  914. this.setState({
  915. loading: true
  916. });
  917. $.ajax({
  918. method: "POST",
  919. dataType: "json",
  920. crossDomain: false,
  921. url: globalConfig.context + "/api/admin/financial/reject",
  922. data: {
  923. orderNo: this.state.bohuiData.orderNo,
  924. reason: this.state.content
  925. }
  926. }).done(
  927. function(data) {
  928. if (!data.error.length) {
  929. message.success("驳回成功!");
  930. this.setState({
  931. loading: false
  932. });
  933. this.boHuiOk();
  934. } else {
  935. message.warning(data.error[0].message);
  936. }
  937. }.bind(this)
  938. );
  939. },
  940. searchSwitch() {
  941. this.setState({
  942. searchMore: !this.state.searchMore
  943. });
  944. },
  945. changeList(arr) {
  946. const newArr = [];
  947. this.state.columns.forEach(item => {
  948. arr.forEach(val => {
  949. if (val === item.title) {
  950. newArr.push(item);
  951. }
  952. });
  953. });
  954. this.setState({
  955. changeList: newArr
  956. });
  957. },
  958. callback(key) {
  959. console.log(key);
  960. },
  961. onSelectChange(selectedRowKeys) {
  962. // for(var i=0; i<selectedRowKeys.length; i++){
  963. // for(var j=i+1; j<selectedRowKeys.length; j++){
  964. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  965. // selectedRowKeys.splice(j,1);
  966. // j--;
  967. // }
  968. // }
  969. // }
  970. this.setState({ selectedRowKeys });
  971. },
  972. inRecordCanl() {
  973. this.setState({
  974. bvisible: false
  975. });
  976. },
  977. inRecordData() {
  978. this.setState({
  979. loading: true
  980. });
  981. $.ajax({
  982. method: "get",
  983. dataType: "json",
  984. crossDomain: false,
  985. url:
  986. globalConfig.context +
  987. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  988. data: {
  989. orderNo: this.state.selectedRowKeys[0],
  990. pageSize: 9999
  991. },
  992. success: function(data) {
  993. let theArr = [];
  994. let sum = 0;
  995. if (!data.data) {
  996. if (data.error && data.error.length) {
  997. message.warning(data.error[0].message);
  998. }
  999. } else {
  1000. for (let i = 0; i < data.data.list.length; i++) {
  1001. let thisdata = data.data.list[i];
  1002. sum += parseFloat(thisdata.amount);
  1003. theArr.push({
  1004. id: thisdata.id,
  1005. orderno: thisdata.orderno, //订单编号
  1006. amount: thisdata.amount, //签单金额
  1007. createTime: thisdata.createTime, //流程状态
  1008. status: thisdata.status, //结算状态
  1009. rejectReason: thisdata.rejectReason
  1010. });
  1011. }
  1012. }
  1013. this.setState({
  1014. recordData: theArr,
  1015. sum: sum.toFixed(4)
  1016. });
  1017. }.bind(this)
  1018. }).done(
  1019. function() {
  1020. this.setState({
  1021. loading: false
  1022. });
  1023. }.bind(this)
  1024. );
  1025. },
  1026. waterData() {
  1027. this.state.data = [];
  1028. this.setState({
  1029. loading: true
  1030. });
  1031. $.ajax({
  1032. method: "get",
  1033. dataType: "json",
  1034. crossDomain: false,
  1035. url: globalConfig.context + "/api/admin/financial/myBillList",
  1036. data: {
  1037. orderNo: this.state.selectedRowKeys[0],
  1038. pageSize: 9999
  1039. },
  1040. success: function(data) {
  1041. let theArr = [];
  1042. let waterSum = 0;
  1043. if (!data.data || !data.data.list) {
  1044. if (data.error && data.error.length) {
  1045. message.warning(data.error[0].message);
  1046. }
  1047. } else {
  1048. for (let i = 0; i < data.data.list.length; i++) {
  1049. let thisdata = data.data.list[i];
  1050. waterSum += parseFloat(thisdata.transactionAmount);
  1051. theArr.push({
  1052. key: i,
  1053. orderNo: thisdata.orderNo,
  1054. billNo: thisdata.billNo,
  1055. transactionAmount: thisdata.transactionAmount,
  1056. payeeName: thisdata.payeeName,
  1057. payerName: thisdata.payerName,
  1058. transactionSubject: thisdata.transactionSubject,
  1059. transactionChannel: thisdata.transactionChannel,
  1060. financialPayTimes: thisdata.financialPayTimes,
  1061. financialPayNo: thisdata.financialPayNo,
  1062. createrName: thisdata.createrName,
  1063. saleName: thisdata.saleName,
  1064. createTimes: thisdata.createTimes,
  1065. type: thisdata.type == 0 ? "手工" : "批量"
  1066. });
  1067. }
  1068. }
  1069. this.setState({
  1070. waterData: theArr,
  1071. waterSum: (Math.round(waterSum * 10000) / 10000).toFixed(4)
  1072. });
  1073. }.bind(this)
  1074. }).always(
  1075. function() {
  1076. this.setState({
  1077. loading: false
  1078. });
  1079. }.bind(this)
  1080. );
  1081. },
  1082. waterCanl() {
  1083. this.setState({
  1084. cvisible: false
  1085. });
  1086. },
  1087. exportKaip() {
  1088. window.location.href =
  1089. globalConfig.context +
  1090. "/api/admin/receivables/exportInvoice?" +
  1091. `orderNo=${this.state.selectedRowKeys}`;
  1092. },
  1093. exportAll() {
  1094. window.location.href =
  1095. globalConfig.context +
  1096. "/api/admin/receivables/exportReceivables?" +
  1097. `orderNo=${
  1098. this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1099. }&buyerName=${
  1100. this.state.nameSearch ? this.state.nameSearch : ""
  1101. }&departmentId=${
  1102. this.state.departmenttList ? this.state.departmenttList : ""
  1103. }&contractNo=${
  1104. this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1105. }&processStatus=${this.state.processStatusSearch}`;
  1106. },
  1107. exportWater() {
  1108. window.location.href =
  1109. globalConfig.context +
  1110. "/api/admin/receivables/exportMyBill?" +
  1111. `orderNo=${this.state.selectedRowKeys}`;
  1112. },
  1113. printAll() {
  1114. this.setState({
  1115. dvisible: true
  1116. });
  1117. this.loadData(1, 9999);
  1118. },
  1119. timeData() {
  1120. this.setState({
  1121. loading: true
  1122. });
  1123. $.ajax({
  1124. method: "get",
  1125. dataType: "json",
  1126. crossDomain: false,
  1127. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  1128. data: {
  1129. orderNo: this.state.selectedRowKeys[0],
  1130. pageSize: 9999
  1131. },
  1132. success: function(data) {
  1133. let theArr = [];
  1134. if (!data.data || !data.data.list) {
  1135. if (data.error && data.error.length) {
  1136. message.warning(data.error[0].message);
  1137. }
  1138. } else {
  1139. for (let i = 0; i < data.data.list.length; i++) {
  1140. let thisdata = data.data.list[i];
  1141. theArr.push({
  1142. key: i + 1,
  1143. orderNo: thisdata.orderNo,
  1144. contractNo: thisdata.contractNo,
  1145. userName: thisdata.userName,
  1146. receiverName: thisdata.receiverName,
  1147. taskStatus: thisdata.taskStatus,
  1148. cname: thisdata.cname,
  1149. id: thisdata.id,
  1150. taskName: thisdata.taskName,
  1151. hours: thisdata.hours,
  1152. taskDistributionTime: thisdata.taskDistributionTime,
  1153. taskEndTime: thisdata.taskEndTime
  1154. });
  1155. }
  1156. }
  1157. this.setState({
  1158. timeDataList: theArr
  1159. });
  1160. }.bind(this)
  1161. }).always(
  1162. function() {
  1163. this.setState({
  1164. loading: false
  1165. });
  1166. }.bind(this)
  1167. );
  1168. },
  1169. exportTime() {
  1170. const data = {
  1171. orderNo: this.state.selectedRowKeys[0],
  1172. pageSize: 9999
  1173. };
  1174. window.location.href =
  1175. globalConfig.context +
  1176. "/api/admin/orderProject/exportMyTaskList?" +
  1177. $.param(data);
  1178. },
  1179. exportPro() {
  1180. const data = {
  1181. orderNo: this.state.selectedRowKeys[0]
  1182. };
  1183. window.location.href =
  1184. globalConfig.context +
  1185. "/api/admin/newOrder/exportOrderTaskData?" +
  1186. $.param(data);
  1187. },
  1188. exportCui() {
  1189. var data = {
  1190. orderNo: this.state.selectedRowKeys[0]
  1191. ? this.state.selectedRowKeys[0]
  1192. : undefined, //订单编号
  1193. // specially: 1,
  1194. pageSize: 9999
  1195. };
  1196. window.location.href =
  1197. globalConfig.context +
  1198. "/api/admin/newOrder/exportOrderDunData?" +
  1199. $.param(data);
  1200. },
  1201. cuiData() {
  1202. this.setState({
  1203. loading: true
  1204. });
  1205. $.ajax({
  1206. method: "get",
  1207. dataType: "json",
  1208. crossDomain: false,
  1209. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1210. data: {
  1211. orderNo: this.state.selectedRowKeys[0],
  1212. pageSize: 9999
  1213. },
  1214. success: function(data) {
  1215. let theArr = [];
  1216. if (!data.data || !data.data.list) {
  1217. if (data.error && data.error.length) {
  1218. message.warning(data.error[0].message);
  1219. }
  1220. } else {
  1221. for (let i = 0; i < data.data.list.length; i++) {
  1222. let thisdata = data.data.list[i];
  1223. theArr.push({
  1224. key: i + 1,
  1225. orderNo: thisdata.orderNo,
  1226. contractNo: thisdata.contractNo,
  1227. userName: thisdata.userName,
  1228. buyerName: thisdata.buyerName,
  1229. departmentName: thisdata.departmentName,
  1230. salesmanName: thisdata.salesmanName,
  1231. depName: thisdata.depName,
  1232. orderStatus: thisdata.orderStatus,
  1233. projectStatus: thisdata.projectStatus,
  1234. totalAmount: thisdata.totalAmount,
  1235. liquidationStatus: thisdata.liquidationStatus,
  1236. settlementAmount: thisdata.settlementAmount,
  1237. accountsReceivable: thisdata.accountsReceivable,
  1238. dunSubject: thisdata.dunSubject,
  1239. startDate: thisdata.startDate,
  1240. taskStatus: thisdata.taskStatus,
  1241. cname: thisdata.cname,
  1242. id: thisdata.id,
  1243. taskName: thisdata.taskName,
  1244. hours: thisdata.hours,
  1245. taskDistributionTime: thisdata.taskDistributionTime,
  1246. taskEndTime: thisdata.taskEndTime
  1247. });
  1248. }
  1249. }
  1250. this.setState({
  1251. cuiDataList: theArr
  1252. });
  1253. }.bind(this)
  1254. }).always(
  1255. function() {
  1256. this.setState({
  1257. loading: false
  1258. });
  1259. }.bind(this)
  1260. );
  1261. },
  1262. proData() {
  1263. this.setState({
  1264. loading: true
  1265. });
  1266. $.ajax({
  1267. method: "get",
  1268. dataType: "json",
  1269. crossDomain: false,
  1270. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1271. data: {
  1272. orderNo: this.state.selectedRowKeys[0],
  1273. pageSize: 9999
  1274. },
  1275. success: function(data) {
  1276. let theArr = [];
  1277. let totalWaibao = 0;
  1278. if (!data.data) {
  1279. if (data.error && data.error.length) {
  1280. message.warning(data.error[0].message);
  1281. }
  1282. } else {
  1283. for (let i = 0; i < data.data.length; i++) {
  1284. let thisdata = data.data[i];
  1285. totalWaibao += thisdata.outsourcePrice;
  1286. theArr.push({
  1287. key: i + 1,
  1288. orderNo: thisdata.orderNo,
  1289. contractNo: thisdata.contractNo,
  1290. userName: thisdata.userName,
  1291. buyerName: thisdata.buyerName,
  1292. departmentName: thisdata.departmentName,
  1293. salesmanName: thisdata.salesmanName,
  1294. depName: thisdata.depName,
  1295. orderStatus: thisdata.orderStatus,
  1296. projectStatus: thisdata.projectStatus,
  1297. commodityName: thisdata.commodityName,
  1298. totalAmount: thisdata.totalAmount,
  1299. liquidationStatus: thisdata.liquidationStatus,
  1300. settlementAmount: thisdata.settlementAmount,
  1301. accountsReceivable: thisdata.accountsReceivable,
  1302. dunSubject: thisdata.dunSubject,
  1303. startDate: thisdata.startDate,
  1304. taskStatus: thisdata.taskStatus,
  1305. cname: thisdata.cname,
  1306. id: thisdata.id,
  1307. taskName: thisdata.taskName,
  1308. hours: thisdata.hours,
  1309. taskDistributionTime: thisdata.taskDistributionTime,
  1310. taskEndTime: thisdata.taskEndTime,
  1311. commodityQuantity: thisdata.commodityQuantity,
  1312. commodityPrice: thisdata.commodityPrice,
  1313. certificateNumber: thisdata.certificateNumber,
  1314. taskComment: thisdata.taskComment,
  1315. outsourceName: thisdata.outsourceName,
  1316. outsourcePrice: thisdata.outsourcePrice
  1317. });
  1318. }
  1319. }
  1320. totalWaibao = (Math.round(totalWaibao * 10000) / 10000).toFixed(4);
  1321. this.setState({
  1322. proDataList: theArr,
  1323. totalWaibao
  1324. });
  1325. }.bind(this)
  1326. }).always(
  1327. function() {
  1328. this.setState({
  1329. loading: false
  1330. });
  1331. }.bind(this)
  1332. );
  1333. },
  1334. render() {
  1335. const formItemLayout = {
  1336. labelCol: { span: 8 },
  1337. wrapperCol: { span: 14 }
  1338. };
  1339. const { RangePicker } = DatePicker;
  1340. var departmentArr = this.state.departmentArr || [];
  1341. const { loading, selectedRowKeys, visible } = this.state;
  1342. const rowSelection = {
  1343. selectedRowKeys,
  1344. onChange: this.onSelectChange,
  1345. hideDefaultSelections: true,
  1346. type: "radio"
  1347. };
  1348. return (
  1349. <div className="user-content">
  1350. <div className="content-title" style={{ marginBottom: 10 }}>
  1351. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1352. </div>
  1353. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1354. <TabPane tab="更改表格显示数据" key="1">
  1355. <div style={{ marginLeft: 10 }}>
  1356. <ChooseList
  1357. columns={this.state.columns}
  1358. changeFn={this.changeList}
  1359. changeList={this.state.changeList}
  1360. top={55}
  1361. margin={11}
  1362. />
  1363. </div>
  1364. </TabPane>
  1365. <TabPane tab="搜索" key="2">
  1366. <div className="user-search" style={{ marginLeft: 10 }}>
  1367. <Input
  1368. placeholder="订单编号"
  1369. value={this.state.orderNoSearch}
  1370. onChange={e => {
  1371. this.setState({ orderNoSearch: e.target.value });
  1372. }}
  1373. />
  1374. <Input
  1375. placeholder="客户名称"
  1376. value={this.state.nameSearch}
  1377. onChange={e => {
  1378. this.setState({ nameSearch: e.target.value });
  1379. }}
  1380. />
  1381. <Select
  1382. placeholder="订单部门"
  1383. style={{ width: 150, marginRight: 10 }}
  1384. value={this.state.departmenttList}
  1385. onChange={e => {
  1386. this.setState({ departmenttList: e });
  1387. }}
  1388. >
  1389. {departmentArr.map(function(item) {
  1390. return (
  1391. <Select.Option key={item.id}>{item.name}</Select.Option>
  1392. );
  1393. })}
  1394. </Select>
  1395. <Input
  1396. placeholder="合同编号"
  1397. value={this.state.contractNoSearch}
  1398. onChange={e => {
  1399. this.setState({
  1400. contractNoSearch: e.target.value
  1401. });
  1402. }}
  1403. />
  1404. <Select
  1405. placeholder="流程状态"
  1406. onChange={e => {
  1407. this.setState({ processStatusSearch: e });
  1408. }}
  1409. style={{ width: 160, marginRight: 5 }}
  1410. value={this.state.processStatusSearch}
  1411. >
  1412. <Option value="3">未分配</Option>
  1413. <Option value="4">已分配</Option>
  1414. </Select>
  1415. <Select
  1416. placeholder="结算状态"
  1417. onChange={e => {
  1418. this.setState({ liquidationStatus: e });
  1419. }}
  1420. style={{ width: 160, marginRight: 5 }}
  1421. value={this.state.liquidationStatus}
  1422. >
  1423. <Option value="0">首付待付清</Option>
  1424. <Option value="1">尾款待付清</Option>
  1425. <Option value="2">已付清</Option>
  1426. </Select>
  1427. <span style={{}}>下单日期:</span>
  1428. <RangePicker
  1429. value={[
  1430. this.state.releaseDate[0]
  1431. ? moment(this.state.releaseDate[0])
  1432. : null,
  1433. this.state.releaseDate[1]
  1434. ? moment(this.state.releaseDate[1])
  1435. : null
  1436. ]}
  1437. onChange={(data, dataString) => {
  1438. this.setState({ releaseDate: dataString });
  1439. }}
  1440. />
  1441. <span style={{}}>最近收款:</span>
  1442. <RangePicker
  1443. value={[
  1444. this.state.shouKuanDate[0]
  1445. ? moment(this.state.shouKuanDate[0])
  1446. : null,
  1447. this.state.shouKuanDate[1]
  1448. ? moment(this.state.shouKuanDate[1])
  1449. : null
  1450. ]}
  1451. onChange={(data, dataString) => {
  1452. this.setState({ shouKuanDate: dataString });
  1453. }}
  1454. />
  1455. <Button
  1456. type="primary"
  1457. onClick={this.search}
  1458. style={{ marginLeft: 10 }}
  1459. >
  1460. 搜索
  1461. </Button>
  1462. <Button onClick={this.reset}>重置</Button>
  1463. </div>
  1464. </TabPane>
  1465. <TabPane tab="打印" key="3">
  1466. <Button
  1467. type="primary"
  1468. style={{ margin: "11px 0px 10px 10px" }}
  1469. onClick={this.printAll}
  1470. disabled={!this.state.dataSource.length}
  1471. >
  1472. 打印所有列表信息
  1473. </Button>
  1474. <Button
  1475. type="primary"
  1476. disabled={this.state.selectedRowKeys.length != 1}
  1477. style={{ margin: "11px 0px 10px 10px" }}
  1478. onClick={() => {
  1479. this.inRecordData();
  1480. this.setState({
  1481. bvisible: true
  1482. });
  1483. }}
  1484. >
  1485. 打印开票详情
  1486. </Button>
  1487. <Button
  1488. type="primary"
  1489. disabled={this.state.selectedRowKeys.length != 1}
  1490. style={{ margin: "11px 0px 10px 10px" }}
  1491. onClick={() => {
  1492. this.waterData();
  1493. this.setState({
  1494. cvisible: true
  1495. });
  1496. }}
  1497. >
  1498. 打印收款流水
  1499. </Button>
  1500. <Button
  1501. type="primary"
  1502. disabled={this.state.selectedRowKeys.length != 1}
  1503. style={{ margin: "11px 0px 10px 10px" }}
  1504. onClick={() => {
  1505. this.timeData();
  1506. this.setState({
  1507. timeVisible: true
  1508. });
  1509. }}
  1510. >
  1511. 打印工时信息
  1512. </Button>
  1513. <Button
  1514. type="primary"
  1515. disabled={this.state.selectedRowKeys.length != 1}
  1516. style={{ margin: "11px 0px 10px 10px" }}
  1517. onClick={() => {
  1518. this.cuiData();
  1519. this.setState({
  1520. cuiVisible: true
  1521. });
  1522. }}
  1523. >
  1524. 打印催款信息
  1525. </Button>
  1526. <Button
  1527. type="primary"
  1528. disabled={this.state.selectedRowKeys.length != 1}
  1529. style={{ margin: "11px 0px 10px 10px" }}
  1530. onClick={() => {
  1531. this.proData();
  1532. this.setState({
  1533. proVisible: true
  1534. });
  1535. }}
  1536. >
  1537. 打印项目信息
  1538. </Button>
  1539. </TabPane>
  1540. <TabPane tab="导出Excel" key="4">
  1541. <Button
  1542. type="primary"
  1543. style={{ margin: "11px 0px 10px 10px" }}
  1544. onClick={this.exportAll}
  1545. >
  1546. 导出当前列表
  1547. </Button>
  1548. <Button
  1549. type="primary"
  1550. disabled={this.state.selectedRowKeys.length != 1}
  1551. style={{ margin: "11px 0px 10px 10px" }}
  1552. onClick={this.exportKaip}
  1553. >
  1554. 导出所选开票详情
  1555. </Button>
  1556. <Button
  1557. type="primary"
  1558. disabled={this.state.selectedRowKeys.length != 1}
  1559. style={{ margin: "11px 0px 10px 10px" }}
  1560. onClick={this.exportWater}
  1561. >
  1562. 导出所选收款详情流水
  1563. </Button>
  1564. <Button
  1565. type="primary"
  1566. disabled={this.state.selectedRowKeys.length != 1}
  1567. style={{ margin: "11px 0px 10px 10px" }}
  1568. onClick={this.exportTime}
  1569. >
  1570. 导出所选工时信息
  1571. </Button>
  1572. <Button
  1573. type="primary"
  1574. disabled={this.state.selectedRowKeys.length != 1}
  1575. style={{ margin: "11px 0px 10px 10px" }}
  1576. onClick={this.exportCui}
  1577. >
  1578. 导出催款信息
  1579. </Button>
  1580. <Button
  1581. type="primary"
  1582. disabled={this.state.selectedRowKeys.length != 1}
  1583. style={{ margin: "11px 0px 10px 10px" }}
  1584. onClick={this.exportPro}
  1585. >
  1586. 导出项目详情
  1587. </Button>
  1588. </TabPane>
  1589. <TabPane tab="查看" key="5">
  1590. <Button
  1591. type="primary"
  1592. disabled={this.state.selectedRowKeys.length != 1}
  1593. style={{ margin: "11px 0px 10px 10px" }}
  1594. onClick={() => {
  1595. this.inRecordData();
  1596. this.setState({
  1597. bvisible: true
  1598. });
  1599. }}
  1600. >
  1601. 查看开票详情
  1602. </Button>
  1603. <Button
  1604. type="primary"
  1605. disabled={this.state.selectedRowKeys.length != 1}
  1606. style={{ margin: "11px 0px 10px 10px" }}
  1607. onClick={() => {
  1608. this.waterData();
  1609. this.setState({
  1610. cvisible: true
  1611. });
  1612. }}
  1613. >
  1614. 详情收款流水
  1615. </Button>
  1616. <Button
  1617. type="primary"
  1618. disabled={this.state.selectedRowKeys.length != 1}
  1619. style={{ margin: "11px 0px 10px 10px" }}
  1620. onClick={() => {
  1621. this.timeData();
  1622. this.setState({
  1623. timeVisible: true
  1624. });
  1625. }}
  1626. >
  1627. 工时信息
  1628. </Button>
  1629. <Button
  1630. type="primary"
  1631. disabled={this.state.selectedRowKeys.length != 1}
  1632. style={{ margin: "11px 0px 10px 10px" }}
  1633. onClick={() => {
  1634. this.cuiData();
  1635. this.setState({
  1636. cuiVisible: true
  1637. });
  1638. }}
  1639. >
  1640. 催款信息
  1641. </Button>
  1642. <Button
  1643. type="primary"
  1644. disabled={this.state.selectedRowKeys.length != 1}
  1645. style={{ margin: "11px 0px 10px 10px" }}
  1646. onClick={() => {
  1647. this.proData();
  1648. this.setState({
  1649. proVisible: true
  1650. });
  1651. }}
  1652. >
  1653. 项目信息
  1654. </Button>
  1655. </TabPane>
  1656. {/* <TabPane tab="批量操作" key="6">
  1657. <Button
  1658. type="primary"
  1659. disabled={this.state.selectedRowKeys.length == 0}
  1660. style={{ margin: "0px 0px 10px 10px" }}
  1661. onClick={e => {
  1662. e.stopPropagation(),
  1663. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1664. }}
  1665. >
  1666. 转交
  1667. </Button>
  1668. </TabPane> */}
  1669. </Tabs>
  1670. <div className="patent-table">
  1671. <Spin spinning={this.state.loading}>
  1672. <Table
  1673. bordered
  1674. columns={
  1675. this.state.changeList == undefined
  1676. ? this.state.columns
  1677. : this.state.changeList
  1678. }
  1679. dataSource={this.state.dataSource}
  1680. rowSelection={rowSelection}
  1681. scroll={{ x: "max-content", y: 0 }}
  1682. pagination={this.state.pagination}
  1683. onRowDoubleClick={this.tableRowClick.bind(this)}
  1684. size="small"
  1685. />
  1686. </Spin>
  1687. <p
  1688. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  1689. >
  1690. {
  1691. <span style={{ marginRight: 10 }}>
  1692. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  1693. </span>
  1694. }
  1695. {
  1696. <span>
  1697. {`合同额总计(万元):${
  1698. this.state.totalHui ? this.state.totalHui : "0"
  1699. }`}
  1700. </span>
  1701. }
  1702. </p>
  1703. </div>
  1704. <Assign
  1705. title="任务"
  1706. selApi={"/api/admin/newOrder/updateFinance"}
  1707. data={this.state.assignDataY}
  1708. showDesc={this.state.assignVisibleY}
  1709. closeDesc={this.closeAssignY.bind(this)}
  1710. // fenpaiData={8}
  1711. specially={0}
  1712. roleName={this.state.nub}
  1713. requestMethod={"get"}
  1714. />
  1715. <OrderDesc
  1716. data={this.state.RowData}
  1717. showDesc={this.state.showDesc}
  1718. closeDesc={this.closeDesc.bind(this)}
  1719. />
  1720. <Receivable
  1721. title="收款记录"
  1722. api="/api/admin/financial/addReceiptsFlow"
  1723. data={this.state.assignDataX}
  1724. showDesc={this.state.assignVisibleX}
  1725. closeDesc={this.closeAssignX.bind(this)}
  1726. />
  1727. <Modal
  1728. visible={this.state.boHuiVisible}
  1729. width="400px"
  1730. title="驳回备注"
  1731. footer=""
  1732. onOk={this.boHuiOk}
  1733. onCancel={this.boHuiCancel}
  1734. >
  1735. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1736. <Spin spinning={this.state.loading}>
  1737. <FormItem
  1738. labelCol={{ span: 5 }}
  1739. wrapperCol={{ span: 16 }}
  1740. label={
  1741. <span>
  1742. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1743. </span>
  1744. }
  1745. >
  1746. <Input
  1747. type="textarea"
  1748. rows={4}
  1749. placeholder="请输入驳回原因"
  1750. value={this.state.content}
  1751. onChange={e => {
  1752. this.setState({ content: e.target.value });
  1753. }}
  1754. />
  1755. </FormItem>
  1756. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1757. <Button
  1758. type="primary"
  1759. htmlType="submit"
  1760. style={{ marginRight: 20 }}
  1761. >
  1762. 驳回
  1763. </Button>
  1764. <Button
  1765. type="default"
  1766. onClick={() => {
  1767. this.boHuiCancel();
  1768. }}
  1769. >
  1770. 取消
  1771. </Button>
  1772. </FormItem>
  1773. </Spin>
  1774. </Form>
  1775. </Modal>
  1776. <Modal
  1777. visible={this.state.bvisible}
  1778. footer=""
  1779. title="开票历史记录"
  1780. className="admin-desc-content"
  1781. width="900px"
  1782. onCancel={this.inRecordCanl}
  1783. >
  1784. <Spin spinning={this.state.loading}>
  1785. <div
  1786. className="patent-table"
  1787. ref={e => {
  1788. this.refs.kaiPiao = e;
  1789. }}
  1790. >
  1791. <Table
  1792. columns={this.state.columnsDate}
  1793. dataSource={this.state.recordData}
  1794. pagination={false}
  1795. bordered
  1796. />
  1797. <div className="clearfix" style={{ marginTop: "20px" }}>
  1798. <FormItem
  1799. className="half-item"
  1800. {...formItemLayout}
  1801. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1802. >
  1803. <span>{this.state.sum + "(万元)"}</span>
  1804. </FormItem>
  1805. </div>
  1806. <ReactToPrint
  1807. trigger={() => (
  1808. <Button
  1809. type="primary"
  1810. style={{
  1811. float: "right",
  1812. // marginTop: 10,
  1813. position: "absolute",
  1814. top: -54,
  1815. right: 30
  1816. }}
  1817. >
  1818. 打印
  1819. </Button>
  1820. )}
  1821. content={() => this.refs.kaiPiao}
  1822. />
  1823. </div>
  1824. </Spin>
  1825. </Modal>
  1826. <Modal
  1827. visible={this.state.cvisible}
  1828. footer=""
  1829. title="详细收款流水"
  1830. className="admin-desc-content"
  1831. width="1300px"
  1832. onCancel={this.waterCanl}
  1833. >
  1834. <Spin spinning={this.state.loading}>
  1835. <div
  1836. className="patent-table"
  1837. ref={e => {
  1838. this.refs.shouKuan = e;
  1839. }}
  1840. >
  1841. <Table
  1842. columns={this.state.waterlistDate}
  1843. dataSource={this.state.waterData}
  1844. pagination={false}
  1845. bordered
  1846. />
  1847. <div className="clearfix" style={{ marginTop: "20px" }}>
  1848. <FormItem
  1849. className="half-item"
  1850. {...formItemLayout}
  1851. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  1852. >
  1853. <span>{this.state.waterSum + "(万元)"}</span>
  1854. </FormItem>
  1855. </div>
  1856. <ReactToPrint
  1857. trigger={() => (
  1858. <Button
  1859. type="primary"
  1860. style={{
  1861. float: "right",
  1862. position: "absolute",
  1863. top: -54,
  1864. right: 30
  1865. }}
  1866. >
  1867. 打印
  1868. </Button>
  1869. )}
  1870. content={() => this.refs.shouKuan}
  1871. />
  1872. </div>
  1873. </Spin>
  1874. </Modal>
  1875. <Modal
  1876. visible={this.state.dvisible}
  1877. footer=""
  1878. title="所有列表信息"
  1879. className="admin-desc-content"
  1880. width="1300px"
  1881. onCancel={() => {
  1882. this.loadData();
  1883. this.setState({
  1884. dvisible: false
  1885. });
  1886. }}
  1887. >
  1888. <Spin spinning={this.state.loading}>
  1889. <div
  1890. className="patent-table"
  1891. style={{
  1892. // width: 900,
  1893. // position: "relative",
  1894. // left: "50%",
  1895. // transform: "translate(-50%)",
  1896. padding: "25px 0 30px 30px"
  1897. }}
  1898. ref={e => {
  1899. this.refs.all = e;
  1900. }}
  1901. >
  1902. <Table
  1903. columns={this.state.printColumns}
  1904. dataSource={this.state.dataSource}
  1905. pagination={false}
  1906. bordered
  1907. size="small"
  1908. />
  1909. </div>
  1910. </Spin>
  1911. <ReactToPrint
  1912. trigger={() => (
  1913. <Button
  1914. type="primary"
  1915. style={{
  1916. float: "right",
  1917. marginTop: 10,
  1918. position: "absolute",
  1919. top: 0,
  1920. right: 30
  1921. }}
  1922. >
  1923. 打印
  1924. </Button>
  1925. )}
  1926. content={() => this.refs.all}
  1927. />
  1928. </Modal>
  1929. <Modal
  1930. visible={this.state.timeVisible}
  1931. footer=""
  1932. title="工时详情"
  1933. className="admin-desc-content"
  1934. width="1300px"
  1935. pagination={false}
  1936. onCancel={() => {
  1937. this.loadData();
  1938. this.setState({
  1939. timeVisible: false
  1940. });
  1941. }}
  1942. >
  1943. <Spin spinning={this.state.loading}>
  1944. <div
  1945. className="patent-table"
  1946. style={
  1947. {
  1948. // width: 900,
  1949. // position: "relative",
  1950. // left: "50%",
  1951. // transform: "translate(-50%)",
  1952. // padding: "25px 0 30px 30px"
  1953. }
  1954. }
  1955. ref={e => {
  1956. this.refs.all = e;
  1957. }}
  1958. >
  1959. <Table
  1960. columns={this.state.timeColumns}
  1961. dataSource={this.state.timeDataList}
  1962. pagination={false}
  1963. bordered
  1964. size="small"
  1965. />
  1966. </div>
  1967. </Spin>
  1968. <ReactToPrint
  1969. trigger={() => (
  1970. <Button
  1971. type="primary"
  1972. style={{
  1973. float: "right",
  1974. marginTop: 10,
  1975. position: "absolute",
  1976. top: 0,
  1977. right: 30
  1978. }}
  1979. >
  1980. 打印
  1981. </Button>
  1982. )}
  1983. content={() => this.refs.all}
  1984. />
  1985. </Modal>
  1986. <Modal
  1987. visible={this.state.cuiVisible}
  1988. footer=""
  1989. title="催款详情"
  1990. className="admin-desc-content"
  1991. width="1300px"
  1992. pagination={false}
  1993. onCancel={() => {
  1994. this.loadData();
  1995. this.setState({
  1996. cuiVisible: false
  1997. });
  1998. }}
  1999. >
  2000. <Spin spinning={this.state.loading}>
  2001. <div
  2002. className="patent-table"
  2003. style={
  2004. {
  2005. // width: 900,
  2006. // position: "relative",
  2007. // left: "50%",
  2008. // transform: "translate(-50%)",
  2009. // padding: "25px 0 30px 30px"
  2010. }
  2011. }
  2012. ref={e => {
  2013. this.refs.all = e;
  2014. }}
  2015. >
  2016. <Table
  2017. columns={this.state.cuiColumns}
  2018. dataSource={this.state.cuiDataList}
  2019. pagination={false}
  2020. bordered
  2021. size="small"
  2022. />
  2023. </div>
  2024. </Spin>
  2025. <ReactToPrint
  2026. trigger={() => (
  2027. <Button
  2028. type="primary"
  2029. style={{
  2030. float: "right",
  2031. marginTop: 10,
  2032. position: "absolute",
  2033. top: 0,
  2034. right: 30
  2035. }}
  2036. >
  2037. 打印
  2038. </Button>
  2039. )}
  2040. content={() => this.refs.all}
  2041. />
  2042. </Modal>
  2043. <Modal
  2044. visible={this.state.proVisible}
  2045. footer=""
  2046. title="项目详情"
  2047. className="admin-desc-content"
  2048. width="1300px"
  2049. pagination={false}
  2050. onCancel={() => {
  2051. this.loadData();
  2052. this.setState({
  2053. proVisible: false
  2054. });
  2055. }}
  2056. >
  2057. <Spin spinning={this.state.loading}>
  2058. <div
  2059. className="patent-table"
  2060. style={
  2061. {
  2062. // width: 900,
  2063. // position: "relative",
  2064. // left: "50%",
  2065. // transform: "translate(-50%)",
  2066. // padding: "25px 0 30px 30px"
  2067. }
  2068. }
  2069. ref={e => {
  2070. this.refs.all = e;
  2071. }}
  2072. >
  2073. <Table
  2074. columns={this.state.proColumns}
  2075. dataSource={this.state.proDataList}
  2076. pagination={false}
  2077. bordered
  2078. size="small"
  2079. />
  2080. </div>
  2081. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  2082. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  2083. </span>
  2084. </Spin>
  2085. <ReactToPrint
  2086. trigger={() => (
  2087. <Button
  2088. type="primary"
  2089. style={{
  2090. float: "right",
  2091. marginTop: 10,
  2092. position: "absolute",
  2093. top: 0,
  2094. right: 30
  2095. }}
  2096. >
  2097. 打印
  2098. </Button>
  2099. )}
  2100. content={() => this.refs.all}
  2101. />
  2102. </Modal>
  2103. </div>
  2104. );
  2105. }
  2106. });
  2107. export default ShouKuang;