contractCwjl.js 50 KB

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