contractCwjl.js 49 KB

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