shouKuanAll.jsx 81 KB

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