contractCwjl.js 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699
  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 NewEditProject from "../../../common/projectOperation/newEditProject";
  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.examineName,
  83. thisdata.processState,
  84. thisdata.status
  85. )
  86. });
  87. }
  88. this.state.pagination.total = data.data.totalCount;
  89. this.state.pagination.current = data.data.pageNo;
  90. }
  91. if (data.data && data.data.list && !data.data.list.length) {
  92. this.state.pagination.total = 0;
  93. }
  94. this.setState({
  95. dataSource: theArr,
  96. pageNo: pageNo,
  97. pagination: this.state.pagination
  98. });
  99. }.bind(this)
  100. }).always(
  101. function () {
  102. this.setState({
  103. loading: false
  104. });
  105. }.bind(this)
  106. );
  107. },
  108. getInitialState() {
  109. return {
  110. dvisible: false,
  111. page: 1,
  112. searchData: {
  113. releaseDate: []
  114. },
  115. primaryOrderData: {}, //原订单数据
  116. orderData: {}, //现订单数据
  117. pictureUrl: [],
  118. voucherUrl: [],
  119. attachment: [],
  120. declarationBatch: 1,
  121. dataInfor: {},
  122. attachmentUrl: [],
  123. //收款数据
  124. proceedsData: {},
  125. proTotal: 0,
  126. invTotal: 0,
  127. contractData: {},
  128. // 回收退票数据
  129. refundInvoice: [],
  130. RefundInvoice: [],
  131. additionalOrderData: {},
  132. paginations: false,
  133. activeKey: "a",
  134. confirmLoading: false,
  135. aloading: false,
  136. pagination: {
  137. defaultCurrent: 1,
  138. defaultPageSize: 10,
  139. showQuickJumper: true,
  140. pageSize: 10,
  141. onChange: function (page) {
  142. this.loadData(page);
  143. }.bind(this),
  144. showTotal: function (total) {
  145. return "共" + total + "条数据";
  146. }
  147. },
  148. columns: [
  149. {
  150. title: "合同编号",
  151. dataIndex: "contractNo",
  152. key: "contractNo"
  153. },
  154. {
  155. title: "订单编号",
  156. dataIndex: "orderNo",
  157. key: "orderNo"
  158. },
  159. {
  160. title: "客户名称",
  161. dataIndex: "nickname",
  162. key: "nickname",
  163. width: 150,
  164. render: (text) => {
  165. return (
  166. <Tooltip title={text}>
  167. <div style={{
  168. maxWidth: '150px',
  169. overflow: 'hidden',
  170. textOverflow: "ellipsis",
  171. whiteSpace: 'nowrap',
  172. }}>{text}</div>
  173. </Tooltip>
  174. )
  175. },
  176. },
  177. {
  178. title: "订单部门",
  179. dataIndex: "depName",
  180. key: "depName"
  181. },
  182. {
  183. title: "订单类型",
  184. dataIndex: "orderType",
  185. key: "orderType",
  186. render: text => {
  187. return text ? "科技项目" : "认证项目";
  188. }
  189. },
  190. {
  191. title: "下单时间",
  192. dataIndex: "establishTimes",
  193. key: "establishTimes"
  194. },
  195. {
  196. title: "订单状态",
  197. dataIndex: "orderStatus",
  198. key: "orderStatus",
  199. render: text => {
  200. return getNewOrderStatus(text);
  201. }
  202. },
  203. {
  204. title: "合同额(万元)",
  205. dataIndex: "totalAmount",
  206. key: "totalAmount"
  207. },
  208. {
  209. title: "已付额(万元)",
  210. dataIndex: "settlementAmount",
  211. key: "settlementAmount"
  212. },
  213. {
  214. title: "欠款(万元)",
  215. dataIndex: "arrears",
  216. key: "arrears"
  217. },
  218. {
  219. title: "订单负责人",
  220. dataIndex: "salesmanName",
  221. key: "salesmanName"
  222. },
  223. {
  224. title: "变更类型",
  225. dataIndex: "type",
  226. key: "type",
  227. render: text => {
  228. return getType(text);
  229. }
  230. },
  231. {
  232. title: "审核状态",
  233. dataIndex: "processStateText",
  234. key: "processStateText"
  235. },
  236. {
  237. title: "提交时间",
  238. dataIndex: "createTimes",
  239. key: "createTimes"
  240. }
  241. ],
  242. dataSource: [],
  243. // 传递给子组件的
  244. dataProps: [],
  245. columnsX: [
  246. {
  247. title: "业务项目名称",
  248. dataIndex: "commodityName",
  249. key: "commodityName",
  250. render: (text, record) => {
  251. return (
  252. <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
  253. )
  254. }
  255. },
  256. {
  257. title: "项目类别",
  258. dataIndex: "cname",
  259. key: "cname"
  260. },
  261. {
  262. title: "项目数量",
  263. dataIndex: "commodityQuantity",
  264. key: "commodityQuantity"
  265. },
  266. {
  267. title: "金额(万元)",
  268. dataIndex: "commodityPrice",
  269. key: "commodityPrice"
  270. },
  271. {
  272. title: "负责人",
  273. dataIndex: "contacts",
  274. key: "contacts"
  275. },
  276. {
  277. title: "负责人电话",
  278. dataIndex: "contactsMobile",
  279. key: "contactsMobile"
  280. },
  281. {
  282. title: "项目状态",
  283. dataIndex: "projectStatus",
  284. key: "projectStatus",
  285. render: text => {
  286. return getProjectName(text);
  287. }
  288. },
  289. {
  290. title: "主要项目",
  291. dataIndex: "main",
  292. key: "main",
  293. render: text => {
  294. return text ? "是" : "否";
  295. }
  296. },
  297. {
  298. title: "总年限",
  299. dataIndex: "yearSum",
  300. key: "yearSum",
  301. render: (text, record) => {
  302. return (
  303. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  304. );
  305. }
  306. },
  307. {
  308. title: "年限",
  309. dataIndex: "serviceLife",
  310. key: "serviceLife",
  311. render: (text, record) => {
  312. return (
  313. <div>{!!text && JSON.parse(text).toString()}</div>
  314. );
  315. }
  316. },
  317. {
  318. title: "本次派单",
  319. dataIndex: "serviceYear",
  320. key: "serviceYear",
  321. render: (text, record) => {
  322. return (
  323. <div>{!text ? "" : text}</div>
  324. );
  325. }
  326. },
  327. {
  328. title: "项目说明",
  329. dataIndex: "taskComment",
  330. key: "taskComment",
  331. render: text => {
  332. return (
  333. <Tooltip title={text}>
  334. <div
  335. style={{
  336. width: 100,
  337. overflow: "hidden",
  338. whiteSpace: "nowrap",
  339. textOverflow: "ellipsis",
  340. }}
  341. >{text}</div>
  342. </Tooltip>
  343. )
  344. }
  345. }
  346. ],
  347. // 子组件改变的表格title数组
  348. changeList: undefined,
  349. columnsrizhi: [
  350. {
  351. title: "流程",
  352. dataIndex: "processName",
  353. key: "processName"
  354. },
  355. {
  356. title: "操作人",
  357. dataIndex: "adminName",
  358. key: "adminName"
  359. },
  360. {
  361. title: "时间",
  362. dataIndex: "createDate",
  363. key: "createDate"
  364. }
  365. ],
  366. dataSourceX: [],
  367. ContactsLists: [
  368. {
  369. title: "催款科目",
  370. dataIndex: "dunSubject",
  371. key: "dunSubject",
  372. render: text => {
  373. return getjiedian(text);
  374. }
  375. },
  376. {
  377. title: "金额(万元)",
  378. dataIndex: "money",
  379. key: "money"
  380. },
  381. {
  382. title: "催款状态",
  383. dataIndex: "dunStatus",
  384. key: "dunStatus",
  385. render: text => {
  386. return getCuikuan(text);
  387. }
  388. }
  389. ]
  390. };
  391. },
  392. departmentList() {
  393. this.setState({
  394. loading: true
  395. });
  396. $.ajax({
  397. method: "get",
  398. dataType: "json",
  399. crossDomain: false,
  400. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  401. data: {},
  402. success: function (data) {
  403. let thedata = data.data;
  404. let theArr = [];
  405. if (!thedata) {
  406. if (data.error && data.error.length) {
  407. message.warning(data.error[0].message);
  408. }
  409. } else {
  410. thedata.map(function (item, index) {
  411. theArr.push({
  412. key: index,
  413. name: item.name,
  414. id: item.id
  415. });
  416. });
  417. }
  418. this.setState({
  419. departmentArr: theArr
  420. });
  421. }.bind(this)
  422. }).always(
  423. function () {
  424. this.setState({
  425. loading: false
  426. });
  427. }.bind(this)
  428. );
  429. },
  430. //页面加载函数
  431. componentWillMount() {
  432. this.loadData();
  433. },
  434. //整行点击
  435. tableRowClick(record) {
  436. this.setState(
  437. {
  438. visible: true,
  439. type: record.type,
  440. status: record.status,
  441. buttonStatus: true,
  442. orderStatus: record.orderStatus,
  443. processStateText: record.processStateText,
  444. id: record.id,
  445. orderNo: record.orderNo
  446. },
  447. () => {
  448. this.xiangqing(record.orderNo);
  449. this.xiangmu(record.orderNo);
  450. this.jiedian(record.orderNo);
  451. this.jiedianNew(record.orderNo);
  452. this.createTabs();
  453. }
  454. );
  455. },
  456. //点击打卡项目详情
  457. tableRowClickX(record) {
  458. this.setState({
  459. jid: record.id, //项目ID
  460. kid: record.commodityId, //商品ID
  461. commodityName: record.commodityName, //金额
  462. commodityPrice: record.commodityPrice, //金额
  463. commodityQuantity: record.commodityQuantity, //数量
  464. taskComment: record.taskComment, //备注
  465. main: record.main.toString(), //是否为主要
  466. addnextVisible: true,
  467. dataInfor: record,
  468. addState: 0
  469. });
  470. },
  471. //项目详情关闭
  472. nextCancel() {
  473. this.setState({
  474. addnextVisible: false
  475. });
  476. },
  477. // 合同变更详情
  478. ChangeDetail(id) {
  479. let url = window.location.href.substring(7);
  480. $.ajax({
  481. method: "get",
  482. dataType: "json",
  483. crossDomain: false,
  484. url:
  485. globalConfig.context +
  486. "/api/admin/orderChange/orderChangeDetailsById",
  487. data: {
  488. id: id
  489. },
  490. success: function (data) {
  491. if (data.data) {
  492. let thisdata = data.data;
  493. Object.assign(thisdata, {
  494. processStateText: this.state.processStateText,
  495. userName: this.state.userName,
  496. contractNo: this.state.contractNo
  497. });
  498. this.setState({
  499. contractData: thisdata,
  500. voucherUrl: thisdata.voucherUrl
  501. ? splitUrl(
  502. thisdata.voucherUrl,
  503. ",",
  504. globalConfig.avatarHost + "/upload",
  505. url
  506. )
  507. : [],
  508. attachment: thisdata.attachmentUrl
  509. ? splitUrl(
  510. thisdata.attachmentUrl,
  511. ",",
  512. globalConfig.avatarHost + "/upload",
  513. url
  514. )
  515. : [],
  516. contractPictureUrl: thisdata.contractPictureUrl
  517. ? splitUrl(
  518. thisdata.contractPictureUrl,
  519. ",",
  520. globalConfig.avatarHost + "/upload",
  521. url
  522. )
  523. : []
  524. });
  525. }
  526. }.bind(this)
  527. });
  528. $.ajax({
  529. method: "get",
  530. dataType: "json",
  531. crossDomain: false,
  532. url:
  533. globalConfig.context +
  534. "/api/admin/orderChange/listOrderInvoiceAndBill",
  535. data: {
  536. orderNo: this.state.orderNo
  537. },
  538. success: function (data) {
  539. if (!data.data) return;
  540. let proTotal = 0;
  541. let invTotal = 0;
  542. data.data.bill.forEach(item => {
  543. proTotal += item.transactionAmount;
  544. });
  545. data.data.invoice.forEach(item => {
  546. invTotal += item.amount;
  547. });
  548. this.setState({
  549. proceedsData: data.data,
  550. proTotal: (Math.round(proTotal * 1000000) / 1000000).toFixed(6),
  551. invTotal: (Math.round(invTotal * 1000000) / 1000000).toFixed(6),
  552. });
  553. }.bind(this)
  554. });
  555. $.ajax({
  556. method: "get",
  557. dataType: "json",
  558. crossDomain: false,
  559. url:
  560. globalConfig.context +
  561. "/api/admin/orderChange/listOrderRefundInvoice",
  562. data: {
  563. orderNo: this.state.orderNo
  564. },
  565. success: data => {
  566. if (!data) return;
  567. data.data.forEach(item => {
  568. item.load = true;
  569. });
  570. this.setState({
  571. refundInvoice: data.data
  572. });
  573. }
  574. });
  575. },
  576. //订单详情
  577. xiangqing(orderNos) {
  578. $.ajax({
  579. method: "get",
  580. dataType: "json",
  581. crossDomain: false,
  582. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  583. data: {
  584. orderNo: orderNos
  585. },
  586. success: function (data) {
  587. if (data.error.length || data.data.list == "") {
  588. if (data.error && data.error.length) {
  589. message.warning(data.error[0].message);
  590. }
  591. } else {
  592. let thisdata = data.data;
  593. this.setState({
  594. userName: thisdata.userName,
  595. primaryOrderNo: thisdata.primaryOrder,
  596. additionalOrder: thisdata.additionalOrder,
  597. contractNo: thisdata.contractNo,
  598. // arrears: thisdata.arrears,
  599. orderData: thisdata,
  600. isAddition: thisdata.additionalOrder ? true : false,
  601. contractPictureUrl: thisdata.contractPictureUrl
  602. ? splitUrl(
  603. thisdata.contractPictureUrl,
  604. ",",
  605. globalConfig.avatarHost + "/upload"
  606. )
  607. : [],
  608. replenishUrl: thisdata.agreementUrl
  609. ? splitUrl(
  610. thisdata.agreementUrl,
  611. ",",
  612. globalConfig.avatarHost + "/upload"
  613. )
  614. : [],
  615. });
  616. // console.log(thisdata.contractPictureUrl);
  617. }
  618. }.bind(this)
  619. });
  620. },
  621. // 原订单数据
  622. primaryOrder(primaryOrder) {
  623. $.ajax({
  624. method: "get",
  625. dataType: "json",
  626. crossDomain: false,
  627. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  628. data: {
  629. orderNo: primaryOrder
  630. },
  631. success: function (data) {
  632. if (data.error.length || data.data.list == "") {
  633. if (data.error && data.error.length) {
  634. message.warning(data.error[0].message);
  635. }
  636. } else {
  637. let thisdata = data.data;
  638. this.setState({
  639. primaryOrderData: thisdata
  640. });
  641. }
  642. }.bind(this)
  643. });
  644. },
  645. // 附加订单数据
  646. additionalOrder(additionalOrder) {
  647. $.ajax({
  648. method: "get",
  649. dataType: "json",
  650. crossDomain: false,
  651. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  652. data: {
  653. orderNo: additionalOrder
  654. },
  655. success: function (data) {
  656. if (data.error.length || data.data.list == "") {
  657. if (data.error && data.error.length) {
  658. message.warning(data.error[0].message);
  659. }
  660. } else {
  661. let thisdata = data.data;
  662. this.setState({
  663. additionalOrderData: thisdata
  664. });
  665. }
  666. }.bind(this)
  667. });
  668. },
  669. //项目列表
  670. xiangmu(orderNos) {
  671. $.ajax({
  672. method: "get",
  673. dataType: "json",
  674. crossDomain: false,
  675. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  676. data: {
  677. orderNo: orderNos
  678. },
  679. success: function (data) {
  680. let theArr = [];
  681. if (data.error.length || data.data.list == "") {
  682. if (data.error && data.error.length) {
  683. message.warning(data.error[0].message);
  684. }
  685. } else {
  686. for (let i = 0; i < data.data.length; i++) {
  687. let thisdata = data.data[i];
  688. thisdata.key = i;
  689. thisdata.sort = thisdata.cSort;
  690. theArr.push(thisdata);
  691. }
  692. }
  693. this.setState({
  694. dataSourceX: theArr
  695. });
  696. }.bind(this)
  697. });
  698. },
  699. // 查看收款金额
  700. getProceeds(id) {
  701. $.ajax({
  702. method: "get",
  703. dataType: "json",
  704. crossDomain: false,
  705. url:
  706. globalConfig.context +
  707. "/api/admin/orderChange/orderChangeDetailsById",
  708. data: {
  709. id: id
  710. },
  711. success: function (data) {
  712. if (data.error.length || data.data.list == "") {
  713. if (data.error && data.error.length) {
  714. message.warning(data.error[0].message);
  715. }
  716. } else {
  717. // let thisdata = data.data;
  718. }
  719. }.bind(this)
  720. });
  721. },
  722. search(obj) {
  723. this.setState({
  724. searchData: obj
  725. }, () => {
  726. this.loadData(1);
  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. visible: false
  1196. });
  1197. this.loadData(this.state.pageNo);
  1198. },
  1199. visitOk() {
  1200. this.setState({
  1201. visible: false
  1202. });
  1203. },
  1204. changeList(arr) {
  1205. const newArr = [];
  1206. this.state.columns.forEach(item => {
  1207. arr.forEach(val => {
  1208. if (val === item.title) {
  1209. newArr.push(item);
  1210. }
  1211. });
  1212. });
  1213. this.setState({
  1214. changeList: newArr
  1215. });
  1216. },
  1217. printAll() {
  1218. this.setState({
  1219. dvisible: true
  1220. // loading: true
  1221. });
  1222. this.state.pagination.pageSize = 9999999;
  1223. this.setState({
  1224. pagination: this.state.pagination
  1225. });
  1226. this.loadData();
  1227. },
  1228. exportAll() {
  1229. window.location.href =
  1230. globalConfig.context +
  1231. "/api/admin/orderChange/exportMyChange?" +
  1232. `orderNo=${this.state.searchData.orderNoSearch
  1233. ? this.state.searchData.orderNoSearch
  1234. : ""
  1235. }&processState=${this.props.processState ? this.props.processState : ""
  1236. }&userName=${this.state.searchData.userNameSearch
  1237. ? this.state.searchData.userNameSearch
  1238. : ""
  1239. }&contractNo=${this.state.searchData.contractNoSearch
  1240. ? this.state.searchData.contractNoSearch
  1241. : ""
  1242. }
  1243. &timeType=${this.state.searchData.timeTypeSearch
  1244. ? this.state.searchData.timeTypeSearch
  1245. : ""
  1246. }
  1247. &startTime=${this.state.searchData.releaseDate[0]
  1248. ? this.state.searchData.releaseDate[0]
  1249. : ""
  1250. }
  1251. &endTime=${this.state.searchData.releaseDate[1]
  1252. ? this.state.searchData.releaseDate[1]
  1253. : ""
  1254. }
  1255. &salesmanName=${this.state.searchData.salesmanNameSearch
  1256. ? this.state.searchData.salesmanNameSearch
  1257. : ""
  1258. }
  1259. &complete=${this.state.searchData.completeSearch || 1}
  1260. &depId=${this.state.searchData.depIdSearch
  1261. ? this.state.searchData.depIdSearch
  1262. : ""
  1263. }
  1264. &type=${this.state.searchData.changeSearch
  1265. ? this.state.searchData.changeSearch
  1266. : ""
  1267. }`;
  1268. },
  1269. createTabs() {
  1270. $.ajax({
  1271. url: globalConfig.context + "/api/admin/orderChange/getOrderChange",
  1272. method: "get",
  1273. data: {
  1274. orderNo: this.state.orderNo
  1275. },
  1276. success: data => {
  1277. if (data.error && data.error.length) {
  1278. message.warning(data.error[0].message);
  1279. } else {
  1280. this.setState({
  1281. tabList: data.data
  1282. });
  1283. }
  1284. }
  1285. });
  1286. },
  1287. render() {
  1288. const tabList = this.state.tabList || [];
  1289. const formItemLayout = {
  1290. labelCol: { span: 8 },
  1291. wrapperCol: { span: 14 }
  1292. };
  1293. const FormItem = Form.Item;
  1294. const { TabPane } = Tabs;
  1295. const departmentArr = this.state.departmentArr || [];
  1296. return (
  1297. <div className="user-content" style={{ position: "relative" }}>
  1298. <ShowModalDiv ShowModal={this.state.showModal} />
  1299. <div className="content-title" style={{ marginBottom: 10 }}>
  1300. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1301. 合同变更查看订单
  1302. </span>
  1303. </div>
  1304. <div className="user-search">
  1305. {/* <SearchInput search={this.search} /> */}
  1306. {/* <ChooseList
  1307. columns={this.state.columns}
  1308. changeFn={this.changeList}
  1309. changeList={this.state.changeList}
  1310. top={55}
  1311. /> */}
  1312. <Tabs defaultActiveKey="2" className="test">
  1313. <TabPane tab="搜索" key="2">
  1314. <div style={{ marginLeft: 10 }}>
  1315. <SearchInput search={this.search} />
  1316. </div>
  1317. </TabPane>
  1318. <TabPane tab="打印" key="3">
  1319. <Button
  1320. type="primary"
  1321. style={{ margin: "11px 0px 10px 10px" }}
  1322. onClick={this.printAll}
  1323. disabled={!this.state.dataSource.length}
  1324. >
  1325. 打印所有列表信息
  1326. </Button>
  1327. </TabPane>
  1328. <TabPane tab="导出Excel" key="4">
  1329. <Button
  1330. type="primary"
  1331. style={{ margin: "11px 0px 10px 10px" }}
  1332. onClick={this.exportAll}
  1333. >
  1334. 导出当前列表
  1335. </Button>
  1336. </TabPane>
  1337. <TabPane tab="更改表格显示数据" key="1">
  1338. <div style={{ marginLeft: 10 }}>
  1339. <ChooseList
  1340. columns={this.state.columns}
  1341. changeFn={this.changeList}
  1342. changeList={this.state.changeList}
  1343. top={55}
  1344. margin={11}
  1345. />
  1346. </div>
  1347. </TabPane>
  1348. {/* <TabPane tab="批量操作" key="6">
  1349. <Button
  1350. type="primary"
  1351. disabled={this.state.selectedRowKeys.length == 0}
  1352. style={{ margin: "0px 0px 10px 10px" }}
  1353. onClick={e => {
  1354. e.stopPropagation(),
  1355. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1356. }}
  1357. >
  1358. 转交
  1359. </Button>
  1360. </TabPane> */}
  1361. </Tabs>
  1362. <div className="patent-table">
  1363. <Spin spinning={this.state.loading}>
  1364. <Table
  1365. bordered
  1366. columns={
  1367. this.state.changeList == undefined
  1368. ? this.state.columns
  1369. : this.state.changeList
  1370. }
  1371. scroll={{ x: "max-content", y: 0 }}
  1372. dataSource={this.state.dataSource}
  1373. pagination={this.state.pagination}
  1374. onRowClick={this.tableRowClick}
  1375. // scroll={{ y: 140 }}
  1376. size="small"
  1377. />
  1378. </Spin>
  1379. </div>
  1380. {
  1381. this.state.visible &&
  1382. <Modal
  1383. className="customeDetails"
  1384. footer=""
  1385. maskClosable={false}
  1386. width="1200px"
  1387. visible={this.state.visible}
  1388. onOk={this.visitOk}
  1389. onCancel={this.visitCancel}
  1390. >
  1391. <Tabs
  1392. activeKey={this.state.activeKey}
  1393. onChange={this.callback}
  1394. type="card"
  1395. >
  1396. <TabPane tab="订单详情" key="a">
  1397. <Form
  1398. layout="horizontal"
  1399. onSubmit={this.handleSubmit}
  1400. id="demand-form"
  1401. style={{ paddingBottom: "40px" }}
  1402. >
  1403. <Spin spinning={this.state.loading}>
  1404. {
  1405. this.state.activeKey == "a" &&
  1406. <OrderDetail
  1407. domId='dindanxiangqing'
  1408. orderData={this.state.orderData}
  1409. getOrderLog={this.getOrderLog}
  1410. dataSourceX={this.state.dataSourceX}
  1411. contactList={this.state.contactList}
  1412. orderNo={this.state.orderNo}
  1413. totalCui={this.state.totalCui}
  1414. contactListNew={this.state.contactListNew}
  1415. pictureUrl={this.state.contractPictureUrl}
  1416. isCaiWu={true}
  1417. />
  1418. }
  1419. </Spin>
  1420. </Form>
  1421. </TabPane>
  1422. {tabList.map((item, index, arr) => {
  1423. return (
  1424. <TabPane tab={"合同变更记录" + (tabList.length - index)} key={item.id}>
  1425. {
  1426. this.state.activeKey === String(item.id) &&
  1427. <ChangeDetail
  1428. domId={'changeDetail' + (index + 1)}
  1429. id={item.id}
  1430. money={
  1431. index == arr.length - 1
  1432. ? this.state.orderData.totalAmount + ""
  1433. : undefined
  1434. }
  1435. data={this.state.contractData}
  1436. // loadData={this.ChangeDetail}
  1437. txt={this.state.processStateText}
  1438. pictureUrl={this.state.voucherUrl}
  1439. contractPictureUrl={this.state.contractPictureUrl}
  1440. attachment={this.state.attachment}
  1441. processState={this.props.processState}
  1442. loadData={this.callback}
  1443. reset={this.state.visible}
  1444. dataSource={this.state.dataProps}
  1445. proceedsData={this.state.proceedsData}
  1446. proceedsTotal={this.state.proTotal}
  1447. invoiceTotal={this.state.invTotal}
  1448. contactList={this.state.refundInvoice}
  1449. onCancel={this.visitCancel}
  1450. />
  1451. }
  1452. </TabPane>
  1453. );
  1454. })}
  1455. {tabList.map((item, index) => {
  1456. if (item.usedOrder) {
  1457. return (
  1458. <TabPane
  1459. tab={"原订单" + (tabList.length - index)}
  1460. key={item.usedOrder}
  1461. >
  1462. {
  1463. this.state.activeKey == item.usedOrder &&
  1464. <Form
  1465. layout="horizontal"
  1466. onSubmit={this.handleSubmit}
  1467. id="demand-form"
  1468. style={{ paddingBottom: "40px" }}
  1469. >
  1470. <Spin spinning={this.state.loading}>
  1471. <OrderDetail
  1472. domId={'yuandingdan' + (index + 1)}
  1473. orderData={this.state.primaryOrderData}
  1474. getOrderLog={this.getOrderLog}
  1475. dataSourceX={this.state.dataSourceX}
  1476. contactList={this.state.contactList}
  1477. orderNo={this.state.primaryOrderNo}
  1478. totalCui={this.state.totalCui}
  1479. contactListNew={this.state.contactListNew}
  1480. isCaiWu={true}
  1481. />
  1482. </Spin>
  1483. </Form>
  1484. }
  1485. </TabPane>
  1486. );
  1487. } else {
  1488. return "";
  1489. }
  1490. })}
  1491. {this.state.status === 4 && this.state.isAddition ? (
  1492. this.state.type === 4 || this.state.type === 5 ? (
  1493. <TabPane tab="附加订单" key="c">
  1494. <OrderDetail
  1495. domId='fujiadingdan'
  1496. orderData={this.state.additionalOrderData}
  1497. getOrderLog={this.getOrderLog}
  1498. dataSourceX={this.state.dataSourceX}
  1499. contactList={this.state.contactList}
  1500. totalCui={this.state.totalCui}
  1501. contactListNew={this.state.contactListNew}
  1502. orderNo={this.state.additionalOrder}
  1503. isCaiWu={true}
  1504. />
  1505. </TabPane>
  1506. ) : (
  1507. ""
  1508. )
  1509. ) : (
  1510. ""
  1511. )}
  1512. </Tabs>
  1513. </Modal>
  1514. }
  1515. <Modal
  1516. maskClosable={false}
  1517. visible={this.state.noVisible}
  1518. onOk={this.handleOk}
  1519. onCancel={this.noCancel}
  1520. width="400px"
  1521. title={"拒绝理由"}
  1522. footer=""
  1523. className="admin-desc-content"
  1524. confirmLoading={this.state.confirmLoading}
  1525. >
  1526. <Form layout="horizontal" id="demand-form">
  1527. <Spin spinning={this.state.loading}>
  1528. <div className="clearfix">
  1529. <FormItem
  1530. labelCol={{ span: 4 }}
  1531. wrapperCol={{ span: 16 }}
  1532. label="拒绝理由"
  1533. >
  1534. <Input
  1535. type="textarea"
  1536. placeholder="请输入拒绝理由"
  1537. rows={4}
  1538. value={this.state.reason}
  1539. onChange={(e) => {
  1540. this.setState({ reason: e.target.value });
  1541. }}
  1542. />
  1543. </FormItem>
  1544. </div>
  1545. <div className="clearfix">
  1546. <Button
  1547. className="cancel"
  1548. type="primary"
  1549. onClick={this.examOks}
  1550. style={{ marginLeft: "50px" }}
  1551. htmlType="submit"
  1552. loading={this.state.aloading}
  1553. >
  1554. 确定
  1555. </Button>
  1556. <Button
  1557. className="cancel"
  1558. type="ghost"
  1559. onClick={this.noCancel}
  1560. style={{ marginLeft: "50px" }}
  1561. >
  1562. 取消
  1563. </Button>
  1564. </div>
  1565. </Spin>
  1566. </Form>
  1567. </Modal>
  1568. {/* <Modal
  1569. visible={this.state.rizhivisible}
  1570. className="admin-desc-content"
  1571. width="800px"
  1572. maskClosable={false}
  1573. title="订单日志"
  1574. footer={null}
  1575. onCancel={this.closeOrderLog}
  1576. >
  1577. <div className="patent-table">
  1578. <Spin spinning={this.state.loading}>
  1579. <Table
  1580. bordered
  1581. columns={this.state.columnsrizhi}
  1582. dataSource={this.state.dataSourcerizhi}
  1583. pagination={false}
  1584. />
  1585. </Spin>
  1586. </div>
  1587. </Modal> */}
  1588. <OrderRiZi
  1589. dataSourcerizhi={this.state.dataSourcerizhi}
  1590. closeOrderLog={this.closeOrderLog}
  1591. visible={this.state.rizhivisible}
  1592. loading={this.state.loading}
  1593. />
  1594. <Modal
  1595. visible={this.state.dvisible}
  1596. footer=""
  1597. title="所有列表信息"
  1598. className="admin-desc-content"
  1599. width="1300px"
  1600. onCancel={() => {
  1601. this.setState({
  1602. dvisible: false,
  1603. });
  1604. this.state.pagination.pageSize = 10;
  1605. this.setState({
  1606. pagination: this.state.pagination,
  1607. });
  1608. this.loadData();
  1609. }}
  1610. >
  1611. <Spin spinning={this.state.loading}>
  1612. <div
  1613. className="patent-table"
  1614. style={{
  1615. // width: 900,
  1616. // position: "relative",
  1617. // left: "50%",
  1618. // transform: "translate(-50%)",
  1619. padding: "25px 30px 30px 30px",
  1620. }}
  1621. ref={(e) => {
  1622. this.refs.all = e;
  1623. }}
  1624. >
  1625. <Table
  1626. columns={this.state.columns}
  1627. dataSource={this.state.dataSource}
  1628. pagination={false}
  1629. bordered
  1630. size="small"
  1631. />
  1632. </div>
  1633. </Spin>
  1634. <ReactToPrint
  1635. trigger={() => (
  1636. <Button
  1637. type="primary"
  1638. style={{
  1639. float: "right",
  1640. marginTop: 10,
  1641. position: "absolute",
  1642. top: 0,
  1643. right: 30,
  1644. }}
  1645. >
  1646. 打印
  1647. </Button>
  1648. )}
  1649. content={() => this.refs.all}
  1650. />
  1651. </Modal>
  1652. </div>
  1653. {/* {this.state.addnextVisible && <ProjectDetailsReadOnly
  1654. infor={this.state.dataInfor}
  1655. visible={this.state.addnextVisible}
  1656. onCancel={this.nextCancel}
  1657. />} */}
  1658. {
  1659. // 项目业务详情
  1660. this.state.addnextVisible &&
  1661. <NewEditProject
  1662. readOnly={true}
  1663. visible={this.state.addnextVisible}
  1664. dataInfor={this.state.dataInfor}
  1665. onCancel={this.nextCancel}
  1666. />
  1667. }
  1668. </div>
  1669. );
  1670. }
  1671. })
  1672. );
  1673. export default contractChange;