contractCwzy.js 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607
  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. remarks: thisdata.remarks
  680. });
  681. }
  682. }
  683. this.setState({
  684. dataSourcerizhi: theArr
  685. });
  686. }.bind(this)
  687. });
  688. },
  689. getOrderLog(orderNo) {
  690. this.setState({
  691. rizhivisible: true
  692. });
  693. this.rizhi(orderNo);
  694. },
  695. closeOrderLog() {
  696. this.setState({
  697. rizhivisible: false
  698. });
  699. },
  700. //节点列表
  701. jiedian(orderNos) {
  702. $.ajax({
  703. method: "get",
  704. dataType: "json",
  705. crossDomain: false,
  706. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  707. data: {
  708. orderNo: orderNos
  709. },
  710. success: function(data) {
  711. let theArr = [];
  712. let thisData = [];
  713. if (data.error.length || data.data.list == "") {
  714. if (data.error && data.error.length) {
  715. message.warning(data.error[0].message);
  716. }
  717. } else {
  718. for (let i = 0; i < data.data.length; i++) {
  719. thisData = data.data[i];
  720. theArr.push({
  721. key: i,
  722. dunSubject: thisData.dunSubject
  723. ? thisData.dunSubject.toString()
  724. : "", //催款科目
  725. id: thisData.id, //节点Id
  726. money: thisData.money, //催款金额
  727. dunStatus: thisData.dunStatus //催款状态
  728. });
  729. }
  730. this.setState({
  731. contactList: theArr
  732. });
  733. }
  734. }.bind(this)
  735. });
  736. },
  737. jiedianNew(orderNos) {
  738. $.ajax({
  739. method: "get",
  740. dataType: "json",
  741. crossDomain: false,
  742. url:
  743. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  744. data: {
  745. orderNo: orderNos
  746. },
  747. success: function(data) {
  748. if (data.error && data.error.length) {
  749. message.warning(data.error[0].message);
  750. } else {
  751. let theArr = [];
  752. let thisData = [];
  753. let arr = data.data || [];
  754. let totalCui = 0;
  755. for (let i = 0; i < arr.length; i++) {
  756. thisData = arr[i];
  757. totalCui += +thisData.money;
  758. theArr.push({
  759. key: i,
  760. dunSubject: thisData.dunSubject
  761. ? thisData.dunSubject.toString()
  762. : "", //催款科目
  763. id: thisData.id, //节点Id
  764. money: thisData.money, //催款金额
  765. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  766. commodityName: thisData.commodityName,
  767. projectType: thisData.projectType,
  768. dunTypeName: thisData.dunTypeName,
  769. status: thisData.status,
  770. waitDay: thisData.waitDay,
  771. effectiveCount: thisData.effectiveCount,
  772. startDate: thisData.startDate,
  773. dunType: thisData.dunType,
  774. appropriationRatio: thisData.appropriationRatio
  775. });
  776. }
  777. if (!totalCui) {
  778. totalCui = 0;
  779. }
  780. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  781. this.setState({
  782. contactListNew: theArr,
  783. totalCui
  784. });
  785. }
  786. }.bind(this)
  787. }).always(
  788. function() {
  789. this.setState({
  790. loading: false
  791. });
  792. }.bind(this)
  793. );
  794. },
  795. //审核通过
  796. examOk() {
  797. $.ajax({
  798. method: "post",
  799. dataType: "json",
  800. crossDomain: false,
  801. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  802. data: {
  803. orderNo: this.state.orderNo,
  804. orderStatus: 2
  805. },
  806. success: function(data) {
  807. if (data.error.length || data.data.list == "") {
  808. if (data.error && data.error.length) {
  809. message.warning(data.error[0].message);
  810. }
  811. } else {
  812. message.success("该订单已通过审核~");
  813. this.setState({
  814. visible: false
  815. });
  816. this.reset();
  817. }
  818. }.bind(this)
  819. }).always(
  820. function() {
  821. this.setState({
  822. loading: false
  823. });
  824. }.bind(this)
  825. );
  826. },
  827. //通过发给外包
  828. outsourcing() {
  829. $.ajax({
  830. method: "post",
  831. dataType: "json",
  832. crossDomain: false,
  833. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  834. data: {
  835. orderNo: this.state.orderNo,
  836. orderStatus: 2,
  837. outsource: 1
  838. },
  839. success: function(data) {
  840. if (data.error.length || data.data.list == "") {
  841. if (data.error && data.error.length) {
  842. message.warning(data.error[0].message);
  843. }
  844. } else {
  845. message.success("该订单已通过审核~");
  846. this.setState({
  847. visible: false
  848. });
  849. this.reset();
  850. }
  851. }.bind(this)
  852. }).always(
  853. function() {
  854. this.setState({
  855. loading: false
  856. });
  857. }.bind(this)
  858. );
  859. },
  860. //审核不通过
  861. examOks() {
  862. this.setState({
  863. aloading: true
  864. });
  865. $.ajax({
  866. method: "post",
  867. dataType: "json",
  868. crossDomain: false,
  869. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  870. data: {
  871. orderNo: this.state.orderNo,
  872. orderStatus: 3,
  873. reason: this.state.reason
  874. },
  875. success: function(data) {
  876. if (data.error.length || data.data.list == "") {
  877. if (data.error && data.error.length) {
  878. message.warning(data.error[0].message);
  879. this.setState({
  880. aloading: true
  881. });
  882. }
  883. } else {
  884. message.success("该订单已被拒绝~");
  885. this.setState({
  886. visible: false,
  887. aloading: false,
  888. noVisible: false,
  889. reason: ""
  890. });
  891. this.reset();
  892. }
  893. }.bind(this)
  894. }).always(
  895. function() {
  896. this.setState({
  897. loading: false
  898. });
  899. }.bind(this)
  900. );
  901. },
  902. //点击拒绝
  903. examNo() {
  904. this.setState({
  905. noVisible: true
  906. });
  907. },
  908. loadDataChange() {
  909. $.ajax({
  910. method: "get",
  911. dataType: "json",
  912. async: false,
  913. crossDomain: false,
  914. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  915. data: {
  916. changeId: this.state.id
  917. },
  918. success: function(data) {
  919. if (data.error.length || data.data.list == "") {
  920. if (data.error && data.error.length) {
  921. message.warning(data.error[0].message);
  922. }
  923. } else {
  924. // console.log("拿到历史", data);
  925. this.setState({
  926. dataProps: data.data
  927. });
  928. }
  929. }.bind(this)
  930. });
  931. },
  932. callback(key) {
  933. this.setState({
  934. activeKey: key
  935. });
  936. if (key === "1") {
  937. this.xiangmu(this.state.orderNo);
  938. this.jiedian(this.state.orderNo);
  939. this.jiedianNew(this.state.orderNo);
  940. }
  941. if (key === "2") {
  942. this.ChangeDetail(this.state.id);
  943. this.loadDataChange();
  944. this.getProceeds(this.state.id);
  945. }
  946. if (key === "3") {
  947. this.primaryOrder(this.state.primaryOrderNo);
  948. this.xiangmu(this.state.primaryOrderNo);
  949. this.jiedian(this.state.primaryOrderNo);
  950. this.jiedianNew(this.state.primaryOrderNo);
  951. }
  952. if (key === "4") {
  953. this.additionalOrder(this.state.additionalOrder);
  954. this.xiangmu(this.state.additionalOrder);
  955. this.jiedian(this.state.additionalOrder);
  956. this.jiedianNew(this.state.additionalOrder);
  957. this.setState({
  958. buttonStatusA: false
  959. });
  960. } else {
  961. this.setState({
  962. buttonStatusA: true
  963. });
  964. }
  965. },
  966. closeDesc(e, s) {
  967. this.state.activeKey = "1";
  968. this.state.userDetaile = false;
  969. this.state.signBillVisible = false;
  970. this.state.visible = e;
  971. if (s) {
  972. this.loadData(this.state.pageNo);
  973. }
  974. },
  975. // 获取原订单编号
  976. getPrimaryOrder(value) {
  977. this.setState({
  978. primaryOrder: value
  979. });
  980. },
  981. getAdditionalOrder(value) {
  982. this.setState({
  983. additionalOrder: value
  984. });
  985. },
  986. getUrl(url) {
  987. let theorgCodeUrl = [];
  988. if (url.length) {
  989. let picArr = [];
  990. url.map(function(item) {
  991. if (
  992. item.response &&
  993. item.response.data &&
  994. item.response.data.length
  995. ) {
  996. picArr.push(item.response.data);
  997. }
  998. });
  999. theorgCodeUrl = picArr.join(",");
  1000. }
  1001. return theorgCodeUrl;
  1002. },
  1003. sureOut() {
  1004. if (!this.state.companyName) {
  1005. message.warning("公司名称不能为空");
  1006. return;
  1007. }
  1008. if (!this.state.unitPrice) {
  1009. message.warning("单价不能为空");
  1010. return;
  1011. }
  1012. if (!this.state.unitNumber) {
  1013. message.warning("数量不能为空");
  1014. return;
  1015. }
  1016. if (!this.state.amount) {
  1017. message.warning("总金额不能为空");
  1018. return;
  1019. }
  1020. if (!this.state.outsourceRemarks) {
  1021. message.warning("备注不能为空");
  1022. return;
  1023. }
  1024. if (this.state.pictureUrl.length === 0) {
  1025. message.warning("合同扫描件不能为空");
  1026. return;
  1027. }
  1028. $.ajax({
  1029. method: "POST",
  1030. dataType: "json",
  1031. crossDomain: false,
  1032. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1033. data: {
  1034. id: this.state.id,
  1035. orderNo: this.state.orderNo,
  1036. companyName: this.state.companyName,
  1037. amount: this.state.amount,
  1038. outsourceRemarks: this.state.outsourceRemarks,
  1039. unitNumber: this.state.unitNumber,
  1040. unitPrice: this.state.unitPrice,
  1041. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1042. ? this.getUrl(this.state.attachmentUrl)
  1043. : "",
  1044. orderStatus: 2,
  1045. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1046. ? this.getUrl(this.state.pictureUrl)
  1047. : ""
  1048. }
  1049. }).done(
  1050. function(data) {
  1051. this.setState({
  1052. loading: false
  1053. });
  1054. if (!data.error.length) {
  1055. message.success("发起成功!");
  1056. this.outReset();
  1057. this.visitCancel();
  1058. } else {
  1059. message.warning(data.error[0].message);
  1060. }
  1061. }.bind(this)
  1062. );
  1063. },
  1064. //关闭输入理由框
  1065. noCancel() {
  1066. this.setState({
  1067. noVisible: false,
  1068. aloading: false,
  1069. reason: ""
  1070. });
  1071. },
  1072. //重置
  1073. reset() {
  1074. this.setState({
  1075. signBillVisible: false
  1076. });
  1077. this.state.orderNo = "";
  1078. this.state.customerName = "";
  1079. this.state.releaseDate[0] = undefined;
  1080. this.state.releaseDate[1] = undefined;
  1081. this.state.approval = undefined;
  1082. this.loadData(1);
  1083. },
  1084. outReset() {
  1085. this.setState({
  1086. companyName: "",
  1087. amount: "",
  1088. unitPrice: "",
  1089. unitNumber: "",
  1090. outsourceRemarks: "",
  1091. attachmentUrl: [],
  1092. pictureUrl: []
  1093. });
  1094. },
  1095. getOrgCodeUrl(e) {
  1096. this.setState({ pictureUrl: e });
  1097. },
  1098. //关闭详情
  1099. visitCancel() {
  1100. this.setState(
  1101. {
  1102. activeKey: "1"
  1103. },
  1104. () => {
  1105. this.setState({
  1106. visible: false
  1107. });
  1108. }
  1109. );
  1110. this.loadData(this.state.pageNo);
  1111. },
  1112. visitOk() {
  1113. this.setState({
  1114. visible: false
  1115. });
  1116. },
  1117. changeList(arr) {
  1118. const newArr = [];
  1119. this.state.columns.forEach(item => {
  1120. arr.forEach(val => {
  1121. if (val === item.title) {
  1122. newArr.push(item);
  1123. }
  1124. });
  1125. });
  1126. this.setState({
  1127. changeList: newArr
  1128. });
  1129. },
  1130. printAll() {
  1131. this.setState({
  1132. dvisible: true
  1133. // loading: true
  1134. });
  1135. this.state.pagination.pageSize = 9999;
  1136. this.setState({
  1137. pagination: this.state.pagination
  1138. });
  1139. this.loadData();
  1140. },
  1141. exportAll() {
  1142. window.location.href =
  1143. globalConfig.context +
  1144. "/api/admin/orderChange/exportMyChange?" +
  1145. `orderNo=${
  1146. this.state.searchData.orderNoSearch
  1147. ? this.state.searchData.orderNoSearch
  1148. : ""
  1149. }&processState=${
  1150. this.props.processState ? this.props.processState : ""
  1151. }&userName=${
  1152. this.state.searchData.userNameSearch
  1153. ? this.state.searchData.userNameSearch
  1154. : ""
  1155. }&contractNo=${
  1156. this.state.searchData.contractNoSearch
  1157. ? this.state.searchData.contractNoSearch
  1158. : ""
  1159. }
  1160. &timeType=${
  1161. this.state.searchData.timeTypeSearch
  1162. ? this.state.searchData.timeTypeSearch
  1163. : ""
  1164. }
  1165. &startTime=${
  1166. this.state.searchData.releaseDate[0]
  1167. ? this.state.searchData.releaseDate[0]
  1168. : ""
  1169. }
  1170. &endTime=${
  1171. this.state.searchData.releaseDate[1]
  1172. ? this.state.searchData.releaseDate[1]
  1173. : ""
  1174. }
  1175. &salesmanName=${
  1176. this.state.searchData.salesmanNameSearch
  1177. ? this.state.searchData.salesmanNameSearch
  1178. : ""
  1179. }
  1180. &complete=${this.state.searchData.completeSearch || 1}
  1181. &depId=${
  1182. this.state.searchData.depIdSearch
  1183. ? this.state.searchData.depIdSearch
  1184. : ""
  1185. }
  1186. &type=${
  1187. this.state.searchData.changeSearch
  1188. ? this.state.searchData.changeSearch
  1189. : ""
  1190. }`;
  1191. },
  1192. render() {
  1193. const formItemLayout = {
  1194. labelCol: { span: 8 },
  1195. wrapperCol: { span: 14 }
  1196. };
  1197. const FormItem = Form.Item;
  1198. const { TabPane } = Tabs;
  1199. const departmentArr = this.state.departmentArr || [];
  1200. return (
  1201. <div className="user-content" style={{ position: "relative" }}>
  1202. <ShowModalDiv ShowModal={this.state.showModal} />
  1203. <div className="content-title" style={{ marginBottom: 10 }}>
  1204. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1205. 合同变更审核订单
  1206. </span>
  1207. </div>
  1208. <div className="user-search">
  1209. {/* <SearchInput search={this.search} /> */}
  1210. {/* <ChooseList
  1211. columns={this.state.columns}
  1212. changeFn={this.changeList}
  1213. changeList={this.state.changeList}
  1214. top={55}
  1215. /> */}
  1216. <Tabs
  1217. defaultActiveKey="2"
  1218. onChange={this.callbackTab}
  1219. className="test"
  1220. >
  1221. <TabPane tab="更改表格显示数据" key="1">
  1222. <div style={{ marginLeft: 10 }}>
  1223. <ChooseList
  1224. columns={this.state.columns}
  1225. changeFn={this.changeList}
  1226. changeList={this.state.changeList}
  1227. top={55}
  1228. margin={11}
  1229. />
  1230. </div>
  1231. </TabPane>
  1232. <TabPane tab="搜索" key="2">
  1233. <div style={{ marginLeft: 10 }}>
  1234. <SearchInput search={this.search} />
  1235. </div>
  1236. </TabPane>
  1237. <TabPane tab="打印" key="3">
  1238. <Button
  1239. type="primary"
  1240. style={{ margin: "11px 0px 10px 10px" }}
  1241. onClick={this.printAll}
  1242. disabled={!this.state.dataSource.length}
  1243. >
  1244. 打印所有列表信息
  1245. </Button>
  1246. </TabPane>
  1247. <TabPane tab="导出Excel" key="4">
  1248. <Button
  1249. type="primary"
  1250. style={{ margin: "11px 0px 10px 10px" }}
  1251. onClick={this.exportAll}
  1252. >
  1253. 导出当前列表
  1254. </Button>
  1255. </TabPane>
  1256. {/* <TabPane tab="批量操作" key="6">
  1257. <Button
  1258. type="primary"
  1259. disabled={this.state.selectedRowKeys.length == 0}
  1260. style={{ margin: "0px 0px 10px 10px" }}
  1261. onClick={e => {
  1262. e.stopPropagation(),
  1263. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1264. }}
  1265. >
  1266. 转交
  1267. </Button>
  1268. </TabPane> */}
  1269. </Tabs>
  1270. <div className="patent-table">
  1271. <Spin spinning={this.state.loading}>
  1272. <Table
  1273. bordered
  1274. columns={
  1275. this.state.changeList == undefined
  1276. ? this.state.columns
  1277. : this.state.changeList
  1278. }
  1279. scroll={{ x: "max-content", y: 0 }}
  1280. dataSource={this.state.dataSource}
  1281. pagination={this.state.pagination}
  1282. onRowClick={this.tableRowClick}
  1283. // scroll={{ y: 140 }}
  1284. />
  1285. </Spin>
  1286. </div>
  1287. <Modal
  1288. className="customeDetails"
  1289. footer=""
  1290. maskClosable={false}
  1291. width="900px"
  1292. visible={this.state.visible}
  1293. onOk={this.visitOk}
  1294. onCancel={this.visitCancel}
  1295. >
  1296. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1297. <TabPane tab="订单详情" key="1">
  1298. <Form
  1299. layout="horizontal"
  1300. onSubmit={this.handleSubmit}
  1301. id="demand-form"
  1302. style={{ paddingBottom: "40px" }}
  1303. >
  1304. <Spin spinning={this.state.loading}>
  1305. <OrderDetail
  1306. orderData={this.state.orderData}
  1307. getOrderLog={this.getOrderLog}
  1308. dataSourceX={this.state.dataSourceX}
  1309. contactList={this.state.contactList}
  1310. orderNo={this.state.orderNo}
  1311. totalCui={this.state.totalCui}
  1312. contactListNew={this.state.contactListNew}
  1313. pictureUrl={this.state.contractPictureUrl}
  1314. isCaiWu={true}
  1315. />
  1316. </Spin>
  1317. </Form>
  1318. </TabPane>
  1319. <TabPane tab="合同变更记录" key="2">
  1320. <ChangeDetail
  1321. data={this.state.contractData}
  1322. txt={this.state.processStateText}
  1323. pictureUrl={this.state.voucherUrl}
  1324. processState={this.props.processState}
  1325. loadData={this.callback}
  1326. reset={this.state.visible}
  1327. dataSource={this.state.dataProps}
  1328. proceedsData={this.state.proceedsData}
  1329. proceedsTotal={this.state.proTotal}
  1330. invoiceTotal={this.state.invTotal}
  1331. contactList={this.state.refundInvoice}
  1332. onCancel={this.visitCancel}
  1333. />
  1334. </TabPane>
  1335. {this.state.status === 4 ? (
  1336. <TabPane tab="原订单" key="3">
  1337. <Form
  1338. layout="horizontal"
  1339. onSubmit={this.handleSubmit}
  1340. id="demand-form"
  1341. style={{ paddingBottom: "40px" }}
  1342. >
  1343. <Spin spinning={this.state.loading}>
  1344. <OrderDetail
  1345. orderData={this.state.primaryOrderData}
  1346. getOrderLog={this.getOrderLog}
  1347. dataSourceX={this.state.dataSourceX}
  1348. contactList={this.state.contactList}
  1349. orderNo={this.state.primaryOrderNo}
  1350. totalCui={this.state.totalCui}
  1351. contactListNew={this.state.contactListNew}
  1352. isCaiWu={true}
  1353. />
  1354. </Spin>
  1355. </Form>
  1356. </TabPane>
  1357. ) : (
  1358. ""
  1359. )}
  1360. {this.state.status === 4 ? (
  1361. this.state.type === 4 || this.state.type === 5 ? (
  1362. <TabPane tab="附加订单" key="4">
  1363. <OrderDetail
  1364. orderData={this.state.additionalOrderData}
  1365. getOrderLog={this.getOrderLog}
  1366. dataSourceX={this.state.dataSourceX}
  1367. contactList={this.state.contactList}
  1368. totalCui={this.state.totalCui}
  1369. contactListNew={this.state.contactListNew}
  1370. orderNo={this.state.additionalOrder}
  1371. isCaiWu={true}
  1372. />
  1373. </TabPane>
  1374. ) : (
  1375. ""
  1376. )
  1377. ) : (
  1378. ""
  1379. )}
  1380. </Tabs>
  1381. </Modal>
  1382. <Modal
  1383. maskClosable={false}
  1384. visible={this.state.addnextVisible}
  1385. onOk={this.nextCancel}
  1386. onCancel={this.nextCancel}
  1387. confirmLoading={this.state.confirmLoading}
  1388. width="800px"
  1389. title={"项目任务详情"}
  1390. footer=""
  1391. className="admin-desc-content"
  1392. >
  1393. <Form layout="horizontal" id="demand-form">
  1394. <Spin spinning={this.state.loading}>
  1395. <div className="clearfix">
  1396. <FormItem
  1397. className="half-item"
  1398. {...formItemLayout}
  1399. label="项目名称"
  1400. >
  1401. <span>{this.state.commodityName}</span>
  1402. </FormItem>
  1403. <FormItem
  1404. className="half-item"
  1405. {...formItemLayout}
  1406. label="项目数量"
  1407. >
  1408. <span>{this.state.commodityQuantity}</span>
  1409. </FormItem>
  1410. <FormItem
  1411. className="half-item"
  1412. {...formItemLayout}
  1413. label="金额(万元)"
  1414. >
  1415. <span>{this.state.commodityPrice}</span>
  1416. </FormItem>
  1417. <FormItem
  1418. className="half-item"
  1419. {...formItemLayout}
  1420. label="主要项目"
  1421. >
  1422. <span>{getboutique(this.state.main)}</span>
  1423. </FormItem>
  1424. <div className="clearfix">
  1425. <FormItem
  1426. labelCol={{ span: 4 }}
  1427. wrapperCol={{ span: 16 }}
  1428. label="服务说明"
  1429. >
  1430. <span>{this.state.taskComment}</span>
  1431. </FormItem>
  1432. </div>
  1433. </div>
  1434. </Spin>
  1435. </Form>
  1436. </Modal>
  1437. <Modal
  1438. maskClosable={false}
  1439. visible={this.state.noVisible}
  1440. onOk={this.handleOk}
  1441. onCancel={this.noCancel}
  1442. width="400px"
  1443. title={"拒绝理由"}
  1444. footer=""
  1445. className="admin-desc-content"
  1446. confirmLoading={this.state.confirmLoading}
  1447. >
  1448. <Form layout="horizontal" id="demand-form">
  1449. <Spin spinning={this.state.loading}>
  1450. <div className="clearfix">
  1451. <FormItem
  1452. labelCol={{ span: 4 }}
  1453. wrapperCol={{ span: 16 }}
  1454. label="拒绝理由"
  1455. >
  1456. <Input
  1457. type="textarea"
  1458. placeholder="请输入拒绝理由"
  1459. rows={4}
  1460. value={this.state.reason}
  1461. onChange={e => {
  1462. this.setState({ reason: e.target.value });
  1463. }}
  1464. />
  1465. </FormItem>
  1466. </div>
  1467. <div className="clearfix">
  1468. <Button
  1469. className="cancel"
  1470. type="primary"
  1471. onClick={this.examOks}
  1472. style={{ marginLeft: "50px" }}
  1473. htmlType="submit"
  1474. loading={this.state.aloading}
  1475. >
  1476. 确定
  1477. </Button>
  1478. <Button
  1479. className="cancel"
  1480. type="ghost"
  1481. onClick={this.noCancel}
  1482. style={{ marginLeft: "50px" }}
  1483. >
  1484. 取消
  1485. </Button>
  1486. </div>
  1487. </Spin>
  1488. </Form>
  1489. </Modal>
  1490. {/* <Modal
  1491. visible={this.state.rizhivisible}
  1492. className="admin-desc-content"
  1493. width="800px"
  1494. maskClosable={false}
  1495. title="订单日志"
  1496. footer={null}
  1497. onCancel={this.closeOrderLog}
  1498. >
  1499. <div className="patent-table">
  1500. <Spin spinning={this.state.loading}>
  1501. <Table
  1502. bordered
  1503. columns={this.state.columnsrizhi}
  1504. dataSource={this.state.dataSourcerizhi}
  1505. pagination={false}
  1506. />
  1507. </Spin>
  1508. </div>
  1509. </Modal> */}
  1510. <OrderRiZi
  1511. dataSourcerizhi={this.state.dataSourcerizhi}
  1512. closeOrderLog={this.closeOrderLog}
  1513. visible={this.state.rizhivisible}
  1514. loading={this.state.loading}
  1515. />
  1516. <Modal
  1517. visible={this.state.dvisible}
  1518. footer=""
  1519. title="所有列表信息"
  1520. className="admin-desc-content"
  1521. width="1300px"
  1522. onCancel={() => {
  1523. this.setState({
  1524. dvisible: false
  1525. });
  1526. this.state.pagination.pageSize = 10;
  1527. this.setState({
  1528. pagination: this.state.pagination
  1529. });
  1530. this.loadData();
  1531. }}
  1532. >
  1533. <Spin spinning={this.state.loading}>
  1534. <div
  1535. className="patent-table"
  1536. style={{
  1537. // width: 900,
  1538. // position: "relative",
  1539. // left: "50%",
  1540. // transform: "translate(-50%)",
  1541. padding: "25px 30px 30px 30px"
  1542. }}
  1543. ref={e => {
  1544. this.refs.all = e;
  1545. }}
  1546. >
  1547. <Table
  1548. columns={this.state.columns}
  1549. dataSource={this.state.dataSource}
  1550. pagination={false}
  1551. bordered
  1552. size="small"
  1553. />
  1554. </div>
  1555. </Spin>
  1556. <ReactToPrint
  1557. trigger={() => (
  1558. <Button
  1559. type="primary"
  1560. style={{
  1561. float: "right",
  1562. marginTop: 10,
  1563. position: "absolute",
  1564. top: 0,
  1565. right: 30
  1566. }}
  1567. >
  1568. 打印
  1569. </Button>
  1570. )}
  1571. content={() => this.refs.all}
  1572. />
  1573. </Modal>
  1574. </div>
  1575. </div>
  1576. );
  1577. }
  1578. })
  1579. );
  1580. export default contractChange;