approvedOutsourcingAll.jsx 72 KB

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