shouKuang.jsx 79 KB

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