shouKuang.jsx 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773
  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.loadData();
  1244. },
  1245. // 拆分详细
  1246. showRes(record) {
  1247. this.setState({
  1248. resVisible: true,
  1249. resRecord: record,
  1250. });
  1251. },
  1252. resCancel() {
  1253. this.setState({
  1254. resVisible: false,
  1255. });
  1256. },
  1257. reset() {
  1258. this.state.nameSearch = "";
  1259. this.state.releaseDate = [];
  1260. this.state.shouKuanDate = [];
  1261. this.state.orderNoSearch = "";
  1262. this.state.departmenttList = undefined;
  1263. this.state.amountStatus = undefined;
  1264. this.state.processStatus = [];
  1265. this.state.contractNoSearch = "";
  1266. this.state.liquidationStatus = [];
  1267. this.state.processStatusSearch = [];
  1268. this.state.contractNo = "";
  1269. this.loadData();
  1270. },
  1271. //驳回
  1272. boHuiSubmit(e) {
  1273. e.preventDefault();
  1274. if (!this.state.content) {
  1275. message.warning("请填写驳回原因");
  1276. return false;
  1277. }
  1278. this.setState({
  1279. loading: true,
  1280. });
  1281. $.ajax({
  1282. method: "POST",
  1283. dataType: "json",
  1284. crossDomain: false,
  1285. url: globalConfig.context + "/api/admin/financial/reject",
  1286. data: {
  1287. orderNo: this.state.bohuiData.orderNo,
  1288. reason: this.state.content,
  1289. },
  1290. }).done(
  1291. function (data) {
  1292. if (!data.error.length) {
  1293. message.success("驳回成功!");
  1294. this.setState({
  1295. loading: false,
  1296. });
  1297. this.boHuiOk();
  1298. } else {
  1299. message.warning(data.error[0].message);
  1300. }
  1301. }.bind(this)
  1302. );
  1303. },
  1304. searchSwitch() {
  1305. this.setState({
  1306. searchMore: !this.state.searchMore,
  1307. });
  1308. },
  1309. changeList(arr) {
  1310. const newArr = [];
  1311. this.state.columns.forEach((item) => {
  1312. arr.forEach((val) => {
  1313. if (val === item.title) {
  1314. newArr.push(item);
  1315. }
  1316. });
  1317. });
  1318. this.setState({
  1319. changeList: newArr,
  1320. });
  1321. },
  1322. callback(key) {
  1323. // console.log(key);
  1324. },
  1325. onSelectChange(selectedRowKeys) {
  1326. // for(var i=0; i<selectedRowKeys.length; i++){
  1327. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1328. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1329. // selectedRowKeys.splice(j,1);
  1330. // j--;
  1331. // }
  1332. // }
  1333. // }
  1334. this.setState({ selectedRowKeys });
  1335. },
  1336. inRecordCanl() {
  1337. this.setState({
  1338. bvisible: false,
  1339. });
  1340. },
  1341. inRecordData() {
  1342. this.setState({
  1343. loading: true,
  1344. });
  1345. $.ajax({
  1346. method: "get",
  1347. dataType: "json",
  1348. crossDomain: false,
  1349. url:
  1350. globalConfig.context +
  1351. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1352. data: {
  1353. orderNo: this.state.selectedRowKeys[0],
  1354. pageSize: 9999,
  1355. },
  1356. success: function (data) {
  1357. let theArr = [];
  1358. let sum = 0;
  1359. if (!data.data) {
  1360. if (data.error && data.error.length) {
  1361. message.warning(data.error[0].message);
  1362. }
  1363. } else {
  1364. for (let i = 0; i < data.data.list.length; i++) {
  1365. let thisdata = data.data.list[i];
  1366. sum += parseFloat(thisdata.amount);
  1367. theArr.push({
  1368. id: thisdata.id,
  1369. orderno: thisdata.orderno, //订单编号
  1370. amount: thisdata.amount, //签单金额
  1371. createTime: thisdata.createTime, //流程状态
  1372. status: thisdata.status, //结算状态
  1373. rejectReason: thisdata.rejectReason,
  1374. });
  1375. }
  1376. }
  1377. this.setState({
  1378. recordData: theArr,
  1379. sum: sum.toFixed(6),
  1380. });
  1381. }.bind(this),
  1382. }).done(
  1383. function () {
  1384. this.setState({
  1385. loading: false,
  1386. });
  1387. }.bind(this)
  1388. );
  1389. },
  1390. waterData() {
  1391. this.state.data = [];
  1392. this.setState({
  1393. loading: true,
  1394. });
  1395. $.ajax({
  1396. method: "get",
  1397. dataType: "json",
  1398. crossDomain: false,
  1399. url: globalConfig.context + "/api/admin/financial/myBillList",
  1400. data: {
  1401. orderNo: this.state.selectedRowKeys[0],
  1402. pageSize: 9999,
  1403. whoType: 1,
  1404. },
  1405. success: function (data) {
  1406. let theArr = [];
  1407. let waterSum = 0;
  1408. if (!data.data || !data.data.list) {
  1409. if (data.error && data.error.length) {
  1410. message.warning(data.error[0].message);
  1411. }
  1412. } else {
  1413. for (let i = 0; i < data.data.list.length; i++) {
  1414. let thisdata = data.data.list[i];
  1415. if (thisdata.deleteSign == 0) {
  1416. waterSum += parseFloat(thisdata.transactionAmount);
  1417. }
  1418. theArr.push({
  1419. key: i,
  1420. orderNo: thisdata.orderNo,
  1421. billNo: thisdata.billNo,
  1422. transactionAmount: thisdata.transactionAmount,
  1423. payeeName: thisdata.payeeName,
  1424. payerName: thisdata.payerName,
  1425. transactionSubject: thisdata.transactionSubject,
  1426. transactionChannel: thisdata.transactionChannel,
  1427. financialPayTimes: thisdata.financialPayTimes,
  1428. financialPayNo: thisdata.financialPayNo,
  1429. createrName: thisdata.createrName,
  1430. saleName: thisdata.saleName,
  1431. createTimes: thisdata.createTimes,
  1432. type:
  1433. thisdata.type == 0
  1434. ? "手工"
  1435. : thisdata.type == 1
  1436. ? "批量"
  1437. : "合同变更退款",
  1438. deleteSign: thisdata.deleteSign,
  1439. deleteTimes: thisdata.deleteTimes,
  1440. refundTimes: thisdata.refundTimes,
  1441. remarks: thisdata.remarks,
  1442. });
  1443. }
  1444. }
  1445. this.setState({
  1446. waterData: theArr,
  1447. waterSum: (Math.round(waterSum * 1000000) / 1000000).toFixed(6),
  1448. });
  1449. }.bind(this),
  1450. }).always(
  1451. function () {
  1452. this.setState({
  1453. loading: false,
  1454. });
  1455. }.bind(this)
  1456. );
  1457. },
  1458. waterCanl() {
  1459. this.setState({
  1460. cvisible: false,
  1461. });
  1462. },
  1463. exportKaip() {
  1464. window.location.href =
  1465. globalConfig.context +
  1466. "/api/admin/receivables/exportInvoice?" +
  1467. `orderNo=${this.state.selectedRowKeys}`;
  1468. },
  1469. exportAll() {
  1470. window.location.href =
  1471. globalConfig.context +
  1472. "/api/admin/receivables/exportReceivables?" +
  1473. `orderNo=${
  1474. this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1475. }&buyerName=${
  1476. this.state.nameSearch ? this.state.nameSearch : ""
  1477. }&departmentId=${
  1478. this.state.departmenttList ? this.state.departmenttList : ""
  1479. }&contractNo=${
  1480. this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1481. }&processStatus=${this.state.processStatusSearch}`;
  1482. },
  1483. exportWater() {
  1484. window.location.href =
  1485. globalConfig.context +
  1486. "/api/admin/receivables/exportMyBill?" +
  1487. `orderNo=${this.state.selectedRowKeys}&whoType=1`;
  1488. },
  1489. printAll() {
  1490. this.setState({
  1491. dvisible: true,
  1492. });
  1493. this.loadData(1, 9999);
  1494. },
  1495. timeData() {
  1496. this.setState({
  1497. loading: true,
  1498. });
  1499. $.ajax({
  1500. method: "get",
  1501. dataType: "json",
  1502. crossDomain: false,
  1503. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  1504. data: {
  1505. orderNo: this.state.selectedRowKeys[0],
  1506. pageSize: 9999,
  1507. },
  1508. success: function (data) {
  1509. let theArr = [];
  1510. if (!data.data || !data.data.list) {
  1511. if (data.error && data.error.length) {
  1512. message.warning(data.error[0].message);
  1513. }
  1514. } else {
  1515. for (let i = 0; i < data.data.list.length; i++) {
  1516. let thisdata = data.data.list[i];
  1517. theArr.push({
  1518. key: i + 1,
  1519. id: thisdata.id, //ID
  1520. orderNo: thisdata.orderNo, //订单编号
  1521. taskName: thisdata.taskName, //任务名称
  1522. userName: thisdata.userName, //客户名称
  1523. cname: thisdata.cname, //项目品类
  1524. taskStatus: thisdata.taskStatus, //任务状态
  1525. receiverName: thisdata.receiverName, //负责人
  1526. hours: thisdata.hours, //任务工时
  1527. depName: thisdata.depName, //派单公司
  1528. contractNo: thisdata.contractNo,
  1529. signTime: thisdata.signTime,
  1530. creteTime: thisdata.creteTime,
  1531. projectStatus: thisdata.projectStatus,
  1532. commodityPrice: thisdata.commodityPrice, //价格
  1533. commodityQuantity: thisdata.commodityQuantity, //数量
  1534. salesmanName: thisdata.salesmanName, //订单负责人
  1535. taskDistributionTime: thisdata.taskDistributionTime,
  1536. taskEndTime: thisdata.taskEndTime,
  1537. outsource: thisdata.outsource,
  1538. splitStatus: thisdata.splitStatus,
  1539. splitSuper: thisdata.splitSuper,
  1540. splitId: thisdata.splitId,
  1541. });
  1542. }
  1543. }
  1544. this.setState({
  1545. timeDataList: theArr,
  1546. });
  1547. }.bind(this),
  1548. }).always(
  1549. function () {
  1550. this.setState({
  1551. loading: false,
  1552. });
  1553. }.bind(this)
  1554. );
  1555. },
  1556. exportTime() {
  1557. const data = {
  1558. orderNo: this.state.selectedRowKeys[0],
  1559. pageSize: 9999,
  1560. };
  1561. window.location.href =
  1562. globalConfig.context +
  1563. "/api/admin/orderProject/exportMyTaskList?" +
  1564. $.param(data);
  1565. },
  1566. exportPro() {
  1567. const data = {
  1568. orderNo: this.state.selectedRowKeys[0],
  1569. };
  1570. window.location.href =
  1571. globalConfig.context +
  1572. "/api/admin/newOrder/exportOrderTaskData?" +
  1573. $.param(data);
  1574. },
  1575. exportCui() {
  1576. var data = {
  1577. orderNo: this.state.selectedRowKeys[0]
  1578. ? this.state.selectedRowKeys[0]
  1579. : undefined, //订单编号
  1580. // specially: 1,
  1581. pageSize: 9999,
  1582. };
  1583. window.location.href =
  1584. globalConfig.context +
  1585. "/api/admin/newOrder/exportOrderDunData?" +
  1586. $.param(data);
  1587. },
  1588. cuiData() {
  1589. this.setState({
  1590. loading: true,
  1591. });
  1592. $.ajax({
  1593. method: "get",
  1594. dataType: "json",
  1595. crossDomain: false,
  1596. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1597. data: {
  1598. orderNo: this.state.selectedRowKeys[0],
  1599. pageSize: 9999,
  1600. },
  1601. success: function (data) {
  1602. let theArr = [];
  1603. if (!data.data || !data.data.list) {
  1604. if (data.error && data.error.length) {
  1605. message.warning(data.error[0].message);
  1606. }
  1607. } else {
  1608. for (let i = 0; i < data.data.list.length; i++) {
  1609. let thisdata = data.data.list[i];
  1610. theArr.push({
  1611. key: i + 1,
  1612. orderNo: thisdata.orderNo,
  1613. contractNo: thisdata.contractNo,
  1614. userName: thisdata.userName,
  1615. buyerName: thisdata.buyerName,
  1616. departmentName: thisdata.departmentName,
  1617. salesmanName: thisdata.salesmanName,
  1618. depName: thisdata.depName,
  1619. orderStatus: thisdata.orderStatus,
  1620. projectStatus: thisdata.projectStatus,
  1621. totalAmount: thisdata.totalAmount,
  1622. liquidationStatus: thisdata.liquidationStatus,
  1623. settlementAmount: thisdata.settlementAmount,
  1624. accountsReceivable: thisdata.accountsReceivable,
  1625. dunSubject: thisdata.dunSubject,
  1626. startDate: thisdata.startDate,
  1627. taskStatus: thisdata.taskStatus,
  1628. cname: thisdata.cname,
  1629. id: thisdata.id,
  1630. taskName: thisdata.taskName,
  1631. hours: thisdata.hours,
  1632. taskDistributionTime: thisdata.taskDistributionTime,
  1633. taskEndTime: thisdata.taskEndTime,
  1634. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  1635. });
  1636. }
  1637. }
  1638. this.setState({
  1639. cuiDataList: theArr,
  1640. });
  1641. }.bind(this),
  1642. }).always(
  1643. function () {
  1644. this.setState({
  1645. loading: false,
  1646. });
  1647. }.bind(this)
  1648. );
  1649. },
  1650. cuiTabChange(index) {
  1651. this.setState({
  1652. cuiTabKey: index,
  1653. });
  1654. if (index == 2) {
  1655. this.setState({
  1656. loading: true,
  1657. });
  1658. $.ajax({
  1659. method: "get",
  1660. dataType: "json",
  1661. crossDomain: false,
  1662. url: globalConfig.context + "/api/admin/newOrder/arrearsDunList",
  1663. data: {
  1664. orderNo: this.state.selectedRowKeys[0],
  1665. pageSize: 9999,
  1666. },
  1667. success: function (data) {
  1668. let theArr = [];
  1669. if (data.error.length || data.data.list == "") {
  1670. if (data.error && data.error.length) {
  1671. message.warning(data.error[0].message);
  1672. }
  1673. } else {
  1674. for (let i = 0; i < data.data.list.length; i++) {
  1675. let thisdata = data.data.list[i];
  1676. let obj = thisdata;
  1677. obj.key = i;
  1678. theArr.push(obj);
  1679. }
  1680. }
  1681. this.setState({
  1682. qianDataList: theArr,
  1683. });
  1684. }.bind(this),
  1685. }).always(
  1686. function () {
  1687. this.setState({
  1688. loading: false,
  1689. });
  1690. }.bind(this)
  1691. );
  1692. }
  1693. },
  1694. proData() {
  1695. this.setState({
  1696. loading: true,
  1697. });
  1698. $.ajax({
  1699. method: "get",
  1700. dataType: "json",
  1701. crossDomain: false,
  1702. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1703. data: {
  1704. orderNo: this.state.selectedRowKeys[0],
  1705. pageSize: 9999,
  1706. },
  1707. success: function (data) {
  1708. let theArr = [];
  1709. let totalWaibao = 0;
  1710. if (!data.data) {
  1711. if (data.error && data.error.length) {
  1712. message.warning(data.error[0].message);
  1713. }
  1714. } else {
  1715. for (let i = 0; i < data.data.length; i++) {
  1716. let thisdata = data.data[i];
  1717. totalWaibao += thisdata.outsourcePrice;
  1718. thisdata.key = i + 1;
  1719. theArr.push(thisdata);
  1720. }
  1721. }
  1722. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  1723. this.setState({
  1724. proDataList: theArr,
  1725. totalWaibao,
  1726. });
  1727. }.bind(this),
  1728. }).always(
  1729. function () {
  1730. this.setState({
  1731. loading: false,
  1732. });
  1733. }.bind(this)
  1734. );
  1735. },
  1736. checkRemark(record) {
  1737. this.setState({
  1738. checkVisible: true,
  1739. checkOrderNo: record.orderNo,
  1740. });
  1741. },
  1742. checkOk() {
  1743. if (this.state.checkData == "" || this.state.checkData == undefined) {
  1744. message.warning("请填写审核内容");
  1745. return;
  1746. }
  1747. this.setState({
  1748. loading: true,
  1749. });
  1750. let ajaxObj = $.ajax({
  1751. method: "post",
  1752. dataType: "json",
  1753. crossDomain: false,
  1754. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1755. data: {
  1756. orderNo: this.state.checkOrderNo,
  1757. remarks: this.state.checkData,
  1758. },
  1759. success: function (data) {
  1760. let theArr = [];
  1761. if (!data.data) {
  1762. if (data.error && data.error.length) {
  1763. message.warning(data.error[0].message);
  1764. }
  1765. } else {
  1766. message.success("通过成功!");
  1767. this.loadData();
  1768. this.setState({
  1769. checkVisible: false,
  1770. checkData: "",
  1771. });
  1772. }
  1773. }.bind(this),
  1774. }).always(
  1775. function () {
  1776. this.setState({
  1777. loading: false,
  1778. financeApprovalAjaxObj: null
  1779. });
  1780. }.bind(this)
  1781. );
  1782. this.setState({
  1783. financeApprovalAjaxObj: ajaxObj
  1784. })
  1785. },
  1786. tableRowClickPro(record) {
  1787. this.setState({
  1788. pvisible: true,
  1789. record,
  1790. });
  1791. },
  1792. kaiPiaoData(record) {
  1793. this.setState({
  1794. avisible: true,
  1795. });
  1796. this.invoiceData(record.id)
  1797. },
  1798. invoiceData(id) {
  1799. this.setState({
  1800. loading: true,
  1801. });
  1802. $.ajax({
  1803. method: "get",
  1804. dataType: "json",
  1805. crossDomain: false,
  1806. url:
  1807. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  1808. data: {
  1809. id,
  1810. },
  1811. success: function (data) {
  1812. let thisdata = data.data;
  1813. let obj = {
  1814. contractNo: thisdata.contractNo,
  1815. orderNo: thisdata.orderNo,
  1816. approval: thisdata.approval,
  1817. type: thisdata.type,
  1818. status: thisdata.status,
  1819. remarks: thisdata.remarks,
  1820. invoiceType: thisdata.invoiceType,
  1821. unitName: thisdata.unitName,
  1822. taxNumber: thisdata.taxNumber,
  1823. amount: thisdata.amount,
  1824. banks: thisdata.banks,
  1825. content: thisdata.content,
  1826. unitAddress: thisdata.unitAddress,
  1827. invoiceRemarks: thisdata.invoiceRemarks,
  1828. unitMobile: thisdata.unitMobile,
  1829. post: thisdata.post,
  1830. addressee: thisdata.addressee,
  1831. addresseeMobile: thisdata.addresseeMobile,
  1832. addresseeProvince: thisdata.addresseeProvince,
  1833. addresseeCity: thisdata.addresseeCity,
  1834. addresseeArea: thisdata.addresseeArea,
  1835. alreadyAmount: thisdata.alreadyAmount,
  1836. recipientAddress: thisdata.recipientAddress,
  1837. orgCodeUrl: thisdata.voucherUrl
  1838. ? splitUrl(
  1839. thisdata.voucherUrl,
  1840. ",",
  1841. globalConfig.avatarHost + "/upload"
  1842. )
  1843. : [],
  1844. };
  1845. this.setState({
  1846. modalData: obj,
  1847. });
  1848. }.bind(this),
  1849. }).done(
  1850. function () {
  1851. this.setState({
  1852. loading: false,
  1853. });
  1854. }.bind(this)
  1855. );
  1856. },
  1857. visitCancels() {
  1858. this.setState({
  1859. avisible: false
  1860. })
  1861. },
  1862. render() {
  1863. const formItemLayout = {
  1864. labelCol: { span: 8 },
  1865. wrapperCol: { span: 14 },
  1866. };
  1867. const { RangePicker } = DatePicker;
  1868. var departmentArr = this.state.departmentArr || [];
  1869. const { loading, selectedRowKeys, visible } = this.state;
  1870. const rowSelection = {
  1871. selectedRowKeys,
  1872. onChange: this.onSelectChange,
  1873. hideDefaultSelections: true,
  1874. type: "radio",
  1875. };
  1876. return (
  1877. <div className="user-content">
  1878. {this.state.resVisible ? (
  1879. <ResolutionDetail
  1880. cancel={this.resCancel}
  1881. detail={this.state.resRecord}
  1882. visible={this.state.resVisible}
  1883. id={this.state.resRecord.orderNo}
  1884. />
  1885. ) : (
  1886. ""
  1887. )}
  1888. <div className="content-title" style={{ marginBottom: 10 }}>
  1889. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1890. </div>
  1891. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1892. <TabPane tab="更改表格显示数据" key="1">
  1893. <div style={{ marginLeft: 10 }}>
  1894. <ChooseList
  1895. columns={this.state.columns}
  1896. changeFn={this.changeList}
  1897. changeList={this.state.changeList}
  1898. top={55}
  1899. margin={11}
  1900. />
  1901. </div>
  1902. </TabPane>
  1903. <TabPane tab="搜索" key="2">
  1904. <div className="user-search" style={{ marginLeft: 10 }}>
  1905. <Input
  1906. placeholder="订单编号"
  1907. value={this.state.orderNoSearch}
  1908. onChange={(e) => {
  1909. this.setState({ orderNoSearch: e.target.value });
  1910. }}
  1911. />
  1912. <Input
  1913. placeholder="客户名称"
  1914. value={this.state.nameSearch}
  1915. onChange={(e) => {
  1916. this.setState({ nameSearch: e.target.value });
  1917. }}
  1918. />
  1919. <Select
  1920. placeholder="订单部门"
  1921. style={{ width: 120, marginRight: 10 }}
  1922. value={this.state.departmenttList}
  1923. onChange={(e) => {
  1924. this.setState({ departmenttList: e });
  1925. }}
  1926. >
  1927. {departmentArr.map(function (item) {
  1928. return (
  1929. <Select.Option key={item.id}>{item.name}</Select.Option>
  1930. );
  1931. })}
  1932. </Select>
  1933. <Input
  1934. placeholder="合同编号"
  1935. value={this.state.contractNoSearch}
  1936. onChange={(e) => {
  1937. this.setState({
  1938. contractNoSearch: e.target.value,
  1939. });
  1940. }}
  1941. />
  1942. <Select
  1943. placeholder="流程状态"
  1944. onChange={(e) => {
  1945. this.setState({ processStatusSearch: e });
  1946. }}
  1947. style={{ width: 120, marginRight: 5 }}
  1948. value={this.state.processStatusSearch}
  1949. >
  1950. <Option value="3">未分配</Option>
  1951. <Option value="4">已分配</Option>
  1952. <Option value="9">已驳回</Option>
  1953. </Select>
  1954. <Select
  1955. placeholder="结算状态"
  1956. onChange={(e) => {
  1957. this.setState({ liquidationStatus: e });
  1958. }}
  1959. style={{ width: 120, marginRight: 5 }}
  1960. value={this.state.liquidationStatus}
  1961. >
  1962. <Option value="0">首付待付清</Option>
  1963. <Option value="1">尾款待付清</Option>
  1964. <Option value="2">已付清</Option>
  1965. </Select>
  1966. <Select
  1967. style={{ width: 120 }}
  1968. placeholder="签单金额"
  1969. value={this.state.amountStatus}
  1970. onChange={(e) => {
  1971. this.setState({
  1972. amountStatus: e,
  1973. });
  1974. }}
  1975. >
  1976. <Option value="0">10万元以下</Option>
  1977. <Option value="1">10~20万元</Option>
  1978. <Option value="2">20~30万元</Option>
  1979. <Option value="3">30~40万元</Option>
  1980. <Option value="4">40万元以上</Option>
  1981. </Select>
  1982. <span style={{}}>下单日期:</span>
  1983. <RangePicker
  1984. style={{ width: 170 }}
  1985. value={[
  1986. this.state.releaseDate[0]
  1987. ? moment(this.state.releaseDate[0])
  1988. : null,
  1989. this.state.releaseDate[1]
  1990. ? moment(this.state.releaseDate[1])
  1991. : null,
  1992. ]}
  1993. onChange={(data, dataString) => {
  1994. this.setState({ releaseDate: dataString });
  1995. }}
  1996. />
  1997. <span style={{}}>最近收款:</span>
  1998. <RangePicker
  1999. style={{ width: 170 }}
  2000. value={[
  2001. this.state.shouKuanDate[0]
  2002. ? moment(this.state.shouKuanDate[0])
  2003. : null,
  2004. this.state.shouKuanDate[1]
  2005. ? moment(this.state.shouKuanDate[1])
  2006. : null,
  2007. ]}
  2008. onChange={(data, dataString) => {
  2009. this.setState({ shouKuanDate: dataString });
  2010. }}
  2011. />
  2012. <Button
  2013. type="primary"
  2014. onClick={this.search}
  2015. style={{ marginLeft: 10 }}
  2016. disabled={this.state.loadingA ? true : false}
  2017. >
  2018. 搜索
  2019. </Button>
  2020. <Button onClick={this.reset}>重置</Button>
  2021. </div>
  2022. </TabPane>
  2023. <TabPane tab="打印" key="3">
  2024. <Button
  2025. type="primary"
  2026. style={{ margin: "11px 0px 10px 10px" }}
  2027. onClick={this.printAll}
  2028. disabled={!this.state.dataSource.length}
  2029. >
  2030. 打印所有列表信息
  2031. </Button>
  2032. <Button
  2033. type="primary"
  2034. disabled={this.state.selectedRowKeys.length != 1}
  2035. style={{ margin: "11px 0px 10px 10px" }}
  2036. onClick={() => {
  2037. this.inRecordData();
  2038. this.setState({
  2039. bvisible: true,
  2040. });
  2041. }}
  2042. >
  2043. 打印开票详情
  2044. </Button>
  2045. <Button
  2046. type="primary"
  2047. disabled={this.state.selectedRowKeys.length != 1}
  2048. style={{ margin: "11px 0px 10px 10px" }}
  2049. onClick={() => {
  2050. this.waterData();
  2051. this.setState({
  2052. cvisible: true,
  2053. });
  2054. }}
  2055. >
  2056. 打印收款流水
  2057. </Button>
  2058. <Button
  2059. type="primary"
  2060. disabled={this.state.selectedRowKeys.length != 1}
  2061. style={{ margin: "11px 0px 10px 10px" }}
  2062. onClick={() => {
  2063. this.timeData();
  2064. this.setState({
  2065. timeVisible: true,
  2066. });
  2067. }}
  2068. >
  2069. 打印工时信息
  2070. </Button>
  2071. <Button
  2072. type="primary"
  2073. disabled={this.state.selectedRowKeys.length != 1}
  2074. style={{ margin: "11px 0px 10px 10px" }}
  2075. onClick={() => {
  2076. this.cuiData();
  2077. this.setState({
  2078. cuiVisible: true,
  2079. });
  2080. }}
  2081. >
  2082. 打印催款信息
  2083. </Button>
  2084. <Button
  2085. type="primary"
  2086. disabled={this.state.selectedRowKeys.length != 1}
  2087. style={{ margin: "11px 0px 10px 10px" }}
  2088. onClick={() => {
  2089. this.proData();
  2090. this.setState({
  2091. proVisible: true,
  2092. });
  2093. }}
  2094. >
  2095. 打印项目进度
  2096. </Button>
  2097. </TabPane>
  2098. <TabPane tab="导出Excel" key="4">
  2099. <Button
  2100. type="primary"
  2101. style={{ margin: "11px 0px 10px 10px" }}
  2102. onClick={this.exportAll}
  2103. >
  2104. 导出当前列表
  2105. </Button>
  2106. <Button
  2107. type="primary"
  2108. disabled={this.state.selectedRowKeys.length != 1}
  2109. style={{ margin: "11px 0px 10px 10px" }}
  2110. onClick={this.exportKaip}
  2111. >
  2112. 导出所选开票详情
  2113. </Button>
  2114. <Button
  2115. type="primary"
  2116. disabled={this.state.selectedRowKeys.length != 1}
  2117. style={{ margin: "11px 0px 10px 10px" }}
  2118. onClick={this.exportWater}
  2119. >
  2120. 导出所选收款详情流水
  2121. </Button>
  2122. <Button
  2123. type="primary"
  2124. disabled={this.state.selectedRowKeys.length != 1}
  2125. style={{ margin: "11px 0px 10px 10px" }}
  2126. onClick={this.exportTime}
  2127. >
  2128. 导出所选工时信息
  2129. </Button>
  2130. <Button
  2131. type="primary"
  2132. disabled={this.state.selectedRowKeys.length != 1}
  2133. style={{ margin: "11px 0px 10px 10px" }}
  2134. onClick={this.exportCui}
  2135. >
  2136. 导出催款信息
  2137. </Button>
  2138. <Button
  2139. type="primary"
  2140. disabled={this.state.selectedRowKeys.length != 1}
  2141. style={{ margin: "11px 0px 10px 10px" }}
  2142. onClick={this.exportPro}
  2143. >
  2144. 导出项目进度
  2145. </Button>
  2146. </TabPane>
  2147. <TabPane tab="查看" key="5">
  2148. <Button
  2149. type="primary"
  2150. disabled={this.state.selectedRowKeys.length != 1}
  2151. style={{ margin: "11px 0px 10px 10px" }}
  2152. onClick={() => {
  2153. this.inRecordData();
  2154. this.setState({
  2155. bvisible: true,
  2156. });
  2157. }}
  2158. >
  2159. 查看开票详情
  2160. </Button>
  2161. <Button
  2162. type="primary"
  2163. disabled={this.state.selectedRowKeys.length != 1}
  2164. style={{ margin: "11px 0px 10px 10px" }}
  2165. onClick={() => {
  2166. this.waterData();
  2167. this.setState({
  2168. cvisible: true,
  2169. });
  2170. }}
  2171. >
  2172. 详情收款流水
  2173. </Button>
  2174. <Button
  2175. type="primary"
  2176. disabled={this.state.selectedRowKeys.length != 1}
  2177. style={{ margin: "11px 0px 10px 10px" }}
  2178. onClick={() => {
  2179. this.timeData();
  2180. this.setState({
  2181. timeVisible: true,
  2182. });
  2183. }}
  2184. >
  2185. 工时信息
  2186. </Button>
  2187. <Button
  2188. type="primary"
  2189. disabled={this.state.selectedRowKeys.length != 1}
  2190. style={{ margin: "11px 0px 10px 10px" }}
  2191. onClick={() => {
  2192. this.cuiData();
  2193. this.setState({
  2194. cuiVisible: true,
  2195. });
  2196. }}
  2197. >
  2198. 催款信息
  2199. </Button>
  2200. <Button
  2201. type="primary"
  2202. disabled={this.state.selectedRowKeys.length != 1}
  2203. style={{ margin: "11px 0px 10px 10px" }}
  2204. onClick={() => {
  2205. this.proData();
  2206. this.setState({
  2207. proVisible: true,
  2208. });
  2209. }}
  2210. >
  2211. 项目进度
  2212. </Button>
  2213. </TabPane>
  2214. {/* <TabPane tab="批量操作" key="6">
  2215. <Button
  2216. type="primary"
  2217. disabled={this.state.selectedRowKeys.length == 0}
  2218. style={{ margin: "0px 0px 10px 10px" }}
  2219. onClick={e => {
  2220. e.stopPropagation(),
  2221. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  2222. }}
  2223. >
  2224. 转交
  2225. </Button>
  2226. </TabPane> */}
  2227. </Tabs>
  2228. <div className="patent-table">
  2229. <Spin spinning={this.state.loadingA}>
  2230. <Table
  2231. bordered
  2232. columns={
  2233. this.state.changeList == undefined
  2234. ? this.state.columns
  2235. : this.state.changeList
  2236. }
  2237. dataSource={this.state.dataSource}
  2238. rowSelection={rowSelection}
  2239. scroll={{ x: "max-content", y: 0 }}
  2240. pagination={this.state.pagination}
  2241. onRowDoubleClick={this.tableRowClick.bind(this)}
  2242. size="small"
  2243. />
  2244. </Spin>
  2245. <p
  2246. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  2247. >
  2248. {
  2249. <span style={{ marginRight: 10 }}>
  2250. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  2251. </span>
  2252. }
  2253. {
  2254. <span>
  2255. {`合同额总计(万元):${
  2256. this.state.totalHui ? this.state.totalHui : "0"
  2257. }`}
  2258. </span>
  2259. }
  2260. </p>
  2261. </div>
  2262. <Assign
  2263. title="任务"
  2264. selApi={"/api/admin/newOrder/updateFinance"}
  2265. data={this.state.assignDataY}
  2266. showDesc={this.state.assignVisibleY}
  2267. closeDesc={this.closeAssignY.bind(this)}
  2268. // fenpaiData={8}
  2269. specially={0}
  2270. roleName={this.state.nub}
  2271. requestMethod={"get"}
  2272. />
  2273. <OrderDesc
  2274. data={this.state.RowData}
  2275. showDesc={this.state.showDesc}
  2276. closeDesc={this.closeDesc.bind(this)}
  2277. />
  2278. <Receivable
  2279. title="收款记录"
  2280. api="/api/admin/financial/addReceiptsFlow"
  2281. data={this.state.assignDataX}
  2282. showDesc={this.state.assignVisibleX}
  2283. closeDesc={this.closeAssignX.bind(this)}
  2284. />
  2285. <Modal
  2286. visible={this.state.boHuiVisible}
  2287. width="400px"
  2288. title="驳回备注"
  2289. footer=""
  2290. onOk={this.boHuiOk}
  2291. onCancel={this.boHuiCancel}
  2292. >
  2293. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  2294. <Spin spinning={this.state.loading}>
  2295. <FormItem
  2296. labelCol={{ span: 5 }}
  2297. wrapperCol={{ span: 16 }}
  2298. label={
  2299. <span>
  2300. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  2301. </span>
  2302. }
  2303. >
  2304. <Input
  2305. type="textarea"
  2306. rows={4}
  2307. placeholder="请输入驳回原因"
  2308. value={this.state.content}
  2309. onChange={(e) => {
  2310. this.setState({ content: e.target.value });
  2311. }}
  2312. />
  2313. </FormItem>
  2314. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  2315. <Button
  2316. type="primary"
  2317. htmlType="submit"
  2318. style={{ marginRight: 20 }}
  2319. >
  2320. 驳回
  2321. </Button>
  2322. <Button
  2323. type="default"
  2324. onClick={() => {
  2325. this.boHuiCancel();
  2326. }}
  2327. >
  2328. 取消
  2329. </Button>
  2330. </FormItem>
  2331. </Spin>
  2332. </Form>
  2333. </Modal>
  2334. <Modal
  2335. visible={this.state.bvisible}
  2336. footer=""
  2337. title="开票历史记录"
  2338. className="admin-desc-content"
  2339. width="900px"
  2340. onCancel={this.inRecordCanl}
  2341. >
  2342. <Spin spinning={this.state.loading}>
  2343. <div
  2344. className="patent-table"
  2345. ref={(e) => {
  2346. this.refs.kaiPiao = e;
  2347. }}
  2348. >
  2349. <Table
  2350. columns={this.state.columnsDate}
  2351. dataSource={this.state.recordData}
  2352. onRowClick={this.kaiPiaoData}
  2353. pagination={false}
  2354. bordered
  2355. size="small"
  2356. />
  2357. <div className="clearfix" style={{ marginTop: "20px" }}>
  2358. <FormItem
  2359. className="half-item"
  2360. {...formItemLayout}
  2361. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2362. >
  2363. <span>{this.state.sum + "(万元)"}</span>
  2364. </FormItem>
  2365. </div>
  2366. <ReactToPrint
  2367. trigger={() => (
  2368. <Button
  2369. type="primary"
  2370. style={{
  2371. float: "right",
  2372. // marginTop: 10,
  2373. position: "absolute",
  2374. top: -54,
  2375. right: 30,
  2376. }}
  2377. >
  2378. 打印
  2379. </Button>
  2380. )}
  2381. content={() => this.refs.kaiPiao}
  2382. />
  2383. </div>
  2384. </Spin>
  2385. </Modal>
  2386. <Modal
  2387. visible={this.state.cvisible}
  2388. footer=""
  2389. title="详细收款流水"
  2390. className="admin-desc-content"
  2391. width="1300px"
  2392. onCancel={this.waterCanl}
  2393. >
  2394. <Spin spinning={this.state.loading}>
  2395. <div
  2396. className="patent-table"
  2397. ref={(e) => {
  2398. this.refs.shouKuan = e;
  2399. }}
  2400. >
  2401. <Table
  2402. columns={this.state.waterlistDate}
  2403. dataSource={this.state.waterData}
  2404. pagination={false}
  2405. scroll={{ x: "max-content", y: 0 }}
  2406. bordered
  2407. size="small"
  2408. />
  2409. <div className="clearfix" style={{ marginTop: "20px" }}>
  2410. <FormItem
  2411. className="half-item"
  2412. {...formItemLayout}
  2413. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  2414. >
  2415. <span>{this.state.waterSum + "(万元)"}</span>
  2416. </FormItem>
  2417. </div>
  2418. <ReactToPrint
  2419. trigger={() => (
  2420. <Button
  2421. type="primary"
  2422. style={{
  2423. float: "right",
  2424. position: "absolute",
  2425. top: -54,
  2426. right: 30,
  2427. }}
  2428. >
  2429. 打印
  2430. </Button>
  2431. )}
  2432. content={() => this.refs.shouKuan}
  2433. />
  2434. </div>
  2435. </Spin>
  2436. </Modal>
  2437. <Modal
  2438. visible={this.state.dvisible}
  2439. footer=""
  2440. title="所有列表信息"
  2441. className="admin-desc-content"
  2442. width="1300px"
  2443. onCancel={() => {
  2444. this.loadData();
  2445. this.setState({
  2446. dvisible: false,
  2447. });
  2448. }}
  2449. >
  2450. <Spin spinning={this.state.loading}>
  2451. <div
  2452. className="patent-table"
  2453. style={{
  2454. // width: 900,
  2455. // position: "relative",
  2456. // left: "50%",
  2457. // transform: "translate(-50%)",
  2458. padding: "25px 0 30px 30px",
  2459. }}
  2460. ref={(e) => {
  2461. this.refs.all = e;
  2462. }}
  2463. >
  2464. <Table
  2465. columns={this.state.printColumns}
  2466. dataSource={this.state.dataSource}
  2467. pagination={false}
  2468. bordered
  2469. size="small"
  2470. />
  2471. </div>
  2472. </Spin>
  2473. <ReactToPrint
  2474. trigger={() => (
  2475. <Button
  2476. type="primary"
  2477. style={{
  2478. float: "right",
  2479. marginTop: 10,
  2480. position: "absolute",
  2481. top: 0,
  2482. right: 30,
  2483. }}
  2484. >
  2485. 打印
  2486. </Button>
  2487. )}
  2488. content={() => this.refs.all}
  2489. />
  2490. </Modal>
  2491. <Project
  2492. record={this.state.record}
  2493. visible={this.state.pvisible}
  2494. isAuditPayment={true}
  2495. cancel={() => {
  2496. this.setState({ pvisible: false });
  2497. }}
  2498. />
  2499. <Modal
  2500. visible={this.state.timeVisible}
  2501. footer=""
  2502. title="工时详情"
  2503. className="admin-desc-content"
  2504. width="1300px"
  2505. pagination={false}
  2506. onCancel={() => {
  2507. this.loadData();
  2508. this.setState({
  2509. timeVisible: false,
  2510. });
  2511. }}
  2512. >
  2513. <Spin spinning={this.state.loading}>
  2514. <div
  2515. className="patent-table"
  2516. style={
  2517. {
  2518. // width: 900,
  2519. // position: "relative",
  2520. // left: "50%",
  2521. // transform: "translate(-50%)",
  2522. // padding: "25px 0 30px 30px"
  2523. }
  2524. }
  2525. ref={(e) => {
  2526. this.refs.all = e;
  2527. }}
  2528. >
  2529. <Table
  2530. columns={this.state.timeColumns}
  2531. dataSource={this.state.timeDataList}
  2532. onRowClick={this.tableRowClickPro}
  2533. scroll={{ x: "max-content", y: 0 }}
  2534. pagination={false}
  2535. bordered
  2536. size="small"
  2537. />
  2538. </div>
  2539. </Spin>
  2540. <ReactToPrint
  2541. trigger={() => (
  2542. <Button
  2543. type="primary"
  2544. style={{
  2545. float: "right",
  2546. marginTop: 10,
  2547. position: "absolute",
  2548. top: 0,
  2549. right: 30,
  2550. }}
  2551. >
  2552. 打印
  2553. </Button>
  2554. )}
  2555. content={() => this.refs.all}
  2556. />
  2557. </Modal>
  2558. <Modal
  2559. visible={this.state.cuiVisible}
  2560. footer=""
  2561. title="催款详情"
  2562. className="admin-desc-content"
  2563. width="1300px"
  2564. pagination={false}
  2565. onCancel={() => {
  2566. this.loadData();
  2567. this.setState({
  2568. cuiVisible: false,
  2569. cuiTabKey: "1",
  2570. });
  2571. }}
  2572. >
  2573. <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  2574. <TabPane tab="催款节点" key="1">
  2575. <Spin spinning={this.state.loading}>
  2576. <div
  2577. className="patent-table"
  2578. ref={(e) => {
  2579. this.refs.all = e;
  2580. }}
  2581. >
  2582. <Table
  2583. columns={this.state.cuiColumns}
  2584. dataSource={this.state.cuiDataList}
  2585. scroll={{ x: "max-content", y: 0 }}
  2586. pagination={false}
  2587. bordered
  2588. size="small"
  2589. />
  2590. </div>
  2591. <ReactToPrint
  2592. trigger={() => (
  2593. <Button
  2594. type="primary"
  2595. style={{
  2596. float: "right",
  2597. marginTop: 10,
  2598. position: "absolute",
  2599. top: "-60px",
  2600. right: 30,
  2601. }}
  2602. >
  2603. 打印
  2604. </Button>
  2605. )}
  2606. content={() => this.refs.all}
  2607. />
  2608. </Spin>
  2609. </TabPane>
  2610. <TabPane tab="欠款催收记录" key="2">
  2611. <Spin spinning={this.state.loading}>
  2612. <div
  2613. className="patent-table"
  2614. ref={(e) => {
  2615. this.refs.all = e;
  2616. }}
  2617. >
  2618. <Table
  2619. columns={this.state.qianColumns}
  2620. dataSource={this.state.qianDataList}
  2621. scroll={{ x: "max-content", y: 0 }}
  2622. pagination={false}
  2623. bordered
  2624. size="small"
  2625. />
  2626. </div>
  2627. <ReactToPrint
  2628. trigger={() => (
  2629. <Button
  2630. type="primary"
  2631. style={{
  2632. float: "right",
  2633. marginTop: 10,
  2634. position: "absolute",
  2635. top: "-60px",
  2636. right: 30,
  2637. }}
  2638. >
  2639. 打印
  2640. </Button>
  2641. )}
  2642. content={() => this.refs.all}
  2643. />
  2644. </Spin>
  2645. </TabPane>
  2646. </Tabs>
  2647. </Modal>
  2648. <Modal
  2649. visible={this.state.proVisible}
  2650. footer=""
  2651. title="项目进度"
  2652. className="admin-desc-content"
  2653. width="1300px"
  2654. pagination={false}
  2655. onCancel={() => {
  2656. this.loadData(this.state.page);
  2657. this.setState({
  2658. proVisible: false,
  2659. });
  2660. }}
  2661. >
  2662. <Spin spinning={this.state.loading}>
  2663. <div
  2664. className="patent-table"
  2665. style={
  2666. {
  2667. // width: 900,
  2668. // position: "relative",
  2669. // left: "50%",
  2670. // transform: "translate(-50%)",
  2671. // padding: "25px 0 30px 30px"
  2672. }
  2673. }
  2674. ref={(e) => {
  2675. this.refs.all = e;
  2676. }}
  2677. >
  2678. <Table
  2679. columns={this.state.proColumns}
  2680. dataSource={this.state.proDataList}
  2681. scroll={{ x: "max-content", y: 0 }}
  2682. onRowClick={this.tableRowClickPro}
  2683. pagination={false}
  2684. bordered
  2685. size="small"
  2686. />
  2687. </div>
  2688. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  2689. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  2690. </span>
  2691. </Spin>
  2692. <ReactToPrint
  2693. trigger={() => (
  2694. <Button
  2695. type="primary"
  2696. style={{
  2697. float: "right",
  2698. marginTop: 10,
  2699. position: "absolute",
  2700. top: 0,
  2701. right: 30,
  2702. }}
  2703. >
  2704. 打印
  2705. </Button>
  2706. )}
  2707. content={() => this.refs.all}
  2708. />
  2709. </Modal>
  2710. <Spin spinning={this.state.loading}>
  2711. {this.state.checkVisible ? <Modal
  2712. title="审核订单"
  2713. visible={this.state.checkVisible}
  2714. onOk={this.checkOk}
  2715. confirmLoading={this.state.loading}
  2716. okText={"通过"}
  2717. onCancel={() => {
  2718. this.state.financeApprovalAjaxObj ? this.state.financeApprovalAjaxObj.abort() : null;
  2719. this.setState({
  2720. financeApprovalAjaxObj: null
  2721. })
  2722. this.loadData();
  2723. this.setState({
  2724. checkVisible: false,
  2725. checkData: "",
  2726. });
  2727. }}
  2728. >
  2729. <TextArea
  2730. value={this.state.checkData}
  2731. onChange={(e, recard) => {
  2732. this.setState({
  2733. checkData: e.target.value,
  2734. });
  2735. }}
  2736. placeholder="请填写审核内容"
  2737. />
  2738. </Modal> : <div/>}
  2739. </Spin>
  2740. <KaiPiaoModal
  2741. visible={this.state.avisible}
  2742. data={this.state.modalData}
  2743. onCancel={this.visitCancels}
  2744. loading={this.state.loading}
  2745. />
  2746. </div>
  2747. );
  2748. },
  2749. });
  2750. export default ShouKuang;