shouKuang.jsx 62 KB

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