shouKuang.jsx 70 KB

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