shouKuang.jsx 70 KB

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