shouKuang.jsx 81 KB

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