shouKuanAll.jsx 60 KB

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