contractCwzy.js 48 KB

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