contractCwzy.js 51 KB

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