shouKuanAll.jsx 60 KB

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