shouKuanAll.jsx 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642
  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. onSelectChange(selectedRowKeys) {
  1241. // for(var i=0; i<selectedRowKeys.length; i++){
  1242. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1243. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1244. // selectedRowKeys.splice(j,1);
  1245. // j--;
  1246. // }
  1247. // }
  1248. // }
  1249. this.setState({ selectedRowKeys });
  1250. },
  1251. inRecordCanl() {
  1252. this.setState({
  1253. bvisible: false,
  1254. });
  1255. },
  1256. inRecordData() {
  1257. this.setState({
  1258. loading: true,
  1259. });
  1260. $.ajax({
  1261. method: "get",
  1262. dataType: "json",
  1263. crossDomain: false,
  1264. url:
  1265. globalConfig.context +
  1266. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1267. data: {
  1268. orderNo: this.state.selectedRowKeys[0],
  1269. pageSize: 9999,
  1270. },
  1271. success: function (data) {
  1272. let theArr = [];
  1273. let sum = 0;
  1274. if (!data.data) {
  1275. if (data.error && data.error.length) {
  1276. message.warning(data.error[0].message);
  1277. }
  1278. } else {
  1279. for (let i = 0; i < data.data.list.length; i++) {
  1280. let thisdata = data.data.list[i];
  1281. sum += parseFloat(thisdata.amount);
  1282. theArr.push({
  1283. id: thisdata.id,
  1284. orderno: thisdata.orderno, //订单编号
  1285. amount: thisdata.amount, //签单金额
  1286. createTime: thisdata.createTime, //流程状态
  1287. status: thisdata.status, //结算状态
  1288. rejectReason: thisdata.rejectReason,
  1289. });
  1290. }
  1291. }
  1292. this.setState({
  1293. recordData: theArr,
  1294. sum: sum.toFixed(6),
  1295. });
  1296. }.bind(this),
  1297. }).done(
  1298. function () {
  1299. this.setState({
  1300. loading: false,
  1301. });
  1302. }.bind(this)
  1303. );
  1304. },
  1305. waterData() {
  1306. this.state.data = [];
  1307. this.setState({
  1308. loading: true,
  1309. });
  1310. $.ajax({
  1311. method: "get",
  1312. dataType: "json",
  1313. crossDomain: false,
  1314. url: globalConfig.context + "/api/admin/financial/myBillList",
  1315. data: {
  1316. orderNo: this.state.selectedRowKeys[0],
  1317. pageSize: 9999,
  1318. whoType: 1,
  1319. },
  1320. success: function (data) {
  1321. let theArr = [];
  1322. let waterSum = 0;
  1323. if (!data.data || !data.data.list) {
  1324. if (data.error && data.error.length) {
  1325. message.warning(data.error[0].message);
  1326. }
  1327. } else {
  1328. for (let i = 0; i < data.data.list.length; i++) {
  1329. let thisdata = data.data.list[i];
  1330. if (thisdata.deleteSign == 0) {
  1331. waterSum += parseFloat(thisdata.transactionAmount);
  1332. }
  1333. theArr.push({
  1334. key: i,
  1335. orderNo: thisdata.orderNo,
  1336. billNo: thisdata.billNo,
  1337. transactionAmount: thisdata.transactionAmount,
  1338. payeeName: thisdata.payeeName,
  1339. payerName: thisdata.payerName,
  1340. transactionSubject: thisdata.transactionSubject,
  1341. transactionChannel: thisdata.transactionChannel,
  1342. financialPayTimes: thisdata.financialPayTimes,
  1343. financialPayNo: thisdata.financialPayNo,
  1344. createrName: thisdata.createrName,
  1345. saleName: thisdata.saleName,
  1346. createTimes: thisdata.createTimes,
  1347. type:
  1348. thisdata.type == 0
  1349. ? "手工"
  1350. : thisdata.type == 1
  1351. ? "批量"
  1352. : "合同变更退款",
  1353. deleteSign: thisdata.deleteSign,
  1354. deleteTimes: thisdata.deleteTimes,
  1355. refundTimes: thisdata.refundTimes,
  1356. remarks: thisdata.remarks,
  1357. });
  1358. }
  1359. }
  1360. this.setState({
  1361. waterData: theArr,
  1362. waterSum: (Math.round(waterSum * 1000000) / 1000000).toFixed(6),
  1363. });
  1364. }.bind(this),
  1365. }).always(
  1366. function () {
  1367. this.setState({
  1368. loading: false,
  1369. });
  1370. }.bind(this)
  1371. );
  1372. },
  1373. waterCanl() {
  1374. this.setState({
  1375. cvisible: false,
  1376. });
  1377. },
  1378. exportKaip() {
  1379. window.location.href =
  1380. globalConfig.context +
  1381. "/api/admin/receivables/exportInvoice?" +
  1382. `orderNo=${this.state.selectedRowKeys}`;
  1383. },
  1384. exportAll() {
  1385. window.location.href =
  1386. globalConfig.context +
  1387. "/api/admin/receivables/exportReceivables?" +
  1388. `orderNo=${
  1389. this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1390. }&buyerName=${
  1391. this.state.nameSearch ? this.state.nameSearch : ""
  1392. }&departmentId=${
  1393. this.state.departmenttList ? this.state.departmenttList : ""
  1394. }&contractNo=${
  1395. this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1396. }&processStatus=${this.state.processStatusSearch}`;
  1397. },
  1398. exportWater() {
  1399. window.location.href =
  1400. globalConfig.context +
  1401. "/api/admin/receivables/exportMyBill?" +
  1402. `orderNo=${this.state.selectedRowKeys}&whoType=1`;
  1403. },
  1404. printAll() {
  1405. this.setState({
  1406. dvisible: true,
  1407. });
  1408. this.loadData(1, 9999);
  1409. },
  1410. timeData() {
  1411. this.setState({
  1412. loading: true,
  1413. });
  1414. $.ajax({
  1415. method: "get",
  1416. dataType: "json",
  1417. crossDomain: false,
  1418. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  1419. data: {
  1420. orderNo: this.state.selectedRowKeys[0],
  1421. pageSize: 9999,
  1422. },
  1423. success: function (data) {
  1424. let theArr = [];
  1425. if (!data.data || !data.data.list) {
  1426. if (data.error && data.error.length) {
  1427. message.warning(data.error[0].message);
  1428. }
  1429. } else {
  1430. for (let i = 0; i < data.data.list.length; i++) {
  1431. let thisdata = data.data.list[i];
  1432. theArr.push({
  1433. key: i + 1,
  1434. id: thisdata.id, //ID
  1435. orderNo: thisdata.orderNo, //订单编号
  1436. taskName: thisdata.taskName, //任务名称
  1437. userName: thisdata.userName, //客户名称
  1438. cname: thisdata.cname, //项目品类
  1439. taskStatus: thisdata.taskStatus, //任务状态
  1440. receiverName: thisdata.receiverName, //负责人
  1441. hours: thisdata.hours, //任务工时
  1442. depName: thisdata.depName, //派单公司
  1443. contractNo: thisdata.contractNo,
  1444. signTime: thisdata.signTime,
  1445. creteTime: thisdata.creteTime,
  1446. projectStatus: thisdata.projectStatus,
  1447. commodityPrice: thisdata.commodityPrice, //价格
  1448. commodityQuantity: thisdata.commodityQuantity, //数量
  1449. salesmanName: thisdata.salesmanName, //订单负责人
  1450. taskDistributionTime: thisdata.taskDistributionTime,
  1451. taskEndTime: thisdata.taskEndTime,
  1452. outsource: thisdata.outsource,
  1453. splitStatus: thisdata.splitStatus,
  1454. splitSuper: thisdata.splitSuper,
  1455. splitId: thisdata.splitId,
  1456. });
  1457. }
  1458. }
  1459. this.setState({
  1460. timeDataList: theArr,
  1461. });
  1462. }.bind(this),
  1463. }).always(
  1464. function () {
  1465. this.setState({
  1466. loading: false,
  1467. });
  1468. }.bind(this)
  1469. );
  1470. },
  1471. exportTime() {
  1472. const data = {
  1473. orderNo: this.state.selectedRowKeys[0],
  1474. pageSize: 9999,
  1475. };
  1476. window.location.href =
  1477. globalConfig.context +
  1478. "/api/admin/orderProject/exportMyTaskList?" +
  1479. $.param(data);
  1480. },
  1481. exportPro() {
  1482. const data = {
  1483. orderNo: this.state.selectedRowKeys[0],
  1484. };
  1485. window.location.href =
  1486. globalConfig.context +
  1487. "/api/admin/newOrder/exportOrderTaskData?" +
  1488. $.param(data);
  1489. },
  1490. exportCui() {
  1491. var data = {
  1492. orderNo: this.state.selectedRowKeys[0]
  1493. ? this.state.selectedRowKeys[0]
  1494. : undefined, //订单编号
  1495. // specially: 1,
  1496. pageSize: 9999,
  1497. };
  1498. window.location.href =
  1499. globalConfig.context +
  1500. "/api/admin/newOrder/exportOrderDunData?" +
  1501. $.param(data);
  1502. },
  1503. cuiData() {
  1504. this.setState({
  1505. loading: true,
  1506. });
  1507. $.ajax({
  1508. method: "get",
  1509. dataType: "json",
  1510. crossDomain: false,
  1511. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1512. data: {
  1513. orderNo: this.state.selectedRowKeys[0],
  1514. pageSize: 9999,
  1515. },
  1516. success: function (data) {
  1517. let theArr = [];
  1518. if (!data.data || !data.data.list) {
  1519. if (data.error && data.error.length) {
  1520. message.warning(data.error[0].message);
  1521. }
  1522. } else {
  1523. for (let i = 0; i < data.data.list.length; i++) {
  1524. let thisdata = data.data.list[i];
  1525. theArr.push({
  1526. key: i + 1,
  1527. orderNo: thisdata.orderNo,
  1528. contractNo: thisdata.contractNo,
  1529. userName: thisdata.userName,
  1530. buyerName: thisdata.buyerName,
  1531. departmentName: thisdata.departmentName,
  1532. salesmanName: thisdata.salesmanName,
  1533. depName: thisdata.depName,
  1534. orderStatus: thisdata.orderStatus,
  1535. projectStatus: thisdata.projectStatus,
  1536. totalAmount: thisdata.totalAmount,
  1537. liquidationStatus: thisdata.liquidationStatus,
  1538. settlementAmount: thisdata.settlementAmount,
  1539. accountsReceivable: thisdata.accountsReceivable,
  1540. dunSubject: thisdata.dunSubject,
  1541. startDate: thisdata.startDate,
  1542. taskStatus: thisdata.taskStatus,
  1543. cname: thisdata.cname,
  1544. id: thisdata.id,
  1545. taskName: thisdata.taskName,
  1546. hours: thisdata.hours,
  1547. taskDistributionTime: thisdata.taskDistributionTime,
  1548. taskEndTime: thisdata.taskEndTime,
  1549. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  1550. });
  1551. }
  1552. }
  1553. this.setState({
  1554. cuiDataList: theArr,
  1555. });
  1556. }.bind(this),
  1557. }).always(
  1558. function () {
  1559. this.setState({
  1560. loading: false,
  1561. });
  1562. }.bind(this)
  1563. );
  1564. },
  1565. cuiTabChange(index) {
  1566. this.setState({
  1567. cuiTabKey: index,
  1568. });
  1569. if (index == 2) {
  1570. this.setState({
  1571. loading: true,
  1572. });
  1573. $.ajax({
  1574. method: "get",
  1575. dataType: "json",
  1576. crossDomain: false,
  1577. url: globalConfig.context + "/api/admin/newOrder/arrearsDunList",
  1578. data: {
  1579. orderNo: this.state.selectedRowKeys[0],
  1580. pageSize: 9999,
  1581. },
  1582. success: function (data) {
  1583. let theArr = [];
  1584. if (data.error.length || data.data.list == "") {
  1585. if (data.error && data.error.length) {
  1586. message.warning(data.error[0].message);
  1587. }
  1588. } else {
  1589. for (let i = 0; i < data.data.list.length; i++) {
  1590. let thisdata = data.data.list[i];
  1591. let obj = thisdata;
  1592. obj.key = i;
  1593. theArr.push(obj);
  1594. }
  1595. }
  1596. this.setState({
  1597. qianDataList: theArr,
  1598. });
  1599. }.bind(this),
  1600. }).always(
  1601. function () {
  1602. this.setState({
  1603. loading: false,
  1604. });
  1605. }.bind(this)
  1606. );
  1607. }
  1608. },
  1609. proData() {
  1610. this.setState({
  1611. loading: true,
  1612. });
  1613. $.ajax({
  1614. method: "get",
  1615. dataType: "json",
  1616. crossDomain: false,
  1617. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1618. data: {
  1619. orderNo: this.state.selectedRowKeys[0],
  1620. pageSize: 9999,
  1621. },
  1622. success: function (data) {
  1623. let theArr = [];
  1624. let totalWaibao = 0;
  1625. if (!data.data) {
  1626. if (data.error && data.error.length) {
  1627. message.warning(data.error[0].message);
  1628. }
  1629. } else {
  1630. for (let i = 0; i < data.data.length; i++) {
  1631. let thisdata = data.data[i];
  1632. totalWaibao += thisdata.outsourcePrice;
  1633. theArr.push({
  1634. key: i + 1,
  1635. orderNo: thisdata.orderNo,
  1636. contractNo: thisdata.contractNo,
  1637. userName: thisdata.userName,
  1638. buyerName: thisdata.buyerName,
  1639. departmentName: thisdata.departmentName,
  1640. salesmanName: thisdata.salesmanName,
  1641. depName: thisdata.depName,
  1642. orderStatus: thisdata.orderStatus,
  1643. projectStatus: thisdata.projectStatus,
  1644. commodityName: thisdata.commodityName,
  1645. totalAmount: thisdata.totalAmount,
  1646. liquidationStatus: thisdata.liquidationStatus,
  1647. settlementAmount: thisdata.settlementAmount,
  1648. accountsReceivable: thisdata.accountsReceivable,
  1649. dunSubject: thisdata.dunSubject,
  1650. startDate: thisdata.startDate,
  1651. taskStatus: thisdata.taskStatus,
  1652. cname: thisdata.cname,
  1653. id: thisdata.id,
  1654. taskName: thisdata.taskName,
  1655. hours: thisdata.hours,
  1656. taskDistributionTime: thisdata.taskDistributionTime,
  1657. taskEndTime: thisdata.taskEndTime,
  1658. commodityQuantity: thisdata.commodityQuantity,
  1659. commodityPrice: thisdata.commodityPrice,
  1660. certificateNumber: thisdata.certificateNumber,
  1661. taskComment: thisdata.taskComment,
  1662. outsourceName: thisdata.outsourceName,
  1663. outsourcePrice: thisdata.outsourcePrice,
  1664. outsource: thisdata.outsource,
  1665. splitStatus: thisdata.splitStatus,
  1666. });
  1667. }
  1668. }
  1669. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  1670. this.setState({
  1671. proDataList: theArr,
  1672. totalWaibao,
  1673. });
  1674. }.bind(this),
  1675. }).always(
  1676. function () {
  1677. this.setState({
  1678. loading: false,
  1679. });
  1680. }.bind(this)
  1681. );
  1682. },
  1683. tableRowClickPro(record) {
  1684. this.setState({
  1685. pvisible: true,
  1686. record,
  1687. });
  1688. },
  1689. kaiPiaoData(record) {
  1690. this.setState({
  1691. avisible: true,
  1692. });
  1693. this.invoiceData(record.id);
  1694. },
  1695. invoiceData(id) {
  1696. this.setState({
  1697. loading: true,
  1698. });
  1699. $.ajax({
  1700. method: "get",
  1701. dataType: "json",
  1702. crossDomain: false,
  1703. url:
  1704. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  1705. data: {
  1706. id,
  1707. },
  1708. success: function (data) {
  1709. let thisdata = data.data;
  1710. let obj = {
  1711. contractNo: thisdata.contractNo,
  1712. orderNo: thisdata.orderNo,
  1713. approval: thisdata.approval,
  1714. type: thisdata.type,
  1715. status: thisdata.status,
  1716. remarks: thisdata.remarks,
  1717. invoiceType: thisdata.invoiceType,
  1718. unitName: thisdata.unitName,
  1719. taxNumber: thisdata.taxNumber,
  1720. amount: thisdata.amount,
  1721. banks: thisdata.banks,
  1722. content: thisdata.content,
  1723. unitAddress: thisdata.unitAddress,
  1724. invoiceRemarks: thisdata.invoiceRemarks,
  1725. unitMobile: thisdata.unitMobile,
  1726. post: thisdata.post,
  1727. addressee: thisdata.addressee,
  1728. addresseeMobile: thisdata.addresseeMobile,
  1729. addresseeProvince: thisdata.addresseeProvince,
  1730. addresseeCity: thisdata.addresseeCity,
  1731. addresseeArea: thisdata.addresseeArea,
  1732. alreadyAmount: thisdata.alreadyAmount,
  1733. recipientAddress: thisdata.recipientAddress,
  1734. orgCodeUrl: thisdata.voucherUrl
  1735. ? splitUrl(
  1736. thisdata.voucherUrl,
  1737. ",",
  1738. globalConfig.avatarHost + "/upload"
  1739. )
  1740. : [],
  1741. };
  1742. this.setState({
  1743. modalData: obj,
  1744. });
  1745. }.bind(this),
  1746. }).done(
  1747. function () {
  1748. this.setState({
  1749. loading: false,
  1750. });
  1751. }.bind(this)
  1752. );
  1753. },
  1754. visitCancels() {
  1755. this.setState({
  1756. avisible: false,
  1757. });
  1758. },
  1759. render() {
  1760. const formItemLayout = {
  1761. labelCol: { span: 8 },
  1762. wrapperCol: { span: 14 },
  1763. };
  1764. const { RangePicker } = DatePicker;
  1765. var departmentArr = this.state.departmentArr || [];
  1766. const { loading, selectedRowKeys, visible } = this.state;
  1767. const rowSelection = {
  1768. selectedRowKeys,
  1769. onChange: this.onSelectChange,
  1770. hideDefaultSelections: true,
  1771. type: "radio",
  1772. };
  1773. return (
  1774. <div className="user-content">
  1775. {this.state.resVisible ? (
  1776. <ResolutionDetail
  1777. cancel={this.resCancel}
  1778. detail={this.state.resRecord}
  1779. visible={this.state.resVisible}
  1780. id={this.state.resRecord.orderNo}
  1781. />
  1782. ) : (
  1783. ""
  1784. )}
  1785. <div className="content-title" style={{ marginBottom: 10 }}>
  1786. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1787. </div>
  1788. <Tabs defaultActiveKey="2" className="test">
  1789. <TabPane tab="搜索" key="2">
  1790. <div className="user-search" style={{ marginLeft: 10 }}>
  1791. <Input
  1792. placeholder="订单编号"
  1793. value={this.state.orderNoSearch}
  1794. onChange={(e) => {
  1795. this.setState({ orderNoSearch: e.target.value });
  1796. }}
  1797. />
  1798. <Input
  1799. placeholder="客户名称"
  1800. value={this.state.nameSearch}
  1801. onChange={(e) => {
  1802. this.setState({ nameSearch: e.target.value });
  1803. }}
  1804. />
  1805. <Select
  1806. placeholder="订单部门"
  1807. style={{ width: 120, marginRight: 10 }}
  1808. value={this.state.departmenttList}
  1809. onChange={(e) => {
  1810. this.setState({ departmenttList: e });
  1811. }}
  1812. >
  1813. {departmentArr.map(function (item) {
  1814. return (
  1815. <Select.Option key={item.id}>{item.name}</Select.Option>
  1816. );
  1817. })}
  1818. </Select>
  1819. <Input
  1820. placeholder="合同编号"
  1821. value={this.state.contractNoSearch}
  1822. onChange={(e) => {
  1823. this.setState({
  1824. contractNoSearch: e.target.value,
  1825. });
  1826. }}
  1827. />
  1828. <Select
  1829. placeholder="流程状态"
  1830. onChange={(e) => {
  1831. this.setState({ processStatusSearch: e });
  1832. }}
  1833. style={{ width: 120, marginRight: 5 }}
  1834. value={this.state.processStatusSearch}
  1835. >
  1836. <Option value="3">未分配</Option>
  1837. <Option value="4">已分配</Option>
  1838. <Option value="9">已驳回</Option>
  1839. </Select>
  1840. <Select
  1841. placeholder="结算状态"
  1842. onChange={(e) => {
  1843. this.setState({ liquidationStatus: e });
  1844. }}
  1845. style={{ width: 120, marginRight: 5 }}
  1846. value={this.state.liquidationStatus}
  1847. >
  1848. <Option value="0">首付待付清</Option>
  1849. <Option value="1">尾款待付清</Option>
  1850. <Option value="2">已付清</Option>
  1851. </Select>
  1852. <Select
  1853. style={{ width: 120 }}
  1854. placeholder="签单金额"
  1855. value={this.state.amountStatus}
  1856. onChange={(e) => {
  1857. this.setState({
  1858. amountStatus: e,
  1859. });
  1860. }}
  1861. >
  1862. <Option value="0">10万元以下</Option>
  1863. <Option value="1">10~20万元</Option>
  1864. <Option value="2">20~30万元</Option>
  1865. <Option value="3">30~40万元</Option>
  1866. <Option value="4">40万元以上</Option>
  1867. </Select>
  1868. <span style={{}}>下单日期:</span>
  1869. <RangePicker
  1870. style={{ width: 170 }}
  1871. value={[
  1872. this.state.releaseDate[0]
  1873. ? moment(this.state.releaseDate[0])
  1874. : null,
  1875. this.state.releaseDate[1]
  1876. ? moment(this.state.releaseDate[1])
  1877. : null,
  1878. ]}
  1879. onChange={(data, dataString) => {
  1880. this.setState({ releaseDate: dataString });
  1881. }}
  1882. />
  1883. <span style={{}}>最近收款:</span>
  1884. <RangePicker
  1885. style={{ width: 170 }}
  1886. value={[
  1887. this.state.shouKuanDate[0]
  1888. ? moment(this.state.shouKuanDate[0])
  1889. : null,
  1890. this.state.shouKuanDate[1]
  1891. ? moment(this.state.shouKuanDate[1])
  1892. : null,
  1893. ]}
  1894. onChange={(data, dataString) => {
  1895. this.setState({ shouKuanDate: dataString });
  1896. }}
  1897. />
  1898. <Button
  1899. type="primary"
  1900. onClick={this.search}
  1901. style={{ marginLeft: 10 }}
  1902. disabled={this.state.loadingA ? true : false}
  1903. >
  1904. 搜索
  1905. </Button>
  1906. <Button onClick={this.reset}>重置</Button>
  1907. </div>
  1908. </TabPane>
  1909. <TabPane tab="打印" key="3">
  1910. <Button
  1911. type="primary"
  1912. style={{ margin: "11px 0px 10px 10px" }}
  1913. onClick={this.printAll}
  1914. disabled={!this.state.dataSource.length}
  1915. >
  1916. 打印所有列表信息
  1917. </Button>
  1918. <Button
  1919. type="primary"
  1920. disabled={this.state.selectedRowKeys.length != 1}
  1921. style={{ margin: "11px 0px 10px 10px" }}
  1922. onClick={() => {
  1923. this.inRecordData();
  1924. this.setState({
  1925. bvisible: true,
  1926. });
  1927. }}
  1928. >
  1929. 打印开票详情
  1930. </Button>
  1931. <Button
  1932. type="primary"
  1933. disabled={this.state.selectedRowKeys.length != 1}
  1934. style={{ margin: "11px 0px 10px 10px" }}
  1935. onClick={() => {
  1936. this.waterData();
  1937. this.setState({
  1938. cvisible: true,
  1939. });
  1940. }}
  1941. >
  1942. 打印收款流水
  1943. </Button>
  1944. <Button
  1945. type="primary"
  1946. disabled={this.state.selectedRowKeys.length != 1}
  1947. style={{ margin: "11px 0px 10px 10px" }}
  1948. onClick={() => {
  1949. this.timeData();
  1950. this.setState({
  1951. timeVisible: true,
  1952. });
  1953. }}
  1954. >
  1955. 打印工时信息
  1956. </Button>
  1957. <Button
  1958. type="primary"
  1959. disabled={this.state.selectedRowKeys.length != 1}
  1960. style={{ margin: "11px 0px 10px 10px" }}
  1961. onClick={() => {
  1962. this.cuiData();
  1963. this.setState({
  1964. cuiVisible: true,
  1965. });
  1966. }}
  1967. >
  1968. 打印催款信息
  1969. </Button>
  1970. <Button
  1971. type="primary"
  1972. disabled={this.state.selectedRowKeys.length != 1}
  1973. style={{ margin: "11px 0px 10px 10px" }}
  1974. onClick={() => {
  1975. this.proData();
  1976. this.setState({
  1977. proVisible: true,
  1978. });
  1979. }}
  1980. >
  1981. 打印项目进度
  1982. </Button>
  1983. </TabPane>
  1984. <TabPane tab="导出Excel" key="4">
  1985. <Button
  1986. type="primary"
  1987. style={{ margin: "11px 0px 10px 10px" }}
  1988. onClick={this.exportAll}
  1989. >
  1990. 导出当前列表
  1991. </Button>
  1992. <Button
  1993. type="primary"
  1994. disabled={this.state.selectedRowKeys.length != 1}
  1995. style={{ margin: "11px 0px 10px 10px" }}
  1996. onClick={this.exportKaip}
  1997. >
  1998. 导出所选开票详情
  1999. </Button>
  2000. <Button
  2001. type="primary"
  2002. disabled={this.state.selectedRowKeys.length != 1}
  2003. style={{ margin: "11px 0px 10px 10px" }}
  2004. onClick={this.exportWater}
  2005. >
  2006. 导出所选收款详情流水
  2007. </Button>
  2008. <Button
  2009. type="primary"
  2010. disabled={this.state.selectedRowKeys.length != 1}
  2011. style={{ margin: "11px 0px 10px 10px" }}
  2012. onClick={this.exportTime}
  2013. >
  2014. 导出所选工时信息
  2015. </Button>
  2016. <Button
  2017. type="primary"
  2018. disabled={this.state.selectedRowKeys.length != 1}
  2019. style={{ margin: "11px 0px 10px 10px" }}
  2020. onClick={this.exportCui}
  2021. >
  2022. 导出催款信息
  2023. </Button>
  2024. <Button
  2025. type="primary"
  2026. disabled={this.state.selectedRowKeys.length != 1}
  2027. style={{ margin: "11px 0px 10px 10px" }}
  2028. onClick={this.exportPro}
  2029. >
  2030. 导出项目进度
  2031. </Button>
  2032. </TabPane>
  2033. <TabPane tab="查看" key="5">
  2034. <Button
  2035. type="primary"
  2036. disabled={this.state.selectedRowKeys.length != 1}
  2037. style={{ margin: "11px 0px 10px 10px" }}
  2038. onClick={() => {
  2039. this.inRecordData();
  2040. this.setState({
  2041. bvisible: true,
  2042. });
  2043. }}
  2044. >
  2045. 查看开票详情
  2046. </Button>
  2047. <Button
  2048. type="primary"
  2049. disabled={this.state.selectedRowKeys.length != 1}
  2050. style={{ margin: "11px 0px 10px 10px" }}
  2051. onClick={() => {
  2052. this.waterData();
  2053. this.setState({
  2054. cvisible: true,
  2055. });
  2056. }}
  2057. >
  2058. 详情收款流水
  2059. </Button>
  2060. <Button
  2061. type="primary"
  2062. disabled={this.state.selectedRowKeys.length != 1}
  2063. style={{ margin: "11px 0px 10px 10px" }}
  2064. onClick={() => {
  2065. this.timeData();
  2066. this.setState({
  2067. timeVisible: true,
  2068. });
  2069. }}
  2070. >
  2071. 工时信息
  2072. </Button>
  2073. <Button
  2074. type="primary"
  2075. disabled={this.state.selectedRowKeys.length != 1}
  2076. style={{ margin: "11px 0px 10px 10px" }}
  2077. onClick={() => {
  2078. this.cuiData();
  2079. this.setState({
  2080. cuiVisible: true,
  2081. });
  2082. }}
  2083. >
  2084. 催款信息
  2085. </Button>
  2086. <Button
  2087. type="primary"
  2088. disabled={this.state.selectedRowKeys.length != 1}
  2089. style={{ margin: "11px 0px 10px 10px" }}
  2090. onClick={() => {
  2091. this.proData();
  2092. this.setState({
  2093. proVisible: true,
  2094. });
  2095. }}
  2096. >
  2097. 项目进度
  2098. </Button>
  2099. </TabPane>
  2100. <TabPane tab="更改表格显示数据" key="1">
  2101. <div style={{ marginLeft: 10 }}>
  2102. <ChooseList
  2103. columns={this.state.columns}
  2104. changeFn={this.changeList}
  2105. changeList={this.state.changeList}
  2106. top={55}
  2107. margin={11}
  2108. />
  2109. </div>
  2110. </TabPane>
  2111. {/* <TabPane tab="批量操作" key="6">
  2112. <Button
  2113. type="primary"
  2114. disabled={this.state.selectedRowKeys.length == 0}
  2115. style={{ margin: "0px 0px 10px 10px" }}
  2116. onClick={e => {
  2117. e.stopPropagation(),
  2118. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  2119. }}
  2120. >
  2121. 转交
  2122. </Button>
  2123. </TabPane> */}
  2124. </Tabs>
  2125. <div className="patent-table">
  2126. <Spin spinning={this.state.loadingA}>
  2127. <Table
  2128. bordered
  2129. columns={
  2130. this.state.changeList == undefined
  2131. ? this.state.columns
  2132. : this.state.changeList
  2133. }
  2134. dataSource={this.state.dataSource}
  2135. rowSelection={rowSelection}
  2136. scroll={{ x: "max-content", y: 0 }}
  2137. pagination={this.state.pagination}
  2138. onRowDoubleClick={this.tableRowClick.bind(this)}
  2139. size="small"
  2140. />
  2141. </Spin>
  2142. <p
  2143. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  2144. >
  2145. {
  2146. <span style={{ marginRight: 10 }}>
  2147. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  2148. </span>
  2149. }
  2150. {
  2151. <span>
  2152. {`合同额总计(万元):${
  2153. this.state.totalHui ? this.state.totalHui : "0"
  2154. }`}
  2155. </span>
  2156. }
  2157. </p>
  2158. </div>
  2159. <Assign
  2160. title="任务"
  2161. selApi={"/api/admin/newOrder/updateFinance"}
  2162. data={this.state.assignDataY}
  2163. showDesc={this.state.assignVisibleY}
  2164. closeDesc={this.closeAssignY.bind(this)}
  2165. // fenpaiData={8}
  2166. specially={0}
  2167. roleName={this.state.nub}
  2168. requestMethod={"get"}
  2169. />
  2170. <OrderDesc
  2171. data={this.state.RowData}
  2172. showDesc={this.state.showDesc}
  2173. closeDesc={this.closeDesc.bind(this)}
  2174. />
  2175. <Receivable
  2176. title="收款记录"
  2177. api="/api/admin/financial/addReceiptsFlow"
  2178. data={this.state.assignDataX}
  2179. showDesc={this.state.assignVisibleX}
  2180. closeDesc={this.closeAssignX.bind(this)}
  2181. />
  2182. <Modal
  2183. visible={this.state.boHuiVisible}
  2184. width="400px"
  2185. title="驳回备注"
  2186. footer=""
  2187. onOk={this.boHuiOk}
  2188. onCancel={this.boHuiCancel}
  2189. >
  2190. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  2191. <Spin spinning={this.state.loading}>
  2192. <FormItem
  2193. labelCol={{ span: 5 }}
  2194. wrapperCol={{ span: 16 }}
  2195. label={
  2196. <span>
  2197. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  2198. </span>
  2199. }
  2200. >
  2201. <Input
  2202. type="textarea"
  2203. rows={4}
  2204. placeholder="请输入驳回原因"
  2205. value={this.state.content}
  2206. onChange={(e) => {
  2207. this.setState({ content: e.target.value });
  2208. }}
  2209. />
  2210. </FormItem>
  2211. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  2212. <Button
  2213. type="primary"
  2214. htmlType="submit"
  2215. style={{ marginRight: 20 }}
  2216. >
  2217. 驳回
  2218. </Button>
  2219. <Button
  2220. type="default"
  2221. onClick={() => {
  2222. this.boHuiCancel();
  2223. }}
  2224. >
  2225. 取消
  2226. </Button>
  2227. </FormItem>
  2228. </Spin>
  2229. </Form>
  2230. </Modal>
  2231. <Modal
  2232. visible={this.state.bvisible}
  2233. footer=""
  2234. title="开票历史记录"
  2235. className="admin-desc-content"
  2236. width="900px"
  2237. onCancel={this.inRecordCanl}
  2238. >
  2239. <Spin spinning={this.state.loading}>
  2240. <div
  2241. className="patent-table"
  2242. ref={(e) => {
  2243. this.refs.kaiPiao = e;
  2244. }}
  2245. >
  2246. <Table
  2247. columns={this.state.columnsDate}
  2248. dataSource={this.state.recordData}
  2249. onRowClick={this.kaiPiaoData}
  2250. pagination={false}
  2251. bordered
  2252. size="small"
  2253. />
  2254. <div className="clearfix" style={{ marginTop: "20px" }}>
  2255. <FormItem
  2256. className="half-item"
  2257. {...formItemLayout}
  2258. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2259. >
  2260. <span>{this.state.sum + "(万元)"}</span>
  2261. </FormItem>
  2262. </div>
  2263. <ReactToPrint
  2264. trigger={() => (
  2265. <Button
  2266. type="primary"
  2267. style={{
  2268. float: "right",
  2269. // marginTop: 10,
  2270. position: "absolute",
  2271. top: -54,
  2272. right: 30,
  2273. }}
  2274. >
  2275. 打印
  2276. </Button>
  2277. )}
  2278. content={() => this.refs.kaiPiao}
  2279. />
  2280. </div>
  2281. </Spin>
  2282. </Modal>
  2283. <Modal
  2284. visible={this.state.cvisible}
  2285. footer=""
  2286. title="详细收款流水"
  2287. className="admin-desc-content"
  2288. width="1300px"
  2289. onCancel={this.waterCanl}
  2290. >
  2291. <Spin spinning={this.state.loading}>
  2292. <div
  2293. className="patent-table"
  2294. ref={(e) => {
  2295. this.refs.shouKuan = e;
  2296. }}
  2297. >
  2298. <Table
  2299. columns={this.state.waterlistDate}
  2300. dataSource={this.state.waterData}
  2301. pagination={false}
  2302. scroll={{ x: "max-content", y: 0 }}
  2303. bordered
  2304. size="small"
  2305. />
  2306. <div className="clearfix" style={{ marginTop: "20px" }}>
  2307. <FormItem
  2308. className="half-item"
  2309. {...formItemLayout}
  2310. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  2311. >
  2312. <span>{this.state.waterSum + "(万元)"}</span>
  2313. </FormItem>
  2314. </div>
  2315. <ReactToPrint
  2316. trigger={() => (
  2317. <Button
  2318. type="primary"
  2319. style={{
  2320. float: "right",
  2321. position: "absolute",
  2322. top: -54,
  2323. right: 30,
  2324. }}
  2325. >
  2326. 打印
  2327. </Button>
  2328. )}
  2329. content={() => this.refs.shouKuan}
  2330. />
  2331. </div>
  2332. </Spin>
  2333. </Modal>
  2334. <Modal
  2335. visible={this.state.dvisible}
  2336. footer=""
  2337. title="所有列表信息"
  2338. className="admin-desc-content"
  2339. width="1300px"
  2340. onCancel={() => {
  2341. this.loadData();
  2342. this.setState({
  2343. dvisible: false,
  2344. });
  2345. }}
  2346. >
  2347. <Spin spinning={this.state.loading}>
  2348. <div
  2349. className="patent-table"
  2350. style={{
  2351. // width: 900,
  2352. // position: "relative",
  2353. // left: "50%",
  2354. // transform: "translate(-50%)",
  2355. padding: "25px 0 30px 30px",
  2356. }}
  2357. ref={(e) => {
  2358. this.refs.all = e;
  2359. }}
  2360. >
  2361. <Table
  2362. columns={this.state.printColumns}
  2363. dataSource={this.state.dataSource}
  2364. pagination={false}
  2365. bordered
  2366. size="small"
  2367. />
  2368. </div>
  2369. </Spin>
  2370. <ReactToPrint
  2371. trigger={() => (
  2372. <Button
  2373. type="primary"
  2374. style={{
  2375. float: "right",
  2376. marginTop: 10,
  2377. position: "absolute",
  2378. top: 0,
  2379. right: 30,
  2380. }}
  2381. >
  2382. 打印
  2383. </Button>
  2384. )}
  2385. content={() => this.refs.all}
  2386. />
  2387. </Modal>
  2388. <Modal
  2389. visible={this.state.timeVisible}
  2390. footer=""
  2391. title="工时详情"
  2392. className="admin-desc-content"
  2393. width="1300px"
  2394. pagination={false}
  2395. onCancel={() => {
  2396. this.loadData();
  2397. this.setState({
  2398. timeVisible: false,
  2399. });
  2400. }}
  2401. >
  2402. <Spin spinning={this.state.loading}>
  2403. <Project
  2404. record={this.state.record}
  2405. visible={this.state.pvisible}
  2406. cancel={() => {
  2407. this.setState({ pvisible: false });
  2408. }}
  2409. />
  2410. <div
  2411. className="patent-table"
  2412. style={
  2413. {
  2414. // width: 900,
  2415. // position: "relative",
  2416. // left: "50%",
  2417. // transform: "translate(-50%)",
  2418. // padding: "25px 0 30px 30px"
  2419. }
  2420. }
  2421. ref={(e) => {
  2422. this.refs.all = e;
  2423. }}
  2424. >
  2425. <Table
  2426. columns={this.state.timeColumns}
  2427. dataSource={this.state.timeDataList}
  2428. onRowClick={this.tableRowClickPro}
  2429. scroll={{ x: "max-content", y: 0 }}
  2430. pagination={false}
  2431. bordered
  2432. size="small"
  2433. />
  2434. </div>
  2435. </Spin>
  2436. <ReactToPrint
  2437. trigger={() => (
  2438. <Button
  2439. type="primary"
  2440. style={{
  2441. float: "right",
  2442. marginTop: 10,
  2443. position: "absolute",
  2444. top: 0,
  2445. right: 30,
  2446. }}
  2447. >
  2448. 打印
  2449. </Button>
  2450. )}
  2451. content={() => this.refs.all}
  2452. />
  2453. </Modal>
  2454. <Modal
  2455. visible={this.state.cuiVisible}
  2456. footer=""
  2457. title="催款详情"
  2458. className="admin-desc-content"
  2459. width="1300px"
  2460. pagination={false}
  2461. onCancel={() => {
  2462. this.loadData();
  2463. this.setState({
  2464. cuiVisible: false,
  2465. cuiTabKey: "1",
  2466. });
  2467. }}
  2468. >
  2469. <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  2470. <TabPane tab="催款节点" key="1">
  2471. <Spin spinning={this.state.loading}>
  2472. <div
  2473. className="patent-table"
  2474. ref={(e) => {
  2475. this.refs.all = e;
  2476. }}
  2477. >
  2478. <Table
  2479. columns={this.state.cuiColumns}
  2480. dataSource={this.state.cuiDataList}
  2481. scroll={{ x: "max-content", y: 0 }}
  2482. pagination={false}
  2483. bordered
  2484. size="small"
  2485. />
  2486. </div>
  2487. <ReactToPrint
  2488. trigger={() => (
  2489. <Button
  2490. type="primary"
  2491. style={{
  2492. float: "right",
  2493. marginTop: 10,
  2494. position: "absolute",
  2495. top: "-60px",
  2496. right: 30,
  2497. }}
  2498. >
  2499. 打印
  2500. </Button>
  2501. )}
  2502. content={() => this.refs.all}
  2503. />
  2504. </Spin>
  2505. </TabPane>
  2506. <TabPane tab="欠款催收记录" key="2">
  2507. <Spin spinning={this.state.loading}>
  2508. <div
  2509. className="patent-table"
  2510. ref={(e) => {
  2511. this.refs.all = e;
  2512. }}
  2513. >
  2514. <Table
  2515. columns={this.state.qianColumns}
  2516. dataSource={this.state.qianDataList}
  2517. scroll={{ x: "max-content", y: 0 }}
  2518. pagination={false}
  2519. bordered
  2520. size="small"
  2521. />
  2522. </div>
  2523. <ReactToPrint
  2524. trigger={() => (
  2525. <Button
  2526. type="primary"
  2527. style={{
  2528. float: "right",
  2529. marginTop: 10,
  2530. position: "absolute",
  2531. top: "-60px",
  2532. right: 30,
  2533. }}
  2534. >
  2535. 打印
  2536. </Button>
  2537. )}
  2538. content={() => this.refs.all}
  2539. />
  2540. </Spin>
  2541. </TabPane>
  2542. </Tabs>
  2543. </Modal>
  2544. <Modal
  2545. visible={this.state.proVisible}
  2546. footer=""
  2547. title="项目进度"
  2548. className="admin-desc-content"
  2549. width="1300px"
  2550. pagination={false}
  2551. onCancel={() => {
  2552. this.loadData();
  2553. this.setState({
  2554. proVisible: false,
  2555. });
  2556. }}
  2557. >
  2558. <Spin spinning={this.state.loading}>
  2559. <Project
  2560. record={this.state.record}
  2561. visible={this.state.pvisible}
  2562. cancel={() => {
  2563. this.setState({ pvisible: false });
  2564. }}
  2565. />
  2566. <div
  2567. className="patent-table"
  2568. style={
  2569. {
  2570. // width: 900,
  2571. // position: "relative",
  2572. // left: "50%",
  2573. // transform: "translate(-50%)",
  2574. // padding: "25px 0 30px 30px"
  2575. }
  2576. }
  2577. ref={(e) => {
  2578. this.refs.all = e;
  2579. }}
  2580. >
  2581. <Table
  2582. columns={this.state.proColumns}
  2583. dataSource={this.state.proDataList}
  2584. onRowClick={this.tableRowClickPro}
  2585. scroll={{ x: "max-content", y: 0 }}
  2586. pagination={false}
  2587. bordered
  2588. size="small"
  2589. />
  2590. </div>
  2591. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  2592. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  2593. </span>
  2594. </Spin>
  2595. <ReactToPrint
  2596. trigger={() => (
  2597. <Button
  2598. type="primary"
  2599. style={{
  2600. float: "right",
  2601. marginTop: 10,
  2602. position: "absolute",
  2603. top: 0,
  2604. right: 30,
  2605. }}
  2606. >
  2607. 打印
  2608. </Button>
  2609. )}
  2610. content={() => this.refs.all}
  2611. />
  2612. </Modal>
  2613. <KaiPiaoModal
  2614. visible={this.state.avisible}
  2615. data={this.state.modalData}
  2616. onCancel={this.visitCancels}
  2617. loading={this.state.loading}
  2618. />
  2619. </div>
  2620. );
  2621. },
  2622. });
  2623. export default ShouKuang;