contractCwjl.js 51 KB

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