approvedOutsourcing.jsx 69 KB

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