shouKuang.jsx 77 KB

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