contractCwzy.js 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606
  1. import React from "react";
  2. import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker } from "antd";
  3. import $ from "jquery/src/ajax";
  4. import {
  5. getNewOrderStatus,
  6. getProcessStatusNew,
  7. splitUrl,
  8. getjiedian,
  9. getboutique,
  10. getCuikuan,
  11. getProjectStatus,
  12. ShowModal,
  13. getType
  14. } from "@/tools.js";
  15. import "./customer.less";
  16. import { ChangeDetail } from "./changeComponent/changeDetailCwzy.js";
  17. import { SearchInput } from "./changeComponent/searchInput.js";
  18. import OrderDetail from "./changeComponent/orderDetail";
  19. import { ChooseList } from "./chooseList.jsx";
  20. import ShowModalDiv from "@/showModal.jsx";
  21. const { RangePicker } = DatePicker;
  22. import ReactToPrint from "react-to-print";
  23. import OrderRiZi from "@/orderRiZi.jsx";
  24. const contractChange = Form.create()(
  25. React.createClass({
  26. loadData(pageNo) {
  27. this.setState({
  28. loading: true
  29. });
  30. $.ajax({
  31. method: "get",
  32. dataType: "json",
  33. crossDomain: false,
  34. url: globalConfig.context + "/api/admin/orderChange/orderChangeList",
  35. data: {
  36. pageNo: pageNo || 1,
  37. pageSize: this.state.pagination.pageSize,
  38. userName: this.state.searchData.userNameSearch,
  39. processState: this.props.processState,
  40. timeType: this.state.searchData.timeTypeSearch,
  41. startTime: this.state.searchData.releaseDate[0],
  42. endTime: this.state.searchData.releaseDate[1],
  43. salesmanName: this.state.searchData.salesmanNameSearch,
  44. complete: this.state.searchData.completeSearch || 1,
  45. depId: this.state.searchData.depIdSearch,
  46. orderNo: this.state.searchData.orderNoSearch,
  47. contractNo: this.state.searchData.contractNoSearch,
  48. type: this.state.searchData.changeSearch
  49. },
  50. success: function(data) {
  51. ShowModal(this);
  52. let theArr = [];
  53. if (data.error.length || data.data.list == "") {
  54. if (data.error && data.error.length) {
  55. message.warning(data.error[0].message);
  56. }
  57. } else {
  58. for (let i = 0; i < data.data.list.length; i++) {
  59. let thisdata = data.data.list[i];
  60. theArr.push({
  61. key: i,
  62. orderNo: thisdata.orderNo,
  63. createTimes: thisdata.createTimes,
  64. nickname: thisdata.nickname,
  65. orderType: thisdata.orderType,
  66. establishTimes: thisdata.establishTimes,
  67. orderStatus: thisdata.orderStatus,
  68. totalAmount: thisdata.totalAmount,
  69. settlementAmount: thisdata.settlementAmount,
  70. arrears: thisdata.arrears,
  71. salesmanName: thisdata.salesmanName,
  72. depName: thisdata.depName,
  73. processState: thisdata.processState,
  74. type: thisdata.type,
  75. status: thisdata.status,
  76. id: thisdata.id,
  77. contractNo: thisdata.contractNo,
  78. processStateText: getProcessStatusNew(
  79. thisdata.processState,
  80. thisdata.status
  81. )
  82. });
  83. }
  84. this.state.pagination.total = data.data.totalCount;
  85. this.state.pagination.current = data.data.pageNo;
  86. }
  87. if (data.data && data.data.list && !data.data.list.length) {
  88. this.state.pagination.total = 0;
  89. }
  90. this.setState({
  91. dataSource: theArr,
  92. pageNo: pageNo,
  93. pagination: this.state.pagination
  94. });
  95. }.bind(this)
  96. }).always(
  97. function() {
  98. this.setState({
  99. loading: false
  100. });
  101. }.bind(this)
  102. );
  103. },
  104. getInitialState() {
  105. return {
  106. dvisible: false,
  107. page: 1,
  108. searchData: {
  109. releaseDate: []
  110. },
  111. primaryOrderData: {}, //原订单数据
  112. orderData: {}, //现订单数据
  113. pictureUrl: [],
  114. voucherUrl: [],
  115. attachmentUrl: [],
  116. //收款数据
  117. proceedsData: {},
  118. proTotal: 0,
  119. invTotal: 0,
  120. contractData: {},
  121. // 回收退票数据
  122. refundInvoice: [],
  123. RefundInvoice: [],
  124. additionalOrderData: {},
  125. paginations: false,
  126. activeKey: "1",
  127. confirmLoading: false,
  128. aloading: false,
  129. pagination: {
  130. defaultCurrent: 1,
  131. defaultPageSize: 10,
  132. showQuickJumper: true,
  133. pageSize: 10,
  134. onChange: function(page) {
  135. this.loadData(page);
  136. }.bind(this),
  137. showTotal: function(total) {
  138. return "共" + total + "条数据";
  139. }
  140. },
  141. columns: [
  142. {
  143. title: "合同编号",
  144. dataIndex: "contractNo",
  145. key: "contractNo"
  146. },
  147. {
  148. title: "订单编号",
  149. dataIndex: "orderNo",
  150. key: "orderNo"
  151. },
  152. {
  153. title: "客户名称",
  154. dataIndex: "nickname",
  155. key: "nickname"
  156. },
  157. {
  158. title: "订单部门",
  159. dataIndex: "depName",
  160. key: "depName"
  161. },
  162. {
  163. title: "订单类型",
  164. dataIndex: "orderType",
  165. key: "orderType",
  166. render: text => {
  167. return text ? "科技项目" : "认证项目";
  168. }
  169. },
  170. {
  171. title: "下单时间",
  172. dataIndex: "establishTimes",
  173. key: "establishTimes"
  174. },
  175. {
  176. title: "订单状态",
  177. dataIndex: "orderStatus",
  178. key: "orderStatus",
  179. render: text => {
  180. return getNewOrderStatus(text);
  181. }
  182. },
  183. {
  184. title: "合同额(万元)",
  185. dataIndex: "totalAmount",
  186. key: "totalAmount"
  187. },
  188. {
  189. title: "已付额(万元)",
  190. dataIndex: "settlementAmount",
  191. key: "settlementAmount"
  192. },
  193. {
  194. title: "欠款(万元)",
  195. dataIndex: "arrears",
  196. key: "arrears"
  197. },
  198. {
  199. title: "订单负责人",
  200. dataIndex: "salesmanName",
  201. key: "salesmanName"
  202. },
  203. {
  204. title: "变更类型",
  205. dataIndex: "type",
  206. key: "type",
  207. render: text => {
  208. return getType(text);
  209. }
  210. },
  211. {
  212. title: "审核状态",
  213. dataIndex: "processStateText",
  214. key: "processStateText"
  215. },
  216. {
  217. title: "提交时间",
  218. dataIndex: "createTimes",
  219. key: "createTimes"
  220. }
  221. ],
  222. dataSource: [],
  223. // 传递给子组件的
  224. dataProps: [],
  225. columnsX: [
  226. {
  227. title: "业务项目名称",
  228. dataIndex: "commodityName",
  229. key: "commodityName"
  230. },
  231. {
  232. title: "项目类别",
  233. dataIndex: "cname",
  234. key: "cname"
  235. },
  236. {
  237. title: "项目数量",
  238. dataIndex: "commodityQuantity",
  239. key: "commodityQuantity"
  240. },
  241. {
  242. title: "金额(万元)",
  243. dataIndex: "commodityPrice",
  244. key: "commodityPrice"
  245. },
  246. {
  247. title: "负责人",
  248. dataIndex: "contacts",
  249. key: "contacts"
  250. },
  251. {
  252. title: "负责人电话",
  253. dataIndex: "contactsMobile",
  254. key: "contactsMobile"
  255. },
  256. {
  257. title: "项目状态",
  258. dataIndex: "projectStatus",
  259. key: "projectStatus",
  260. render: text => {
  261. return getProjectStatus(text);
  262. }
  263. },
  264. {
  265. title: "主要项目",
  266. dataIndex: "main",
  267. key: "main",
  268. render: text => {
  269. return text ? "是" : "否";
  270. }
  271. },
  272. {
  273. title: "项目说明",
  274. dataIndex: "taskComment",
  275. key: "taskComment",
  276. render: text => {
  277. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  278. }
  279. }
  280. ],
  281. // 子组件改变的表格title数组
  282. changeList: undefined,
  283. columnsrizhi: [
  284. {
  285. title: "流程",
  286. dataIndex: "processName",
  287. key: "processName"
  288. },
  289. {
  290. title: "操作人",
  291. dataIndex: "adminName",
  292. key: "adminName"
  293. },
  294. {
  295. title: "时间",
  296. dataIndex: "createDate",
  297. key: "createDate"
  298. }
  299. ],
  300. dataSourceX: [],
  301. ContactsLists: [
  302. {
  303. title: "催款科目",
  304. dataIndex: "dunSubject",
  305. key: "dunSubject",
  306. render: text => {
  307. return getjiedian(text);
  308. }
  309. },
  310. {
  311. title: "金额(万元)",
  312. dataIndex: "money",
  313. key: "money"
  314. },
  315. {
  316. title: "催款状态",
  317. dataIndex: "dunStatus",
  318. key: "dunStatus",
  319. render: text => {
  320. return getCuikuan(text);
  321. }
  322. }
  323. ]
  324. };
  325. },
  326. departmentList() {
  327. this.setState({
  328. loading: true
  329. });
  330. $.ajax({
  331. method: "get",
  332. dataType: "json",
  333. crossDomain: false,
  334. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  335. data: {},
  336. success: function(data) {
  337. let thedata = data.data;
  338. let theArr = [];
  339. if (!thedata) {
  340. if (data.error && data.error.length) {
  341. message.warning(data.error[0].message);
  342. }
  343. } else {
  344. thedata.map(function(item, index) {
  345. theArr.push({
  346. key: index,
  347. name: item.name,
  348. id: item.id
  349. });
  350. });
  351. }
  352. this.setState({
  353. departmentArr: theArr
  354. });
  355. }.bind(this)
  356. }).always(
  357. function() {
  358. this.setState({
  359. loading: false
  360. });
  361. }.bind(this)
  362. );
  363. },
  364. //页面加载函数
  365. componentWillMount() {
  366. this.loadData();
  367. },
  368. //整行点击
  369. tableRowClick(record) {
  370. this.setState(
  371. {
  372. visible: true,
  373. type: record.type,
  374. status: record.status,
  375. buttonStatus: true,
  376. orderStatus: record.orderStatus,
  377. processStateText: record.processStateText,
  378. id: record.id,
  379. orderNo: record.orderNo
  380. },
  381. () => {
  382. this.xiangqing(record.orderNo);
  383. this.xiangmu(record.orderNo);
  384. this.jiedian(record.orderNo);
  385. this.jiedianNew(record.orderNo);
  386. }
  387. );
  388. },
  389. //点击打卡项目详情
  390. tableRowClickX(record) {
  391. this.setState({
  392. jid: record.id, //项目ID
  393. kid: record.commodityId, //商品ID
  394. commodityName: record.commodityName, //金额
  395. commodityPrice: record.commodityPrice, //金额
  396. commodityQuantity: record.commodityQuantity, //数量
  397. taskComment: record.taskComment, //备注
  398. main: record.main.toString(), //是否为主要
  399. addnextVisible: true,
  400. addState: 0
  401. });
  402. },
  403. //项目详情关闭
  404. nextCancel() {
  405. this.setState({
  406. addnextVisible: false
  407. });
  408. },
  409. // 合同变更详情
  410. ChangeDetail(id) {
  411. let url = window.location.href.substring(7);
  412. $.ajax({
  413. method: "get",
  414. dataType: "json",
  415. crossDomain: false,
  416. url:
  417. globalConfig.context +
  418. "/api/admin/orderChange/orderChangeDetailsById",
  419. data: {
  420. id: id
  421. },
  422. success: function(data) {
  423. if (data.data) {
  424. let thisdata = data.data;
  425. Object.assign(thisdata, {
  426. processStateText: this.state.processStateText,
  427. userName: this.state.userName,
  428. contractNo: this.state.contractNo
  429. });
  430. // console.log("888",data);
  431. this.setState({
  432. contractData: thisdata,
  433. voucherUrl: thisdata.voucherUrl
  434. ? splitUrl(
  435. thisdata.voucherUrl,
  436. ",",
  437. globalConfig.avatarHost + "/upload",
  438. url
  439. )
  440. : []
  441. });
  442. console.log("url", this.state.voucherUrl);
  443. }
  444. }.bind(this)
  445. });
  446. $.ajax({
  447. method: "get",
  448. dataType: "json",
  449. crossDomain: false,
  450. url:
  451. globalConfig.context +
  452. "/api/admin/orderChange/listOrderInvoiceAndBill",
  453. data: {
  454. orderNo: this.state.orderNo
  455. },
  456. success: function(data) {
  457. if (!data.data) return;
  458. let proTotal = 0;
  459. let invTotal = 0;
  460. data.data.bill.forEach(item => {
  461. proTotal += item.transactionAmount;
  462. });
  463. data.data.invoice.forEach(item => {
  464. invTotal += item.amount;
  465. });
  466. this.setState({
  467. proceedsData: data.data,
  468. proTotal,
  469. invTotal
  470. });
  471. }.bind(this)
  472. });
  473. $.ajax({
  474. method: "get",
  475. dataType: "json",
  476. crossDomain: false,
  477. url:
  478. globalConfig.context +
  479. "/api/admin/orderChange/listOrderRefundInvoice",
  480. data: {
  481. orderNo: this.state.orderNo
  482. },
  483. success: data => {
  484. if (!data) return;
  485. data.data.forEach(item => {
  486. item.load = true;
  487. });
  488. this.setState({
  489. refundInvoice: data.data
  490. });
  491. }
  492. });
  493. },
  494. //订单详情
  495. xiangqing(orderNos) {
  496. $.ajax({
  497. method: "get",
  498. dataType: "json",
  499. crossDomain: false,
  500. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  501. data: {
  502. orderNo: orderNos
  503. },
  504. success: function(data) {
  505. if (data.error.length || data.data.list == "") {
  506. if (data.error && data.error.length) {
  507. message.warning(data.error[0].message);
  508. }
  509. } else {
  510. let thisdata = data.data;
  511. this.setState({
  512. userName: thisdata.userName,
  513. primaryOrderNo: thisdata.primaryOrder,
  514. additionalOrder: thisdata.additionalOrder,
  515. contractNo: thisdata.contractNo,
  516. // arrears: thisdata.arrears,
  517. orderData: thisdata,
  518. contractPictureUrl: thisdata.contractPictureUrl
  519. ? splitUrl(
  520. thisdata.contractPictureUrl,
  521. ",",
  522. globalConfig.avatarHost + "/upload"
  523. )
  524. : []
  525. });
  526. // console.log(thisdata.contractPictureUrl);
  527. }
  528. }.bind(this)
  529. });
  530. },
  531. // 原订单数据
  532. primaryOrder(primaryOrder) {
  533. $.ajax({
  534. method: "get",
  535. dataType: "json",
  536. crossDomain: false,
  537. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  538. data: {
  539. orderNo: primaryOrder
  540. },
  541. success: function(data) {
  542. if (data.error.length || data.data.list == "") {
  543. if (data.error && data.error.length) {
  544. message.warning(data.error[0].message);
  545. }
  546. } else {
  547. let thisdata = data.data;
  548. this.setState({
  549. primaryOrderData: thisdata
  550. });
  551. }
  552. }.bind(this)
  553. });
  554. },
  555. // 附加订单数据
  556. additionalOrder(additionalOrder) {
  557. $.ajax({
  558. method: "get",
  559. dataType: "json",
  560. crossDomain: false,
  561. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  562. data: {
  563. orderNo: additionalOrder
  564. },
  565. success: function(data) {
  566. if (data.error.length || data.data.list == "") {
  567. if (data.error && data.error.length) {
  568. message.warning(data.error[0].message);
  569. }
  570. } else {
  571. let thisdata = data.data;
  572. this.setState({
  573. additionalOrderData: thisdata
  574. });
  575. }
  576. }.bind(this)
  577. });
  578. },
  579. //项目列表
  580. xiangmu(orderNos) {
  581. $.ajax({
  582. method: "get",
  583. dataType: "json",
  584. crossDomain: false,
  585. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  586. data: {
  587. orderNo: orderNos
  588. },
  589. success: function(data) {
  590. let theArr = [];
  591. if (data.error.length || data.data.list == "") {
  592. if (data.error && data.error.length) {
  593. message.warning(data.error[0].message);
  594. }
  595. } else {
  596. for (let i = 0; i < data.data.length; i++) {
  597. let thisdata = data.data[i];
  598. theArr.push({
  599. key: i,
  600. id: thisdata.id,
  601. orderNo: thisdata.orderNo, //订单编号
  602. commodityId: thisdata.commodityId, //项目ID
  603. commodityName: thisdata.commodityName, //项目名称
  604. cname: thisdata.cname, //项目类别
  605. commodityPrice: thisdata.commodityPrice, //项目价格
  606. commodityQuantity: thisdata.commodityQuantity, //项目数量
  607. main: thisdata.main, //是否为主要任务
  608. taskComment: thisdata.taskComment, //任务说明
  609. contacts: thisdata.contacts, //联系人
  610. contactsMobile: thisdata.contactsMobile, //联系人电话
  611. projectStatus: thisdata.projectStatus, //项目状态
  612. sort: thisdata.cSort
  613. });
  614. }
  615. }
  616. this.setState({
  617. dataSourceX: theArr
  618. });
  619. }.bind(this)
  620. });
  621. },
  622. // 查看收款金额
  623. getProceeds(id) {
  624. $.ajax({
  625. method: "get",
  626. dataType: "json",
  627. crossDomain: false,
  628. url:
  629. globalConfig.context +
  630. "/api/admin/orderChange/orderChangeDetailsById",
  631. data: {
  632. id: id
  633. },
  634. success: function(data) {
  635. if (data.error.length || data.data.list == "") {
  636. if (data.error && data.error.length) {
  637. message.warning(data.error[0].message);
  638. }
  639. } else {
  640. // let thisdata = data.data;
  641. }
  642. }.bind(this)
  643. });
  644. },
  645. search(obj) {
  646. this.setState(
  647. {
  648. searchData: obj
  649. },
  650. () => {
  651. this.loadData(1);
  652. }
  653. );
  654. },
  655. rizhi(orderNo) {
  656. $.ajax({
  657. method: "get",
  658. dataType: "json",
  659. crossDomain: false,
  660. url: "/api/admin/newOrder/selectOrderLog",
  661. data: {
  662. orderNo: orderNo
  663. },
  664. success: function(data) {
  665. let theArr = [];
  666. let thisData = data.data;
  667. if (!thisData.length) {
  668. if (data.error && data.error.length) {
  669. message.warning(data.error[0].message);
  670. }
  671. thisData = {};
  672. } else {
  673. for (let i = 0; i < data.data.length; i++) {
  674. let thisdata = data.data[i];
  675. theArr.push({
  676. processName: thisdata.processName,
  677. adminName: thisdata.adminName,
  678. createDate: thisdata.createDate
  679. });
  680. }
  681. }
  682. this.setState({
  683. dataSourcerizhi: theArr
  684. });
  685. }.bind(this)
  686. });
  687. },
  688. getOrderLog(orderNo) {
  689. this.setState({
  690. rizhivisible: true
  691. });
  692. this.rizhi(orderNo);
  693. },
  694. closeOrderLog() {
  695. this.setState({
  696. rizhivisible: false
  697. });
  698. },
  699. //节点列表
  700. jiedian(orderNos) {
  701. $.ajax({
  702. method: "get",
  703. dataType: "json",
  704. crossDomain: false,
  705. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  706. data: {
  707. orderNo: orderNos
  708. },
  709. success: function(data) {
  710. let theArr = [];
  711. let thisData = [];
  712. if (data.error.length || data.data.list == "") {
  713. if (data.error && data.error.length) {
  714. message.warning(data.error[0].message);
  715. }
  716. } else {
  717. for (let i = 0; i < data.data.length; i++) {
  718. thisData = data.data[i];
  719. theArr.push({
  720. key: i,
  721. dunSubject: thisData.dunSubject
  722. ? thisData.dunSubject.toString()
  723. : "", //催款科目
  724. id: thisData.id, //节点Id
  725. money: thisData.money, //催款金额
  726. dunStatus: thisData.dunStatus //催款状态
  727. });
  728. }
  729. this.setState({
  730. contactList: theArr
  731. });
  732. }
  733. }.bind(this)
  734. });
  735. },
  736. jiedianNew(orderNos) {
  737. $.ajax({
  738. method: "get",
  739. dataType: "json",
  740. crossDomain: false,
  741. url:
  742. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  743. data: {
  744. orderNo: orderNos
  745. },
  746. success: function(data) {
  747. if (data.error && data.error.length) {
  748. message.warning(data.error[0].message);
  749. } else {
  750. let theArr = [];
  751. let thisData = [];
  752. let arr = data.data || [];
  753. let totalCui = 0;
  754. for (let i = 0; i < arr.length; i++) {
  755. thisData = arr[i];
  756. totalCui += +thisData.money;
  757. theArr.push({
  758. key: i,
  759. dunSubject: thisData.dunSubject
  760. ? thisData.dunSubject.toString()
  761. : "", //催款科目
  762. id: thisData.id, //节点Id
  763. money: thisData.money, //催款金额
  764. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  765. commodityName: thisData.commodityName,
  766. projectType: thisData.projectType,
  767. dunTypeName: thisData.dunTypeName,
  768. status: thisData.status,
  769. waitDay: thisData.waitDay,
  770. effectiveCount: thisData.effectiveCount,
  771. startDate: thisData.startDate,
  772. dunType: thisData.dunType,
  773. appropriationRatio: thisData.appropriationRatio
  774. });
  775. }
  776. if (!totalCui) {
  777. totalCui = 0;
  778. }
  779. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  780. this.setState({
  781. contactListNew: theArr,
  782. totalCui
  783. });
  784. }
  785. }.bind(this)
  786. }).always(
  787. function() {
  788. this.setState({
  789. loading: false
  790. });
  791. }.bind(this)
  792. );
  793. },
  794. //审核通过
  795. examOk() {
  796. $.ajax({
  797. method: "post",
  798. dataType: "json",
  799. crossDomain: false,
  800. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  801. data: {
  802. orderNo: this.state.orderNo,
  803. orderStatus: 2
  804. },
  805. success: function(data) {
  806. if (data.error.length || data.data.list == "") {
  807. if (data.error && data.error.length) {
  808. message.warning(data.error[0].message);
  809. }
  810. } else {
  811. message.success("该订单已通过审核~");
  812. this.setState({
  813. visible: false
  814. });
  815. this.reset();
  816. }
  817. }.bind(this)
  818. }).always(
  819. function() {
  820. this.setState({
  821. loading: false
  822. });
  823. }.bind(this)
  824. );
  825. },
  826. //通过发给外包
  827. outsourcing() {
  828. $.ajax({
  829. method: "post",
  830. dataType: "json",
  831. crossDomain: false,
  832. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  833. data: {
  834. orderNo: this.state.orderNo,
  835. orderStatus: 2,
  836. outsource: 1
  837. },
  838. success: function(data) {
  839. if (data.error.length || data.data.list == "") {
  840. if (data.error && data.error.length) {
  841. message.warning(data.error[0].message);
  842. }
  843. } else {
  844. message.success("该订单已通过审核~");
  845. this.setState({
  846. visible: false
  847. });
  848. this.reset();
  849. }
  850. }.bind(this)
  851. }).always(
  852. function() {
  853. this.setState({
  854. loading: false
  855. });
  856. }.bind(this)
  857. );
  858. },
  859. //审核不通过
  860. examOks() {
  861. this.setState({
  862. aloading: true
  863. });
  864. $.ajax({
  865. method: "post",
  866. dataType: "json",
  867. crossDomain: false,
  868. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  869. data: {
  870. orderNo: this.state.orderNo,
  871. orderStatus: 3,
  872. reason: this.state.reason
  873. },
  874. success: function(data) {
  875. if (data.error.length || data.data.list == "") {
  876. if (data.error && data.error.length) {
  877. message.warning(data.error[0].message);
  878. this.setState({
  879. aloading: true
  880. });
  881. }
  882. } else {
  883. message.success("该订单已被拒绝~");
  884. this.setState({
  885. visible: false,
  886. aloading: false,
  887. noVisible: false,
  888. reason: ""
  889. });
  890. this.reset();
  891. }
  892. }.bind(this)
  893. }).always(
  894. function() {
  895. this.setState({
  896. loading: false
  897. });
  898. }.bind(this)
  899. );
  900. },
  901. //点击拒绝
  902. examNo() {
  903. this.setState({
  904. noVisible: true
  905. });
  906. },
  907. loadDataChange() {
  908. $.ajax({
  909. method: "get",
  910. dataType: "json",
  911. async: false,
  912. crossDomain: false,
  913. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  914. data: {
  915. changeId: this.state.id
  916. },
  917. success: function(data) {
  918. if (data.error.length || data.data.list == "") {
  919. if (data.error && data.error.length) {
  920. message.warning(data.error[0].message);
  921. }
  922. } else {
  923. // console.log("拿到历史", data);
  924. this.setState({
  925. dataProps: data.data
  926. });
  927. }
  928. }.bind(this)
  929. });
  930. },
  931. callback(key) {
  932. this.setState({
  933. activeKey: key
  934. });
  935. if (key === "1") {
  936. this.xiangmu(this.state.orderNo);
  937. this.jiedian(this.state.orderNo);
  938. this.jiedianNew(this.state.orderNo);
  939. }
  940. if (key === "2") {
  941. this.ChangeDetail(this.state.id);
  942. this.loadDataChange();
  943. this.getProceeds(this.state.id);
  944. }
  945. if (key === "3") {
  946. this.primaryOrder(this.state.primaryOrderNo);
  947. this.xiangmu(this.state.primaryOrderNo);
  948. this.jiedian(this.state.primaryOrderNo);
  949. this.jiedianNew(this.state.primaryOrderNo);
  950. }
  951. if (key === "4") {
  952. this.additionalOrder(this.state.additionalOrder);
  953. this.xiangmu(this.state.additionalOrder);
  954. this.jiedian(this.state.additionalOrder);
  955. this.jiedianNew(this.state.additionalOrder);
  956. this.setState({
  957. buttonStatusA: false
  958. });
  959. } else {
  960. this.setState({
  961. buttonStatusA: true
  962. });
  963. }
  964. },
  965. closeDesc(e, s) {
  966. this.state.activeKey = "1";
  967. this.state.userDetaile = false;
  968. this.state.signBillVisible = false;
  969. this.state.visible = e;
  970. if (s) {
  971. this.loadData(this.state.pageNo);
  972. }
  973. },
  974. // 获取原订单编号
  975. getPrimaryOrder(value) {
  976. this.setState({
  977. primaryOrder: value
  978. });
  979. },
  980. getAdditionalOrder(value) {
  981. this.setState({
  982. additionalOrder: value
  983. });
  984. },
  985. getUrl(url) {
  986. let theorgCodeUrl = [];
  987. if (url.length) {
  988. let picArr = [];
  989. url.map(function(item) {
  990. if (
  991. item.response &&
  992. item.response.data &&
  993. item.response.data.length
  994. ) {
  995. picArr.push(item.response.data);
  996. }
  997. });
  998. theorgCodeUrl = picArr.join(",");
  999. }
  1000. return theorgCodeUrl;
  1001. },
  1002. sureOut() {
  1003. if (!this.state.companyName) {
  1004. message.warning("公司名称不能为空");
  1005. return;
  1006. }
  1007. if (!this.state.unitPrice) {
  1008. message.warning("单价不能为空");
  1009. return;
  1010. }
  1011. if (!this.state.unitNumber) {
  1012. message.warning("数量不能为空");
  1013. return;
  1014. }
  1015. if (!this.state.amount) {
  1016. message.warning("总金额不能为空");
  1017. return;
  1018. }
  1019. if (!this.state.outsourceRemarks) {
  1020. message.warning("备注不能为空");
  1021. return;
  1022. }
  1023. if (this.state.pictureUrl.length === 0) {
  1024. message.warning("合同扫描件不能为空");
  1025. return;
  1026. }
  1027. $.ajax({
  1028. method: "POST",
  1029. dataType: "json",
  1030. crossDomain: false,
  1031. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1032. data: {
  1033. id: this.state.id,
  1034. orderNo: this.state.orderNo,
  1035. companyName: this.state.companyName,
  1036. amount: this.state.amount,
  1037. outsourceRemarks: this.state.outsourceRemarks,
  1038. unitNumber: this.state.unitNumber,
  1039. unitPrice: this.state.unitPrice,
  1040. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1041. ? this.getUrl(this.state.attachmentUrl)
  1042. : "",
  1043. orderStatus: 2,
  1044. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1045. ? this.getUrl(this.state.pictureUrl)
  1046. : ""
  1047. }
  1048. }).done(
  1049. function(data) {
  1050. this.setState({
  1051. loading: false
  1052. });
  1053. if (!data.error.length) {
  1054. message.success("发起成功!");
  1055. this.outReset();
  1056. this.visitCancel();
  1057. } else {
  1058. message.warning(data.error[0].message);
  1059. }
  1060. }.bind(this)
  1061. );
  1062. },
  1063. //关闭输入理由框
  1064. noCancel() {
  1065. this.setState({
  1066. noVisible: false,
  1067. aloading: false,
  1068. reason: ""
  1069. });
  1070. },
  1071. //重置
  1072. reset() {
  1073. this.setState({
  1074. signBillVisible: false
  1075. });
  1076. this.state.orderNo = "";
  1077. this.state.customerName = "";
  1078. this.state.releaseDate[0] = undefined;
  1079. this.state.releaseDate[1] = undefined;
  1080. this.state.approval = undefined;
  1081. this.loadData(1);
  1082. },
  1083. outReset() {
  1084. this.setState({
  1085. companyName: "",
  1086. amount: "",
  1087. unitPrice: "",
  1088. unitNumber: "",
  1089. outsourceRemarks: "",
  1090. attachmentUrl: [],
  1091. pictureUrl: []
  1092. });
  1093. },
  1094. getOrgCodeUrl(e) {
  1095. this.setState({ pictureUrl: e });
  1096. },
  1097. //关闭详情
  1098. visitCancel() {
  1099. this.setState(
  1100. {
  1101. activeKey: "1"
  1102. },
  1103. () => {
  1104. this.setState({
  1105. visible: false
  1106. });
  1107. }
  1108. );
  1109. this.loadData(this.state.pageNo);
  1110. },
  1111. visitOk() {
  1112. this.setState({
  1113. visible: false
  1114. });
  1115. },
  1116. changeList(arr) {
  1117. const newArr = [];
  1118. this.state.columns.forEach(item => {
  1119. arr.forEach(val => {
  1120. if (val === item.title) {
  1121. newArr.push(item);
  1122. }
  1123. });
  1124. });
  1125. this.setState({
  1126. changeList: newArr
  1127. });
  1128. },
  1129. printAll() {
  1130. this.setState({
  1131. dvisible: true
  1132. // loading: true
  1133. });
  1134. this.state.pagination.pageSize = 9999;
  1135. this.setState({
  1136. pagination: this.state.pagination
  1137. });
  1138. this.loadData();
  1139. },
  1140. exportAll() {
  1141. window.location.href =
  1142. globalConfig.context +
  1143. "/api/admin/orderChange/exportMyChange?" +
  1144. `orderNo=${
  1145. this.state.searchData.orderNoSearch
  1146. ? this.state.searchData.orderNoSearch
  1147. : ""
  1148. }&processState=${
  1149. this.props.processState ? this.props.processState : ""
  1150. }&userName=${
  1151. this.state.searchData.userNameSearch
  1152. ? this.state.searchData.userNameSearch
  1153. : ""
  1154. }&contractNo=${
  1155. this.state.searchData.contractNoSearch
  1156. ? this.state.searchData.contractNoSearch
  1157. : ""
  1158. }
  1159. &timeType=${
  1160. this.state.searchData.timeTypeSearch
  1161. ? this.state.searchData.timeTypeSearch
  1162. : ""
  1163. }
  1164. &startTime=${
  1165. this.state.searchData.releaseDate[0]
  1166. ? this.state.searchData.releaseDate[0]
  1167. : ""
  1168. }
  1169. &endTime=${
  1170. this.state.searchData.releaseDate[1]
  1171. ? this.state.searchData.releaseDate[1]
  1172. : ""
  1173. }
  1174. &salesmanName=${
  1175. this.state.searchData.salesmanNameSearch
  1176. ? this.state.searchData.salesmanNameSearch
  1177. : ""
  1178. }
  1179. &complete=${this.state.searchData.completeSearch || 1}
  1180. &depId=${
  1181. this.state.searchData.depIdSearch
  1182. ? this.state.searchData.depIdSearch
  1183. : ""
  1184. }
  1185. &type=${
  1186. this.state.searchData.changeSearch
  1187. ? this.state.searchData.changeSearch
  1188. : ""
  1189. }`;
  1190. },
  1191. render() {
  1192. const formItemLayout = {
  1193. labelCol: { span: 8 },
  1194. wrapperCol: { span: 14 }
  1195. };
  1196. const FormItem = Form.Item;
  1197. const { TabPane } = Tabs;
  1198. const departmentArr = this.state.departmentArr || [];
  1199. return (
  1200. <div className="user-content" style={{ position: "relative" }}>
  1201. <ShowModalDiv ShowModal={this.state.showModal} />
  1202. <div className="content-title" style={{ marginBottom: 10 }}>
  1203. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1204. 合同变更审核订单
  1205. </span>
  1206. </div>
  1207. <div className="user-search">
  1208. {/* <SearchInput search={this.search} /> */}
  1209. {/* <ChooseList
  1210. columns={this.state.columns}
  1211. changeFn={this.changeList}
  1212. changeList={this.state.changeList}
  1213. top={55}
  1214. /> */}
  1215. <Tabs
  1216. defaultActiveKey="2"
  1217. onChange={this.callbackTab}
  1218. className="test"
  1219. >
  1220. <TabPane tab="更改表格显示数据" key="1">
  1221. <div style={{ marginLeft: 10 }}>
  1222. <ChooseList
  1223. columns={this.state.columns}
  1224. changeFn={this.changeList}
  1225. changeList={this.state.changeList}
  1226. top={55}
  1227. margin={11}
  1228. />
  1229. </div>
  1230. </TabPane>
  1231. <TabPane tab="搜索" key="2">
  1232. <div style={{ marginLeft: 10 }}>
  1233. <SearchInput search={this.search} />
  1234. </div>
  1235. </TabPane>
  1236. <TabPane tab="打印" key="3">
  1237. <Button
  1238. type="primary"
  1239. style={{ margin: "11px 0px 10px 10px" }}
  1240. onClick={this.printAll}
  1241. disabled={!this.state.dataSource.length}
  1242. >
  1243. 打印所有列表信息
  1244. </Button>
  1245. </TabPane>
  1246. <TabPane tab="导出Excel" key="4">
  1247. <Button
  1248. type="primary"
  1249. style={{ margin: "11px 0px 10px 10px" }}
  1250. onClick={this.exportAll}
  1251. >
  1252. 导出当前列表
  1253. </Button>
  1254. </TabPane>
  1255. {/* <TabPane tab="批量操作" key="6">
  1256. <Button
  1257. type="primary"
  1258. disabled={this.state.selectedRowKeys.length == 0}
  1259. style={{ margin: "0px 0px 10px 10px" }}
  1260. onClick={e => {
  1261. e.stopPropagation(),
  1262. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1263. }}
  1264. >
  1265. 转交
  1266. </Button>
  1267. </TabPane> */}
  1268. </Tabs>
  1269. <div className="patent-table">
  1270. <Spin spinning={this.state.loading}>
  1271. <Table
  1272. bordered
  1273. columns={
  1274. this.state.changeList == undefined
  1275. ? this.state.columns
  1276. : this.state.changeList
  1277. }
  1278. scroll={{ x: "max-content", y: 0 }}
  1279. dataSource={this.state.dataSource}
  1280. pagination={this.state.pagination}
  1281. onRowClick={this.tableRowClick}
  1282. // scroll={{ y: 140 }}
  1283. />
  1284. </Spin>
  1285. </div>
  1286. <Modal
  1287. className="customeDetails"
  1288. footer=""
  1289. maskClosable={false}
  1290. width="900px"
  1291. visible={this.state.visible}
  1292. onOk={this.visitOk}
  1293. onCancel={this.visitCancel}
  1294. >
  1295. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1296. <TabPane tab="订单详情" key="1">
  1297. <Form
  1298. layout="horizontal"
  1299. onSubmit={this.handleSubmit}
  1300. id="demand-form"
  1301. style={{ paddingBottom: "40px" }}
  1302. >
  1303. <Spin spinning={this.state.loading}>
  1304. <OrderDetail
  1305. orderData={this.state.orderData}
  1306. getOrderLog={this.getOrderLog}
  1307. dataSourceX={this.state.dataSourceX}
  1308. contactList={this.state.contactList}
  1309. orderNo={this.state.orderNo}
  1310. totalCui={this.state.totalCui}
  1311. contactListNew={this.state.contactListNew}
  1312. pictureUrl={this.state.contractPictureUrl}
  1313. isCaiWu={true}
  1314. />
  1315. </Spin>
  1316. </Form>
  1317. </TabPane>
  1318. <TabPane tab="合同变更记录" key="2">
  1319. <ChangeDetail
  1320. data={this.state.contractData}
  1321. txt={this.state.processStateText}
  1322. pictureUrl={this.state.voucherUrl}
  1323. processState={this.props.processState}
  1324. loadData={this.callback}
  1325. reset={this.state.visible}
  1326. dataSource={this.state.dataProps}
  1327. proceedsData={this.state.proceedsData}
  1328. proceedsTotal={this.state.proTotal}
  1329. invoiceTotal={this.state.invTotal}
  1330. contactList={this.state.refundInvoice}
  1331. onCancel={this.visitCancel}
  1332. />
  1333. </TabPane>
  1334. {this.state.status === 4 ? (
  1335. <TabPane tab="原订单" key="3">
  1336. <Form
  1337. layout="horizontal"
  1338. onSubmit={this.handleSubmit}
  1339. id="demand-form"
  1340. style={{ paddingBottom: "40px" }}
  1341. >
  1342. <Spin spinning={this.state.loading}>
  1343. <OrderDetail
  1344. orderData={this.state.primaryOrderData}
  1345. getOrderLog={this.getOrderLog}
  1346. dataSourceX={this.state.dataSourceX}
  1347. contactList={this.state.contactList}
  1348. orderNo={this.state.primaryOrderNo}
  1349. totalCui={this.state.totalCui}
  1350. contactListNew={this.state.contactListNew}
  1351. isCaiWu={true}
  1352. />
  1353. </Spin>
  1354. </Form>
  1355. </TabPane>
  1356. ) : (
  1357. ""
  1358. )}
  1359. {this.state.status === 4 ? (
  1360. this.state.type === 4 || this.state.type === 5 ? (
  1361. <TabPane tab="附加订单" key="4">
  1362. <OrderDetail
  1363. orderData={this.state.additionalOrderData}
  1364. getOrderLog={this.getOrderLog}
  1365. dataSourceX={this.state.dataSourceX}
  1366. contactList={this.state.contactList}
  1367. totalCui={this.state.totalCui}
  1368. contactListNew={this.state.contactListNew}
  1369. orderNo={this.state.additionalOrder}
  1370. isCaiWu={true}
  1371. />
  1372. </TabPane>
  1373. ) : (
  1374. ""
  1375. )
  1376. ) : (
  1377. ""
  1378. )}
  1379. </Tabs>
  1380. </Modal>
  1381. <Modal
  1382. maskClosable={false}
  1383. visible={this.state.addnextVisible}
  1384. onOk={this.nextCancel}
  1385. onCancel={this.nextCancel}
  1386. confirmLoading={this.state.confirmLoading}
  1387. width="800px"
  1388. title={"项目任务详情"}
  1389. footer=""
  1390. className="admin-desc-content"
  1391. >
  1392. <Form layout="horizontal" id="demand-form">
  1393. <Spin spinning={this.state.loading}>
  1394. <div className="clearfix">
  1395. <FormItem
  1396. className="half-item"
  1397. {...formItemLayout}
  1398. label="项目名称"
  1399. >
  1400. <span>{this.state.commodityName}</span>
  1401. </FormItem>
  1402. <FormItem
  1403. className="half-item"
  1404. {...formItemLayout}
  1405. label="项目数量"
  1406. >
  1407. <span>{this.state.commodityQuantity}</span>
  1408. </FormItem>
  1409. <FormItem
  1410. className="half-item"
  1411. {...formItemLayout}
  1412. label="金额(万元)"
  1413. >
  1414. <span>{this.state.commodityPrice}</span>
  1415. </FormItem>
  1416. <FormItem
  1417. className="half-item"
  1418. {...formItemLayout}
  1419. label="主要项目"
  1420. >
  1421. <span>{getboutique(this.state.main)}</span>
  1422. </FormItem>
  1423. <div className="clearfix">
  1424. <FormItem
  1425. labelCol={{ span: 4 }}
  1426. wrapperCol={{ span: 16 }}
  1427. label="服务说明"
  1428. >
  1429. <span>{this.state.taskComment}</span>
  1430. </FormItem>
  1431. </div>
  1432. </div>
  1433. </Spin>
  1434. </Form>
  1435. </Modal>
  1436. <Modal
  1437. maskClosable={false}
  1438. visible={this.state.noVisible}
  1439. onOk={this.handleOk}
  1440. onCancel={this.noCancel}
  1441. width="400px"
  1442. title={"拒绝理由"}
  1443. footer=""
  1444. className="admin-desc-content"
  1445. confirmLoading={this.state.confirmLoading}
  1446. >
  1447. <Form layout="horizontal" id="demand-form">
  1448. <Spin spinning={this.state.loading}>
  1449. <div className="clearfix">
  1450. <FormItem
  1451. labelCol={{ span: 4 }}
  1452. wrapperCol={{ span: 16 }}
  1453. label="拒绝理由"
  1454. >
  1455. <Input
  1456. type="textarea"
  1457. placeholder="请输入拒绝理由"
  1458. rows={4}
  1459. value={this.state.reason}
  1460. onChange={e => {
  1461. this.setState({ reason: e.target.value });
  1462. }}
  1463. />
  1464. </FormItem>
  1465. </div>
  1466. <div className="clearfix">
  1467. <Button
  1468. className="cancel"
  1469. type="primary"
  1470. onClick={this.examOks}
  1471. style={{ marginLeft: "50px" }}
  1472. htmlType="submit"
  1473. loading={this.state.aloading}
  1474. >
  1475. 确定
  1476. </Button>
  1477. <Button
  1478. className="cancel"
  1479. type="ghost"
  1480. onClick={this.noCancel}
  1481. style={{ marginLeft: "50px" }}
  1482. >
  1483. 取消
  1484. </Button>
  1485. </div>
  1486. </Spin>
  1487. </Form>
  1488. </Modal>
  1489. {/* <Modal
  1490. visible={this.state.rizhivisible}
  1491. className="admin-desc-content"
  1492. width="800px"
  1493. maskClosable={false}
  1494. title="订单日志"
  1495. footer={null}
  1496. onCancel={this.closeOrderLog}
  1497. >
  1498. <div className="patent-table">
  1499. <Spin spinning={this.state.loading}>
  1500. <Table
  1501. bordered
  1502. columns={this.state.columnsrizhi}
  1503. dataSource={this.state.dataSourcerizhi}
  1504. pagination={false}
  1505. />
  1506. </Spin>
  1507. </div>
  1508. </Modal> */}
  1509. <OrderRiZi
  1510. dataSourcerizhi={this.state.dataSourcerizhi}
  1511. closeOrderLog={this.closeOrderLog}
  1512. visible={this.state.rizhivisible}
  1513. loading={this.state.loading}
  1514. />
  1515. <Modal
  1516. visible={this.state.dvisible}
  1517. footer=""
  1518. title="所有列表信息"
  1519. className="admin-desc-content"
  1520. width="1300px"
  1521. onCancel={() => {
  1522. this.setState({
  1523. dvisible: false
  1524. });
  1525. this.state.pagination.pageSize = 10;
  1526. this.setState({
  1527. pagination: this.state.pagination
  1528. });
  1529. this.loadData();
  1530. }}
  1531. >
  1532. <Spin spinning={this.state.loading}>
  1533. <div
  1534. className="patent-table"
  1535. style={{
  1536. // width: 900,
  1537. // position: "relative",
  1538. // left: "50%",
  1539. // transform: "translate(-50%)",
  1540. padding: "25px 30px 30px 30px"
  1541. }}
  1542. ref={e => {
  1543. this.refs.all = e;
  1544. }}
  1545. >
  1546. <Table
  1547. columns={this.state.columns}
  1548. dataSource={this.state.dataSource}
  1549. pagination={false}
  1550. bordered
  1551. size="small"
  1552. />
  1553. </div>
  1554. </Spin>
  1555. <ReactToPrint
  1556. trigger={() => (
  1557. <Button
  1558. type="primary"
  1559. style={{
  1560. float: "right",
  1561. marginTop: 10,
  1562. position: "absolute",
  1563. top: 0,
  1564. right: 30
  1565. }}
  1566. >
  1567. 打印
  1568. </Button>
  1569. )}
  1570. content={() => this.refs.all}
  1571. />
  1572. </Modal>
  1573. </div>
  1574. </div>
  1575. );
  1576. }
  1577. })
  1578. );
  1579. export default contractChange;