contractCwzy.js 50 KB

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