shouKuang.jsx 64 KB

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