shouKuang.jsx 64 KB

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