contractCwzy.js 51 KB

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