contractCwjl.js 48 KB

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