contractCwzy.js 48 KB

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