contractCwzy.js 49 KB

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