contractCwjl.js 49 KB

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