contractCwzy.js 52 KB

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