shouKuanAll.jsx 72 KB

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