contractCwzy.js 48 KB

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