contractCwzj.js 46 KB

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