shouKuanAll.jsx 79 KB

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