shouKuanAll.jsx 74 KB

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