contractCwzy.js 49 KB

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