shouKuang.jsx 62 KB

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