contractCwjl.js 51 KB

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