shouKuang.jsx 62 KB

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