shouKuanAll.jsx 59 KB

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