shouKuang.jsx 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219
  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. },
  1053. success: function(data) {
  1054. let theArr = [];
  1055. let waterSum = 0;
  1056. if (!data.data || !data.data.list) {
  1057. if (data.error && data.error.length) {
  1058. message.warning(data.error[0].message);
  1059. }
  1060. } else {
  1061. for (let i = 0; i < data.data.list.length; i++) {
  1062. let thisdata = data.data.list[i];
  1063. waterSum += parseFloat(thisdata.transactionAmount);
  1064. theArr.push({
  1065. key: i,
  1066. orderNo: thisdata.orderNo,
  1067. billNo: thisdata.billNo,
  1068. transactionAmount: thisdata.transactionAmount,
  1069. payeeName: thisdata.payeeName,
  1070. payerName: thisdata.payerName,
  1071. transactionSubject: thisdata.transactionSubject,
  1072. transactionChannel: thisdata.transactionChannel,
  1073. financialPayTimes: thisdata.financialPayTimes,
  1074. financialPayNo: thisdata.financialPayNo,
  1075. createrName: thisdata.createrName,
  1076. saleName: thisdata.saleName,
  1077. createTimes: thisdata.createTimes,
  1078. type: thisdata.type == 0 ? "手工" : "批量"
  1079. });
  1080. }
  1081. }
  1082. this.setState({
  1083. waterData: theArr,
  1084. waterSum: (Math.round(waterSum * 10000) / 10000).toFixed(4)
  1085. });
  1086. }.bind(this)
  1087. }).always(
  1088. function() {
  1089. this.setState({
  1090. loading: false
  1091. });
  1092. }.bind(this)
  1093. );
  1094. },
  1095. waterCanl() {
  1096. this.setState({
  1097. cvisible: false
  1098. });
  1099. },
  1100. exportKaip() {
  1101. window.location.href =
  1102. globalConfig.context +
  1103. "/api/admin/receivables/exportInvoice?" +
  1104. `orderNo=${this.state.selectedRowKeys}`;
  1105. },
  1106. exportAll() {
  1107. window.location.href =
  1108. globalConfig.context +
  1109. "/api/admin/receivables/exportReceivables?" +
  1110. `orderNo=${
  1111. this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1112. }&buyerName=${
  1113. this.state.nameSearch ? this.state.nameSearch : ""
  1114. }&departmentId=${
  1115. this.state.departmenttList ? this.state.departmenttList : ""
  1116. }&contractNo=${
  1117. this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1118. }&processStatus=${this.state.processStatusSearch}`;
  1119. },
  1120. exportWater() {
  1121. window.location.href =
  1122. globalConfig.context +
  1123. "/api/admin/receivables/exportMyBill?" +
  1124. `orderNo=${this.state.selectedRowKeys}`;
  1125. },
  1126. printAll() {
  1127. this.setState({
  1128. dvisible: true
  1129. });
  1130. this.loadData(1, 9999);
  1131. },
  1132. timeData() {
  1133. this.setState({
  1134. loading: true
  1135. });
  1136. $.ajax({
  1137. method: "get",
  1138. dataType: "json",
  1139. crossDomain: false,
  1140. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  1141. data: {
  1142. orderNo: this.state.selectedRowKeys[0],
  1143. pageSize: 9999
  1144. },
  1145. success: function(data) {
  1146. let theArr = [];
  1147. if (!data.data || !data.data.list) {
  1148. if (data.error && data.error.length) {
  1149. message.warning(data.error[0].message);
  1150. }
  1151. } else {
  1152. for (let i = 0; i < data.data.list.length; i++) {
  1153. let thisdata = data.data.list[i];
  1154. theArr.push({
  1155. key: i + 1,
  1156. orderNo: thisdata.orderNo,
  1157. contractNo: thisdata.contractNo,
  1158. userName: thisdata.userName,
  1159. receiverName: thisdata.receiverName,
  1160. taskStatus: thisdata.taskStatus,
  1161. cname: thisdata.cname,
  1162. id: thisdata.id,
  1163. taskName: thisdata.taskName,
  1164. hours: thisdata.hours,
  1165. taskDistributionTime: thisdata.taskDistributionTime,
  1166. taskEndTime: thisdata.taskEndTime
  1167. });
  1168. }
  1169. }
  1170. this.setState({
  1171. timeDataList: theArr
  1172. });
  1173. }.bind(this)
  1174. }).always(
  1175. function() {
  1176. this.setState({
  1177. loading: false
  1178. });
  1179. }.bind(this)
  1180. );
  1181. },
  1182. exportTime() {
  1183. const data = {
  1184. orderNo: this.state.selectedRowKeys[0],
  1185. pageSize: 9999
  1186. };
  1187. window.location.href =
  1188. globalConfig.context +
  1189. "/api/admin/orderProject/exportMyTaskList?" +
  1190. $.param(data);
  1191. },
  1192. exportPro() {
  1193. const data = {
  1194. orderNo: this.state.selectedRowKeys[0]
  1195. };
  1196. window.location.href =
  1197. globalConfig.context +
  1198. "/api/admin/newOrder/exportOrderTaskData?" +
  1199. $.param(data);
  1200. },
  1201. exportCui() {
  1202. var data = {
  1203. orderNo: this.state.selectedRowKeys[0]
  1204. ? this.state.selectedRowKeys[0]
  1205. : undefined, //订单编号
  1206. // specially: 1,
  1207. pageSize: 9999
  1208. };
  1209. window.location.href =
  1210. globalConfig.context +
  1211. "/api/admin/newOrder/exportOrderDunData?" +
  1212. $.param(data);
  1213. },
  1214. cuiData() {
  1215. this.setState({
  1216. loading: true
  1217. });
  1218. $.ajax({
  1219. method: "get",
  1220. dataType: "json",
  1221. crossDomain: false,
  1222. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1223. data: {
  1224. orderNo: this.state.selectedRowKeys[0],
  1225. pageSize: 9999
  1226. },
  1227. success: function(data) {
  1228. let theArr = [];
  1229. if (!data.data || !data.data.list) {
  1230. if (data.error && data.error.length) {
  1231. message.warning(data.error[0].message);
  1232. }
  1233. } else {
  1234. for (let i = 0; i < data.data.list.length; i++) {
  1235. let thisdata = data.data.list[i];
  1236. theArr.push({
  1237. key: i + 1,
  1238. orderNo: thisdata.orderNo,
  1239. contractNo: thisdata.contractNo,
  1240. userName: thisdata.userName,
  1241. buyerName: thisdata.buyerName,
  1242. departmentName: thisdata.departmentName,
  1243. salesmanName: thisdata.salesmanName,
  1244. depName: thisdata.depName,
  1245. orderStatus: thisdata.orderStatus,
  1246. projectStatus: thisdata.projectStatus,
  1247. totalAmount: thisdata.totalAmount,
  1248. liquidationStatus: thisdata.liquidationStatus,
  1249. settlementAmount: thisdata.settlementAmount,
  1250. accountsReceivable: thisdata.accountsReceivable,
  1251. dunSubject: thisdata.dunSubject,
  1252. startDate: thisdata.startDate,
  1253. taskStatus: thisdata.taskStatus,
  1254. cname: thisdata.cname,
  1255. id: thisdata.id,
  1256. taskName: thisdata.taskName,
  1257. hours: thisdata.hours,
  1258. taskDistributionTime: thisdata.taskDistributionTime,
  1259. taskEndTime: thisdata.taskEndTime
  1260. });
  1261. }
  1262. }
  1263. this.setState({
  1264. cuiDataList: theArr
  1265. });
  1266. }.bind(this)
  1267. }).always(
  1268. function() {
  1269. this.setState({
  1270. loading: false
  1271. });
  1272. }.bind(this)
  1273. );
  1274. },
  1275. proData() {
  1276. this.setState({
  1277. loading: true
  1278. });
  1279. $.ajax({
  1280. method: "get",
  1281. dataType: "json",
  1282. crossDomain: false,
  1283. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1284. data: {
  1285. orderNo: this.state.selectedRowKeys[0],
  1286. pageSize: 9999
  1287. },
  1288. success: function(data) {
  1289. let theArr = [];
  1290. let totalWaibao = 0;
  1291. if (!data.data) {
  1292. if (data.error && data.error.length) {
  1293. message.warning(data.error[0].message);
  1294. }
  1295. } else {
  1296. for (let i = 0; i < data.data.length; i++) {
  1297. let thisdata = data.data[i];
  1298. totalWaibao += thisdata.outsourcePrice;
  1299. theArr.push({
  1300. key: i + 1,
  1301. id: thisdata.id,
  1302. orderNo: thisdata.orderNo,
  1303. contractNo: thisdata.contractNo,
  1304. userName: thisdata.userName,
  1305. buyerName: thisdata.buyerName,
  1306. departmentName: thisdata.departmentName,
  1307. salesmanName: thisdata.salesmanName,
  1308. depName: thisdata.depName,
  1309. orderStatus: thisdata.orderStatus,
  1310. projectStatus: thisdata.projectStatus,
  1311. commodityName: thisdata.commodityName,
  1312. totalAmount: thisdata.totalAmount,
  1313. liquidationStatus: thisdata.liquidationStatus,
  1314. settlementAmount: thisdata.settlementAmount,
  1315. accountsReceivable: thisdata.accountsReceivable,
  1316. dunSubject: thisdata.dunSubject,
  1317. startDate: thisdata.startDate,
  1318. taskStatus: thisdata.taskStatus,
  1319. cname: thisdata.cname,
  1320. id: thisdata.id,
  1321. taskName: thisdata.taskName,
  1322. hours: thisdata.hours,
  1323. taskDistributionTime: thisdata.taskDistributionTime,
  1324. taskEndTime: thisdata.taskEndTime,
  1325. commodityQuantity: thisdata.commodityQuantity,
  1326. commodityPrice: thisdata.commodityPrice,
  1327. certificateNumber: thisdata.certificateNumber,
  1328. taskComment: thisdata.taskComment,
  1329. outsourceName: thisdata.outsourceName,
  1330. outsourcePrice: thisdata.outsourcePrice
  1331. });
  1332. }
  1333. }
  1334. totalWaibao = (Math.round(totalWaibao * 10000) / 10000).toFixed(4);
  1335. this.setState({
  1336. proDataList: theArr,
  1337. totalWaibao
  1338. });
  1339. }.bind(this)
  1340. }).always(
  1341. function() {
  1342. this.setState({
  1343. loading: false
  1344. });
  1345. }.bind(this)
  1346. );
  1347. },
  1348. checkRemark(record) {
  1349. this.setState({
  1350. checkVisible: true,
  1351. checkOrderNo: record.orderNo
  1352. });
  1353. },
  1354. checkOk() {
  1355. if (this.state.checkData.trim() == "") {
  1356. message.warning("请填写审核内容");
  1357. return;
  1358. }
  1359. this.setState({
  1360. loading: true
  1361. });
  1362. $.ajax({
  1363. method: "post",
  1364. dataType: "json",
  1365. crossDomain: false,
  1366. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1367. data: {
  1368. orderNo: this.state.checkOrderNo,
  1369. remarks: this.state.checkData
  1370. },
  1371. success: function(data) {
  1372. let theArr = [];
  1373. if (!data.data) {
  1374. if (data.error && data.error.length) {
  1375. message.warning(data.error[0].message);
  1376. }
  1377. } else {
  1378. message.success("通过成功!");
  1379. this.loadData();
  1380. this.setState({
  1381. checkVisible: false
  1382. });
  1383. }
  1384. }.bind(this)
  1385. }).always(
  1386. function() {
  1387. this.setState({
  1388. loading: false
  1389. });
  1390. }.bind(this)
  1391. );
  1392. },
  1393. tableRowClickPro(record) {
  1394. this.setState({
  1395. pvisible: true,
  1396. record
  1397. });
  1398. console.log("222222",this.state.record);
  1399. },
  1400. render() {
  1401. const formItemLayout = {
  1402. labelCol: { span: 8 },
  1403. wrapperCol: { span: 14 }
  1404. };
  1405. const { RangePicker } = DatePicker;
  1406. var departmentArr = this.state.departmentArr || [];
  1407. const { loading, selectedRowKeys, visible } = this.state;
  1408. const rowSelection = {
  1409. selectedRowKeys,
  1410. onChange: this.onSelectChange,
  1411. hideDefaultSelections: true,
  1412. type: "radio"
  1413. };
  1414. return (
  1415. <div className="user-content">
  1416. <div className="content-title" style={{ marginBottom: 10 }}>
  1417. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1418. </div>
  1419. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1420. <TabPane tab="更改表格显示数据" key="1">
  1421. <div style={{ marginLeft: 10 }}>
  1422. <ChooseList
  1423. columns={this.state.columns}
  1424. changeFn={this.changeList}
  1425. changeList={this.state.changeList}
  1426. top={55}
  1427. margin={11}
  1428. />
  1429. </div>
  1430. </TabPane>
  1431. <TabPane tab="搜索" key="2">
  1432. <div className="user-search" style={{ marginLeft: 10 }}>
  1433. <Input
  1434. placeholder="订单编号"
  1435. value={this.state.orderNoSearch}
  1436. onChange={e => {
  1437. this.setState({ orderNoSearch: e.target.value });
  1438. }}
  1439. />
  1440. <Input
  1441. placeholder="客户名称"
  1442. value={this.state.nameSearch}
  1443. onChange={e => {
  1444. this.setState({ nameSearch: e.target.value });
  1445. }}
  1446. />
  1447. <Select
  1448. placeholder="订单部门"
  1449. style={{ width: 150, marginRight: 10 }}
  1450. value={this.state.departmenttList}
  1451. onChange={e => {
  1452. this.setState({ departmenttList: e });
  1453. }}
  1454. >
  1455. {departmentArr.map(function(item) {
  1456. return (
  1457. <Select.Option key={item.id}>{item.name}</Select.Option>
  1458. );
  1459. })}
  1460. </Select>
  1461. <Input
  1462. placeholder="合同编号"
  1463. value={this.state.contractNoSearch}
  1464. onChange={e => {
  1465. this.setState({
  1466. contractNoSearch: e.target.value
  1467. });
  1468. }}
  1469. />
  1470. <Select
  1471. placeholder="流程状态"
  1472. onChange={e => {
  1473. this.setState({ processStatusSearch: e });
  1474. }}
  1475. style={{ width: 160, marginRight: 5 }}
  1476. value={this.state.processStatusSearch}
  1477. >
  1478. <Option value="3">未分配</Option>
  1479. <Option value="4">已分配</Option>
  1480. </Select>
  1481. <Select
  1482. placeholder="结算状态"
  1483. onChange={e => {
  1484. this.setState({ liquidationStatus: e });
  1485. }}
  1486. style={{ width: 160, marginRight: 5 }}
  1487. value={this.state.liquidationStatus}
  1488. >
  1489. <Option value="0">首付待付清</Option>
  1490. <Option value="1">尾款待付清</Option>
  1491. <Option value="2">已付清</Option>
  1492. </Select>
  1493. <span style={{}}>下单日期:</span>
  1494. <RangePicker
  1495. value={[
  1496. this.state.releaseDate[0]
  1497. ? moment(this.state.releaseDate[0])
  1498. : null,
  1499. this.state.releaseDate[1]
  1500. ? moment(this.state.releaseDate[1])
  1501. : null
  1502. ]}
  1503. onChange={(data, dataString) => {
  1504. this.setState({ releaseDate: dataString });
  1505. }}
  1506. />
  1507. <span style={{}}>最近收款:</span>
  1508. <RangePicker
  1509. value={[
  1510. this.state.shouKuanDate[0]
  1511. ? moment(this.state.shouKuanDate[0])
  1512. : null,
  1513. this.state.shouKuanDate[1]
  1514. ? moment(this.state.shouKuanDate[1])
  1515. : null
  1516. ]}
  1517. onChange={(data, dataString) => {
  1518. this.setState({ shouKuanDate: dataString });
  1519. }}
  1520. />
  1521. <Button
  1522. type="primary"
  1523. onClick={this.search}
  1524. style={{ marginLeft: 10 }}
  1525. disabled={this.state.loadingA ? true : false}
  1526. >
  1527. 搜索
  1528. </Button>
  1529. <Button onClick={this.reset}>重置</Button>
  1530. </div>
  1531. </TabPane>
  1532. <TabPane tab="打印" key="3">
  1533. <Button
  1534. type="primary"
  1535. style={{ margin: "11px 0px 10px 10px" }}
  1536. onClick={this.printAll}
  1537. disabled={!this.state.dataSource.length}
  1538. >
  1539. 打印所有列表信息
  1540. </Button>
  1541. <Button
  1542. type="primary"
  1543. disabled={this.state.selectedRowKeys.length != 1}
  1544. style={{ margin: "11px 0px 10px 10px" }}
  1545. onClick={() => {
  1546. this.inRecordData();
  1547. this.setState({
  1548. bvisible: true
  1549. });
  1550. }}
  1551. >
  1552. 打印开票详情
  1553. </Button>
  1554. <Button
  1555. type="primary"
  1556. disabled={this.state.selectedRowKeys.length != 1}
  1557. style={{ margin: "11px 0px 10px 10px" }}
  1558. onClick={() => {
  1559. this.waterData();
  1560. this.setState({
  1561. cvisible: true
  1562. });
  1563. }}
  1564. >
  1565. 打印收款流水
  1566. </Button>
  1567. <Button
  1568. type="primary"
  1569. disabled={this.state.selectedRowKeys.length != 1}
  1570. style={{ margin: "11px 0px 10px 10px" }}
  1571. onClick={() => {
  1572. this.timeData();
  1573. this.setState({
  1574. timeVisible: true
  1575. });
  1576. }}
  1577. >
  1578. 打印工时信息
  1579. </Button>
  1580. <Button
  1581. type="primary"
  1582. disabled={this.state.selectedRowKeys.length != 1}
  1583. style={{ margin: "11px 0px 10px 10px" }}
  1584. onClick={() => {
  1585. this.cuiData();
  1586. this.setState({
  1587. cuiVisible: true
  1588. });
  1589. }}
  1590. >
  1591. 打印催款信息
  1592. </Button>
  1593. <Button
  1594. type="primary"
  1595. disabled={this.state.selectedRowKeys.length != 1}
  1596. style={{ margin: "11px 0px 10px 10px" }}
  1597. onClick={() => {
  1598. this.proData();
  1599. this.setState({
  1600. proVisible: true
  1601. });
  1602. }}
  1603. >
  1604. 打印项目信息
  1605. </Button>
  1606. </TabPane>
  1607. <TabPane tab="导出Excel" key="4">
  1608. <Button
  1609. type="primary"
  1610. style={{ margin: "11px 0px 10px 10px" }}
  1611. onClick={this.exportAll}
  1612. >
  1613. 导出当前列表
  1614. </Button>
  1615. <Button
  1616. type="primary"
  1617. disabled={this.state.selectedRowKeys.length != 1}
  1618. style={{ margin: "11px 0px 10px 10px" }}
  1619. onClick={this.exportKaip}
  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={this.exportWater}
  1628. >
  1629. 导出所选收款详情流水
  1630. </Button>
  1631. <Button
  1632. type="primary"
  1633. disabled={this.state.selectedRowKeys.length != 1}
  1634. style={{ margin: "11px 0px 10px 10px" }}
  1635. onClick={this.exportTime}
  1636. >
  1637. 导出所选工时信息
  1638. </Button>
  1639. <Button
  1640. type="primary"
  1641. disabled={this.state.selectedRowKeys.length != 1}
  1642. style={{ margin: "11px 0px 10px 10px" }}
  1643. onClick={this.exportCui}
  1644. >
  1645. 导出催款信息
  1646. </Button>
  1647. <Button
  1648. type="primary"
  1649. disabled={this.state.selectedRowKeys.length != 1}
  1650. style={{ margin: "11px 0px 10px 10px" }}
  1651. onClick={this.exportPro}
  1652. >
  1653. 导出项目详情
  1654. </Button>
  1655. </TabPane>
  1656. <TabPane tab="查看" key="5">
  1657. <Button
  1658. type="primary"
  1659. disabled={this.state.selectedRowKeys.length != 1}
  1660. style={{ margin: "11px 0px 10px 10px" }}
  1661. onClick={() => {
  1662. this.inRecordData();
  1663. this.setState({
  1664. bvisible: true
  1665. });
  1666. }}
  1667. >
  1668. 查看开票详情
  1669. </Button>
  1670. <Button
  1671. type="primary"
  1672. disabled={this.state.selectedRowKeys.length != 1}
  1673. style={{ margin: "11px 0px 10px 10px" }}
  1674. onClick={() => {
  1675. this.waterData();
  1676. this.setState({
  1677. cvisible: true
  1678. });
  1679. }}
  1680. >
  1681. 详情收款流水
  1682. </Button>
  1683. <Button
  1684. type="primary"
  1685. disabled={this.state.selectedRowKeys.length != 1}
  1686. style={{ margin: "11px 0px 10px 10px" }}
  1687. onClick={() => {
  1688. this.timeData();
  1689. this.setState({
  1690. timeVisible: true
  1691. });
  1692. }}
  1693. >
  1694. 工时信息
  1695. </Button>
  1696. <Button
  1697. type="primary"
  1698. disabled={this.state.selectedRowKeys.length != 1}
  1699. style={{ margin: "11px 0px 10px 10px" }}
  1700. onClick={() => {
  1701. this.cuiData();
  1702. this.setState({
  1703. cuiVisible: true
  1704. });
  1705. }}
  1706. >
  1707. 催款信息
  1708. </Button>
  1709. <Button
  1710. type="primary"
  1711. disabled={this.state.selectedRowKeys.length != 1}
  1712. style={{ margin: "11px 0px 10px 10px" }}
  1713. onClick={() => {
  1714. this.proData();
  1715. this.setState({
  1716. proVisible: true
  1717. });
  1718. }}
  1719. >
  1720. 项目信息
  1721. </Button>
  1722. </TabPane>
  1723. {/* <TabPane tab="批量操作" key="6">
  1724. <Button
  1725. type="primary"
  1726. disabled={this.state.selectedRowKeys.length == 0}
  1727. style={{ margin: "0px 0px 10px 10px" }}
  1728. onClick={e => {
  1729. e.stopPropagation(),
  1730. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1731. }}
  1732. >
  1733. 转交
  1734. </Button>
  1735. </TabPane> */}
  1736. </Tabs>
  1737. <div className="patent-table">
  1738. <Spin spinning={this.state.loadingA}>
  1739. <Table
  1740. bordered
  1741. columns={
  1742. this.state.changeList == undefined
  1743. ? this.state.columns
  1744. : this.state.changeList
  1745. }
  1746. dataSource={this.state.dataSource}
  1747. rowSelection={rowSelection}
  1748. scroll={{ x: "max-content", y: 0 }}
  1749. pagination={this.state.pagination}
  1750. onRowDoubleClick={this.tableRowClick.bind(this)}
  1751. size="small"
  1752. />
  1753. </Spin>
  1754. <p
  1755. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  1756. >
  1757. {
  1758. <span style={{ marginRight: 10 }}>
  1759. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  1760. </span>
  1761. }
  1762. {
  1763. <span>
  1764. {`合同额总计(万元):${
  1765. this.state.totalHui ? this.state.totalHui : "0"
  1766. }`}
  1767. </span>
  1768. }
  1769. </p>
  1770. </div>
  1771. <Assign
  1772. title="任务"
  1773. selApi={"/api/admin/newOrder/updateFinance"}
  1774. data={this.state.assignDataY}
  1775. showDesc={this.state.assignVisibleY}
  1776. closeDesc={this.closeAssignY.bind(this)}
  1777. // fenpaiData={8}
  1778. specially={0}
  1779. roleName={this.state.nub}
  1780. requestMethod={"get"}
  1781. />
  1782. <OrderDesc
  1783. data={this.state.RowData}
  1784. showDesc={this.state.showDesc}
  1785. closeDesc={this.closeDesc.bind(this)}
  1786. />
  1787. <Receivable
  1788. title="收款记录"
  1789. api="/api/admin/financial/addReceiptsFlow"
  1790. data={this.state.assignDataX}
  1791. showDesc={this.state.assignVisibleX}
  1792. closeDesc={this.closeAssignX.bind(this)}
  1793. />
  1794. <Modal
  1795. visible={this.state.boHuiVisible}
  1796. width="400px"
  1797. title="驳回备注"
  1798. footer=""
  1799. onOk={this.boHuiOk}
  1800. onCancel={this.boHuiCancel}
  1801. >
  1802. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1803. <Spin spinning={this.state.loading}>
  1804. <FormItem
  1805. labelCol={{ span: 5 }}
  1806. wrapperCol={{ span: 16 }}
  1807. label={
  1808. <span>
  1809. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1810. </span>
  1811. }
  1812. >
  1813. <Input
  1814. type="textarea"
  1815. rows={4}
  1816. placeholder="请输入驳回原因"
  1817. value={this.state.content}
  1818. onChange={e => {
  1819. this.setState({ content: e.target.value });
  1820. }}
  1821. />
  1822. </FormItem>
  1823. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1824. <Button
  1825. type="primary"
  1826. htmlType="submit"
  1827. style={{ marginRight: 20 }}
  1828. >
  1829. 驳回
  1830. </Button>
  1831. <Button
  1832. type="default"
  1833. onClick={() => {
  1834. this.boHuiCancel();
  1835. }}
  1836. >
  1837. 取消
  1838. </Button>
  1839. </FormItem>
  1840. </Spin>
  1841. </Form>
  1842. </Modal>
  1843. <Modal
  1844. visible={this.state.bvisible}
  1845. footer=""
  1846. title="开票历史记录"
  1847. className="admin-desc-content"
  1848. width="900px"
  1849. onCancel={this.inRecordCanl}
  1850. >
  1851. <Spin spinning={this.state.loading}>
  1852. <div
  1853. className="patent-table"
  1854. ref={e => {
  1855. this.refs.kaiPiao = e;
  1856. }}
  1857. >
  1858. <Table
  1859. columns={this.state.columnsDate}
  1860. dataSource={this.state.recordData}
  1861. pagination={false}
  1862. bordered
  1863. />
  1864. <div className="clearfix" style={{ marginTop: "20px" }}>
  1865. <FormItem
  1866. className="half-item"
  1867. {...formItemLayout}
  1868. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1869. >
  1870. <span>{this.state.sum + "(万元)"}</span>
  1871. </FormItem>
  1872. </div>
  1873. <ReactToPrint
  1874. trigger={() => (
  1875. <Button
  1876. type="primary"
  1877. style={{
  1878. float: "right",
  1879. // marginTop: 10,
  1880. position: "absolute",
  1881. top: -54,
  1882. right: 30
  1883. }}
  1884. >
  1885. 打印
  1886. </Button>
  1887. )}
  1888. content={() => this.refs.kaiPiao}
  1889. />
  1890. </div>
  1891. </Spin>
  1892. </Modal>
  1893. <Modal
  1894. visible={this.state.cvisible}
  1895. footer=""
  1896. title="详细收款流水"
  1897. className="admin-desc-content"
  1898. width="1300px"
  1899. onCancel={this.waterCanl}
  1900. >
  1901. <Spin spinning={this.state.loading}>
  1902. <div
  1903. className="patent-table"
  1904. ref={e => {
  1905. this.refs.shouKuan = e;
  1906. }}
  1907. >
  1908. <Table
  1909. columns={this.state.waterlistDate}
  1910. dataSource={this.state.waterData}
  1911. pagination={false}
  1912. bordered
  1913. />
  1914. <div className="clearfix" style={{ marginTop: "20px" }}>
  1915. <FormItem
  1916. className="half-item"
  1917. {...formItemLayout}
  1918. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  1919. >
  1920. <span>{this.state.waterSum + "(万元)"}</span>
  1921. </FormItem>
  1922. </div>
  1923. <ReactToPrint
  1924. trigger={() => (
  1925. <Button
  1926. type="primary"
  1927. style={{
  1928. float: "right",
  1929. position: "absolute",
  1930. top: -54,
  1931. right: 30
  1932. }}
  1933. >
  1934. 打印
  1935. </Button>
  1936. )}
  1937. content={() => this.refs.shouKuan}
  1938. />
  1939. </div>
  1940. </Spin>
  1941. </Modal>
  1942. <Modal
  1943. visible={this.state.dvisible}
  1944. footer=""
  1945. title="所有列表信息"
  1946. className="admin-desc-content"
  1947. width="1300px"
  1948. onCancel={() => {
  1949. this.loadData();
  1950. this.setState({
  1951. dvisible: false
  1952. });
  1953. }}
  1954. >
  1955. <Spin spinning={this.state.loading}>
  1956. <div
  1957. className="patent-table"
  1958. style={{
  1959. // width: 900,
  1960. // position: "relative",
  1961. // left: "50%",
  1962. // transform: "translate(-50%)",
  1963. padding: "25px 0 30px 30px"
  1964. }}
  1965. ref={e => {
  1966. this.refs.all = e;
  1967. }}
  1968. >
  1969. <Table
  1970. columns={this.state.printColumns}
  1971. dataSource={this.state.dataSource}
  1972. pagination={false}
  1973. bordered
  1974. size="small"
  1975. />
  1976. </div>
  1977. </Spin>
  1978. <ReactToPrint
  1979. trigger={() => (
  1980. <Button
  1981. type="primary"
  1982. style={{
  1983. float: "right",
  1984. marginTop: 10,
  1985. position: "absolute",
  1986. top: 0,
  1987. right: 30
  1988. }}
  1989. >
  1990. 打印
  1991. </Button>
  1992. )}
  1993. content={() => this.refs.all}
  1994. />
  1995. </Modal>
  1996. <Modal
  1997. visible={this.state.timeVisible}
  1998. footer=""
  1999. title="工时详情"
  2000. className="admin-desc-content"
  2001. width="1300px"
  2002. pagination={false}
  2003. onCancel={() => {
  2004. this.loadData();
  2005. this.setState({
  2006. timeVisible: false
  2007. });
  2008. }}
  2009. >
  2010. <Spin spinning={this.state.loading}>
  2011. <div
  2012. className="patent-table"
  2013. style={
  2014. {
  2015. // width: 900,
  2016. // position: "relative",
  2017. // left: "50%",
  2018. // transform: "translate(-50%)",
  2019. // padding: "25px 0 30px 30px"
  2020. }
  2021. }
  2022. ref={e => {
  2023. this.refs.all = e;
  2024. }}
  2025. >
  2026. <Table
  2027. columns={this.state.timeColumns}
  2028. dataSource={this.state.timeDataList}
  2029. pagination={false}
  2030. bordered
  2031. size="small"
  2032. />
  2033. </div>
  2034. </Spin>
  2035. <ReactToPrint
  2036. trigger={() => (
  2037. <Button
  2038. type="primary"
  2039. style={{
  2040. float: "right",
  2041. marginTop: 10,
  2042. position: "absolute",
  2043. top: 0,
  2044. right: 30
  2045. }}
  2046. >
  2047. 打印
  2048. </Button>
  2049. )}
  2050. content={() => this.refs.all}
  2051. />
  2052. </Modal>
  2053. <Modal
  2054. visible={this.state.cuiVisible}
  2055. footer=""
  2056. title="催款详情"
  2057. className="admin-desc-content"
  2058. width="1300px"
  2059. pagination={false}
  2060. onCancel={() => {
  2061. this.loadData();
  2062. this.setState({
  2063. cuiVisible: false
  2064. });
  2065. }}
  2066. >
  2067. <Spin spinning={this.state.loading}>
  2068. <div
  2069. className="patent-table"
  2070. style={
  2071. {
  2072. // width: 900,
  2073. // position: "relative",
  2074. // left: "50%",
  2075. // transform: "translate(-50%)",
  2076. // padding: "25px 0 30px 30px"
  2077. }
  2078. }
  2079. ref={e => {
  2080. this.refs.all = e;
  2081. }}
  2082. >
  2083. <Table
  2084. columns={this.state.cuiColumns}
  2085. dataSource={this.state.cuiDataList}
  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.proVisible}
  2112. footer=""
  2113. title="项目详情"
  2114. className="admin-desc-content"
  2115. width="1300px"
  2116. pagination={false}
  2117. onCancel={() => {
  2118. this.loadData();
  2119. this.setState({
  2120. proVisible: false
  2121. });
  2122. }}
  2123. >
  2124. <Spin spinning={this.state.loading}>
  2125. <Project record={this.state.record} visible={this.state.pvisible} cancel={() => { this.setState({ pvisible: false }) }} />
  2126. <div
  2127. className="patent-table"
  2128. style={
  2129. {
  2130. // width: 900,
  2131. // position: "relative",
  2132. // left: "50%",
  2133. // transform: "translate(-50%)",
  2134. // padding: "25px 0 30px 30px"
  2135. }
  2136. }
  2137. ref={e => {
  2138. this.refs.all = e;
  2139. }}
  2140. >
  2141. <Table
  2142. columns={this.state.proColumns}
  2143. dataSource={this.state.proDataList}
  2144. onRowClick={this.tableRowClickPro}
  2145. pagination={false}
  2146. bordered
  2147. size="small"
  2148. />
  2149. </div>
  2150. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  2151. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  2152. </span>
  2153. </Spin>
  2154. <ReactToPrint
  2155. trigger={() => (
  2156. <Button
  2157. type="primary"
  2158. style={{
  2159. float: "right",
  2160. marginTop: 10,
  2161. position: "absolute",
  2162. top: 0,
  2163. right: 30
  2164. }}
  2165. >
  2166. 打印
  2167. </Button>
  2168. )}
  2169. content={() => this.refs.all}
  2170. />
  2171. </Modal>
  2172. <Spin spinning={this.state.loading}>
  2173. <Modal
  2174. title="审核订单"
  2175. visible={this.state.checkVisible}
  2176. onOk={this.checkOk}
  2177. okText={"通过"}
  2178. onCancel={() => {
  2179. this.loadData();
  2180. this.setState({
  2181. checkVisible: false,
  2182. checkData: ""
  2183. });
  2184. }}
  2185. >
  2186. <TextArea
  2187. onChange={(e, recard) => {
  2188. this.setState({
  2189. checkData: e.target.value
  2190. });
  2191. console.log(e.target.value);
  2192. }}
  2193. placeholder="请填写审核内容"
  2194. />
  2195. </Modal>
  2196. </Spin>
  2197. </div>
  2198. );
  2199. }
  2200. });
  2201. export default ShouKuang;