shouKuanAll.jsx 60 KB

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