contractCwjl.js 49 KB

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