contractCwzy.js 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700
  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. 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.examineName,
  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. this.setState({
  717. searchData: obj
  718. }, () => {
  719. this.loadData(1);
  720. })
  721. },
  722. rizhi(orderNo) {
  723. $.ajax({
  724. method: "get",
  725. dataType: "json",
  726. crossDomain: false,
  727. url: "/api/admin/newOrder/selectOrderLog",
  728. data: {
  729. orderNo: orderNo
  730. },
  731. success: function (data) {
  732. let theArr = [];
  733. let thisData = data.data;
  734. if (!thisData.length) {
  735. if (data.error && data.error.length) {
  736. message.warning(data.error[0].message);
  737. }
  738. thisData = {};
  739. } else {
  740. for (let i = 0; i < data.data.length; i++) {
  741. let thisdata = data.data[i];
  742. theArr.push({
  743. processName: thisdata.processName,
  744. adminName: thisdata.adminName,
  745. createDate: thisdata.createDate,
  746. remarks: thisdata.remarks
  747. });
  748. }
  749. }
  750. this.setState({
  751. dataSourcerizhi: theArr
  752. });
  753. }.bind(this)
  754. });
  755. },
  756. getOrderLog(orderNo) {
  757. this.setState({
  758. rizhivisible: true
  759. });
  760. this.rizhi(orderNo);
  761. },
  762. closeOrderLog() {
  763. this.setState({
  764. rizhivisible: false
  765. });
  766. },
  767. //节点列表
  768. jiedian(orderNos) {
  769. $.ajax({
  770. method: "get",
  771. dataType: "json",
  772. crossDomain: false,
  773. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  774. data: {
  775. orderNo: orderNos
  776. },
  777. success: function (data) {
  778. let theArr = [];
  779. let thisData = [];
  780. if (data.error.length || data.data.list == "") {
  781. if (data.error && data.error.length) {
  782. message.warning(data.error[0].message);
  783. }
  784. } else {
  785. for (let i = 0; i < data.data.length; i++) {
  786. thisData = data.data[i];
  787. theArr.push({
  788. key: i,
  789. dunSubject: thisData.dunSubject
  790. ? thisData.dunSubject.toString()
  791. : "", //催款科目
  792. id: thisData.id, //节点Id
  793. money: thisData.money, //催款金额
  794. dunStatus: thisData.dunStatus //催款状态
  795. });
  796. }
  797. this.setState({
  798. contactList: theArr
  799. });
  800. }
  801. }.bind(this)
  802. });
  803. },
  804. jiedianNew(orderNos) {
  805. $.ajax({
  806. method: "get",
  807. dataType: "json",
  808. crossDomain: false,
  809. url:
  810. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  811. data: {
  812. orderNo: orderNos
  813. },
  814. success: function (data) {
  815. if (data.error && data.error.length) {
  816. message.warning(data.error[0].message);
  817. } else {
  818. let theArr = [];
  819. let thisData = [];
  820. let arr = data.data || [];
  821. let totalCui = 0;
  822. for (let i = 0; i < arr.length; i++) {
  823. thisData = arr[i];
  824. totalCui += +thisData.money;
  825. theArr.push({
  826. key: i,
  827. dunSubject: thisData.dunSubject
  828. ? thisData.dunSubject.toString()
  829. : "", //催款科目
  830. id: thisData.id, //节点Id
  831. money: thisData.money, //催款金额
  832. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  833. commodityName: thisData.commodityName,
  834. projectType: thisData.projectType,
  835. dunTypeName: thisData.dunTypeName,
  836. status: thisData.status,
  837. waitDay: thisData.waitDay,
  838. effectiveCount: thisData.effectiveCount,
  839. startDate: thisData.startDate,
  840. dunType: thisData.dunType,
  841. appropriationRatio: thisData.appropriationRatio,
  842. customizeName: thisData.customizeName,
  843. customizeTimes: thisData.customizeTimes,
  844. tid: thisData.tid,
  845. });
  846. }
  847. if (!totalCui) {
  848. totalCui = 0;
  849. }
  850. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  851. this.setState({
  852. contactListNew: theArr,
  853. totalCui
  854. });
  855. }
  856. }.bind(this)
  857. }).always(
  858. function () {
  859. this.setState({
  860. loading: false
  861. });
  862. }.bind(this)
  863. );
  864. },
  865. //审核通过
  866. examOk() {
  867. $.ajax({
  868. method: "post",
  869. dataType: "json",
  870. crossDomain: false,
  871. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  872. data: {
  873. orderNo: this.state.orderNo,
  874. orderStatus: 2
  875. },
  876. success: function (data) {
  877. if (data.error.length || data.data.list == "") {
  878. if (data.error && data.error.length) {
  879. message.warning(data.error[0].message);
  880. }
  881. } else {
  882. message.success("该订单已通过审核~");
  883. this.setState({
  884. visible: false
  885. });
  886. this.reset();
  887. }
  888. }.bind(this)
  889. }).always(
  890. function () {
  891. this.setState({
  892. loading: false
  893. });
  894. }.bind(this)
  895. );
  896. },
  897. //通过发给外包
  898. outsourcing() {
  899. $.ajax({
  900. method: "post",
  901. dataType: "json",
  902. crossDomain: false,
  903. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  904. data: {
  905. orderNo: this.state.orderNo,
  906. orderStatus: 2,
  907. outsource: 1
  908. },
  909. success: function (data) {
  910. if (data.error.length || data.data.list == "") {
  911. if (data.error && data.error.length) {
  912. message.warning(data.error[0].message);
  913. }
  914. } else {
  915. message.success("该订单已通过审核~");
  916. this.setState({
  917. visible: false
  918. });
  919. this.reset();
  920. }
  921. }.bind(this)
  922. }).always(
  923. function () {
  924. this.setState({
  925. loading: false
  926. });
  927. }.bind(this)
  928. );
  929. },
  930. //审核不通过
  931. examOks() {
  932. this.setState({
  933. aloading: true
  934. });
  935. $.ajax({
  936. method: "post",
  937. dataType: "json",
  938. crossDomain: false,
  939. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  940. data: {
  941. orderNo: this.state.orderNo,
  942. orderStatus: 3,
  943. reason: this.state.reason
  944. },
  945. success: function (data) {
  946. if (data.error.length || data.data.list == "") {
  947. if (data.error && data.error.length) {
  948. message.warning(data.error[0].message);
  949. this.setState({
  950. aloading: true
  951. });
  952. }
  953. } else {
  954. message.success("该订单已被拒绝~");
  955. this.setState({
  956. visible: false,
  957. aloading: false,
  958. noVisible: false,
  959. reason: ""
  960. });
  961. this.reset();
  962. }
  963. }.bind(this)
  964. }).always(
  965. function () {
  966. this.setState({
  967. loading: false
  968. });
  969. }.bind(this)
  970. );
  971. },
  972. //点击拒绝
  973. examNo() {
  974. this.setState({
  975. noVisible: true
  976. });
  977. },
  978. loadDataChange(key) {
  979. $.ajax({
  980. method: "get",
  981. dataType: "json",
  982. async: false,
  983. crossDomain: false,
  984. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  985. data: {
  986. changeId: key
  987. },
  988. success: function (data) {
  989. if (data.error.length || data.data.list == "") {
  990. if (data.error && data.error.length) {
  991. message.warning(data.error[0].message);
  992. }
  993. } else {
  994. // console.log("拿到历史", data);
  995. this.setState({
  996. dataProps: data.data
  997. });
  998. }
  999. }.bind(this)
  1000. });
  1001. },
  1002. callback(key) {
  1003. this.setState(
  1004. {
  1005. activeKey: key
  1006. },
  1007. () => {
  1008. if (key != "a" && key != "c" && key.length < 10) {
  1009. this.ChangeDetail(key);
  1010. this.loadDataChange(key);
  1011. this.getProceeds(key);
  1012. } else if (key != "a" && key != "c" && key.length > 10) {
  1013. this.primaryOrder(key);
  1014. this.xiangmu(key);
  1015. this.jiedian(key);
  1016. this.jiedianNew(key);
  1017. this.loadDataChange(key);
  1018. }
  1019. }
  1020. );
  1021. if (key === "a") {
  1022. this.xiangmu(this.state.orderNo);
  1023. this.jiedian(this.state.orderNo);
  1024. this.jiedianNew(this.state.orderNo);
  1025. }
  1026. // if (key === "2") {
  1027. // this.ChangeDetail(this.state.id);
  1028. // this.loadDataChange();
  1029. // this.getProceeds(this.state.id);
  1030. // }
  1031. // if (key === "3") {
  1032. // this.primaryOrder(this.state.primaryOrderNo);
  1033. // this.xiangmu(this.state.primaryOrderNo);
  1034. // this.jiedian(this.state.primaryOrderNo);
  1035. // this.jiedianNew(this.state.primaryOrderNo);
  1036. // }
  1037. if (key === "c") {
  1038. this.additionalOrder(this.state.additionalOrder);
  1039. this.xiangmu(this.state.additionalOrder);
  1040. this.jiedian(this.state.additionalOrder);
  1041. this.jiedianNew(this.state.additionalOrder);
  1042. this.setState({
  1043. buttonStatusA: false
  1044. });
  1045. } else {
  1046. this.setState({
  1047. buttonStatusA: true
  1048. });
  1049. }
  1050. },
  1051. closeDesc(e, s) {
  1052. this.state.activeKey = "a";
  1053. this.state.userDetaile = false;
  1054. this.state.signBillVisible = false;
  1055. this.state.visible = e;
  1056. if (s) {
  1057. this.loadData(this.state.pageNo);
  1058. }
  1059. },
  1060. // 获取原订单编号
  1061. getPrimaryOrder(value) {
  1062. this.setState({
  1063. primaryOrder: value
  1064. });
  1065. },
  1066. getAdditionalOrder(value) {
  1067. this.setState({
  1068. additionalOrder: value
  1069. });
  1070. },
  1071. getUrl(url) {
  1072. let theorgCodeUrl = [];
  1073. if (url.length) {
  1074. let picArr = [];
  1075. url.map(function (item) {
  1076. if (
  1077. item.response &&
  1078. item.response.data &&
  1079. item.response.data.length
  1080. ) {
  1081. picArr.push(item.response.data);
  1082. }
  1083. });
  1084. theorgCodeUrl = picArr.join(",");
  1085. }
  1086. return theorgCodeUrl;
  1087. },
  1088. sureOut() {
  1089. if (!this.state.companyName) {
  1090. message.warning("公司名称不能为空");
  1091. return;
  1092. }
  1093. if (!this.state.unitPrice) {
  1094. message.warning("单价不能为空");
  1095. return;
  1096. }
  1097. if (!this.state.unitNumber) {
  1098. message.warning("数量不能为空");
  1099. return;
  1100. }
  1101. if (!this.state.amount) {
  1102. message.warning("总金额不能为空");
  1103. return;
  1104. }
  1105. if (!this.state.outsourceRemarks) {
  1106. message.warning("备注不能为空");
  1107. return;
  1108. }
  1109. if (this.state.pictureUrl.length === 0) {
  1110. message.warning("合同扫描件不能为空");
  1111. return;
  1112. }
  1113. $.ajax({
  1114. method: "POST",
  1115. dataType: "json",
  1116. crossDomain: false,
  1117. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1118. data: {
  1119. id: this.state.id,
  1120. orderNo: this.state.orderNo,
  1121. companyName: this.state.companyName,
  1122. amount: this.state.amount,
  1123. outsourceRemarks: this.state.outsourceRemarks,
  1124. unitNumber: this.state.unitNumber,
  1125. unitPrice: this.state.unitPrice,
  1126. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1127. ? this.getUrl(this.state.attachmentUrl)
  1128. : "",
  1129. orderStatus: 2,
  1130. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1131. ? this.getUrl(this.state.pictureUrl)
  1132. : ""
  1133. }
  1134. }).done(
  1135. function (data) {
  1136. this.setState({
  1137. loading: false
  1138. });
  1139. if (!data.error.length) {
  1140. message.success("发起成功!");
  1141. this.outReset();
  1142. this.visitCancel();
  1143. } else {
  1144. message.warning(data.error[0].message);
  1145. }
  1146. }.bind(this)
  1147. );
  1148. },
  1149. //关闭输入理由框
  1150. noCancel() {
  1151. this.setState({
  1152. noVisible: false,
  1153. aloading: false,
  1154. reason: ""
  1155. });
  1156. },
  1157. //重置
  1158. reset() {
  1159. this.setState({
  1160. signBillVisible: false
  1161. });
  1162. this.state.orderNo = "";
  1163. this.state.customerName = "";
  1164. this.state.releaseDate[0] = undefined;
  1165. this.state.releaseDate[1] = undefined;
  1166. this.state.approval = undefined;
  1167. this.loadData(1);
  1168. },
  1169. outReset() {
  1170. this.setState({
  1171. companyName: "",
  1172. amount: "",
  1173. unitPrice: "",
  1174. unitNumber: "",
  1175. outsourceRemarks: "",
  1176. attachmentUrl: [],
  1177. pictureUrl: []
  1178. });
  1179. },
  1180. getOrgCodeUrl(e) {
  1181. this.setState({ pictureUrl: e });
  1182. },
  1183. //关闭详情
  1184. visitCancel() {
  1185. this.setState(
  1186. {
  1187. activeKey: "a"
  1188. },
  1189. () => {
  1190. this.setState({
  1191. visible: false
  1192. });
  1193. }
  1194. );
  1195. this.loadData(this.state.pageNo);
  1196. },
  1197. visitOk() {
  1198. this.setState({
  1199. visible: false
  1200. });
  1201. },
  1202. changeList(arr) {
  1203. const newArr = [];
  1204. this.state.columns.forEach(item => {
  1205. arr.forEach(val => {
  1206. if (val === item.title) {
  1207. newArr.push(item);
  1208. }
  1209. });
  1210. });
  1211. this.setState({
  1212. changeList: newArr
  1213. });
  1214. },
  1215. printAll() {
  1216. this.setState({
  1217. dvisible: true
  1218. // loading: true
  1219. });
  1220. this.state.pagination.pageSize = 9999999;
  1221. this.setState({
  1222. pagination: this.state.pagination
  1223. });
  1224. this.loadData();
  1225. },
  1226. exportAll() {
  1227. window.location.href =
  1228. globalConfig.context +
  1229. "/api/admin/orderChange/exportMyChange?" +
  1230. `orderNo=${this.state.searchData.orderNoSearch
  1231. ? this.state.searchData.orderNoSearch
  1232. : ""
  1233. }&processState=${this.props.processState ? this.props.processState : ""
  1234. }&userName=${this.state.searchData.userNameSearch
  1235. ? this.state.searchData.userNameSearch
  1236. : ""
  1237. }&contractNo=${this.state.searchData.contractNoSearch
  1238. ? this.state.searchData.contractNoSearch
  1239. : ""
  1240. }
  1241. &timeType=${this.state.searchData.timeTypeSearch
  1242. ? this.state.searchData.timeTypeSearch
  1243. : ""
  1244. }
  1245. &startTime=${this.state.searchData.releaseDate[0]
  1246. ? this.state.searchData.releaseDate[0]
  1247. : ""
  1248. }
  1249. &endTime=${this.state.searchData.releaseDate[1]
  1250. ? this.state.searchData.releaseDate[1]
  1251. : ""
  1252. }
  1253. &salesmanName=${this.state.searchData.salesmanNameSearch
  1254. ? this.state.searchData.salesmanNameSearch
  1255. : ""
  1256. }
  1257. &complete=${this.state.searchData.completeSearch || 1}
  1258. &depId=${this.state.searchData.depIdSearch
  1259. ? this.state.searchData.depIdSearch
  1260. : ""
  1261. }
  1262. &type=${this.state.searchData.changeSearch
  1263. ? this.state.searchData.changeSearch
  1264. : ""
  1265. }`;
  1266. },
  1267. createTabs() {
  1268. $.ajax({
  1269. url: globalConfig.context + "/api/admin/orderChange/getOrderChange",
  1270. method: "get",
  1271. data: {
  1272. orderNo: this.state.orderNo
  1273. },
  1274. success: data => {
  1275. if (data.error && data.error.length) {
  1276. message.warning(data.error[0].message);
  1277. } else {
  1278. this.setState({
  1279. tabList: data.data
  1280. });
  1281. }
  1282. }
  1283. });
  1284. },
  1285. render() {
  1286. const tabList = this.state.tabList || [];
  1287. const formItemLayout = {
  1288. labelCol: { span: 8 },
  1289. wrapperCol: { span: 14 }
  1290. };
  1291. const FormItem = Form.Item;
  1292. const { TabPane } = Tabs;
  1293. const departmentArr = this.state.departmentArr || [];
  1294. return (
  1295. <div className="user-content" style={{ position: "relative" }}>
  1296. <ShowModalDiv ShowModal={this.state.showModal} />
  1297. <div className="content-title" style={{ marginBottom: 10 }}>
  1298. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1299. 合同变更审核订单
  1300. </span>
  1301. </div>
  1302. <div className="user-search">
  1303. {/* <SearchInput search={this.search} /> */}
  1304. {/* <ChooseList
  1305. columns={this.state.columns}
  1306. changeFn={this.changeList}
  1307. changeList={this.state.changeList}
  1308. top={55}
  1309. /> */}
  1310. <Tabs
  1311. defaultActiveKey="2"
  1312. onChange={this.callbackTab}
  1313. className="test"
  1314. >
  1315. <TabPane tab="更改表格显示数据" key="1">
  1316. <div style={{ marginLeft: 10 }}>
  1317. <ChooseList
  1318. columns={this.state.columns}
  1319. changeFn={this.changeList}
  1320. changeList={this.state.changeList}
  1321. top={55}
  1322. margin={11}
  1323. />
  1324. </div>
  1325. </TabPane>
  1326. <TabPane tab="搜索" key="2">
  1327. <div style={{ marginLeft: 10 }}>
  1328. <SearchInput search={this.search} />
  1329. </div>
  1330. </TabPane>
  1331. <TabPane tab="打印" key="3">
  1332. <Button
  1333. type="primary"
  1334. style={{ margin: "11px 0px 10px 10px" }}
  1335. onClick={this.printAll}
  1336. disabled={!this.state.dataSource.length}
  1337. >
  1338. 打印所有列表信息
  1339. </Button>
  1340. </TabPane>
  1341. <TabPane tab="导出Excel" key="4">
  1342. <Button
  1343. type="primary"
  1344. style={{ margin: "11px 0px 10px 10px" }}
  1345. onClick={this.exportAll}
  1346. >
  1347. 导出当前列表
  1348. </Button>
  1349. </TabPane>
  1350. {/* <TabPane tab="批量操作" key="6">
  1351. <Button
  1352. type="primary"
  1353. disabled={this.state.selectedRowKeys.length == 0}
  1354. style={{ margin: "0px 0px 10px 10px" }}
  1355. onClick={e => {
  1356. e.stopPropagation(),
  1357. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1358. }}
  1359. >
  1360. 转交
  1361. </Button>
  1362. </TabPane> */}
  1363. </Tabs>
  1364. <div className="patent-table">
  1365. <Spin spinning={this.state.loading}>
  1366. <Table
  1367. bordered
  1368. columns={
  1369. this.state.changeList == undefined
  1370. ? this.state.columns
  1371. : this.state.changeList
  1372. }
  1373. scroll={{ x: "max-content", y: 0 }}
  1374. dataSource={this.state.dataSource}
  1375. pagination={this.state.pagination}
  1376. onRowClick={this.tableRowClick}
  1377. // scroll={{ y: 140 }}
  1378. size="small"
  1379. />
  1380. </Spin>
  1381. </div>
  1382. {
  1383. this.state.visible &&
  1384. <Modal
  1385. className="customeDetails"
  1386. footer=""
  1387. maskClosable={false}
  1388. width="1200px"
  1389. visible={this.state.visible}
  1390. onOk={this.visitOk}
  1391. onCancel={this.visitCancel}
  1392. >
  1393. <Tabs
  1394. activeKey={this.state.activeKey}
  1395. onChange={this.callback}
  1396. type="card"
  1397. >
  1398. <TabPane tab="订单详情" key="a">
  1399. <Form
  1400. layout="horizontal"
  1401. onSubmit={this.handleSubmit}
  1402. id="demand-form"
  1403. style={{ paddingBottom: "40px" }}
  1404. >
  1405. <Spin spinning={this.state.loading}>
  1406. {
  1407. this.state.activeKey == "a" &&
  1408. <OrderDetail
  1409. domId='dingdanxiangqing'
  1410. orderData={this.state.orderData}
  1411. getOrderLog={this.getOrderLog}
  1412. dataSourceX={this.state.dataSourceX}
  1413. contactList={this.state.contactList}
  1414. orderNo={this.state.orderNo}
  1415. totalCui={this.state.totalCui}
  1416. contactListNew={this.state.contactListNew}
  1417. pictureUrl={this.state.contractPictureUrl}
  1418. isCaiWu={true}
  1419. />
  1420. }
  1421. </Spin>
  1422. </Form>
  1423. </TabPane>
  1424. {tabList.map((item, index, arr) => {
  1425. return (
  1426. <TabPane tab={"合同变更记录" + (tabList.length - index)} key={item.id}>
  1427. {
  1428. this.state.activeKey == item.id &&
  1429. <ChangeDetail
  1430. domId={'hetongbiangenjilu' + (index + 1)}
  1431. id={item.id}
  1432. money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
  1433. data={this.state.contractData}
  1434. // loadData={this.ChangeDetail}
  1435. txt={this.state.processStateText}
  1436. pictureUrl={this.state.voucherUrl}
  1437. contractPictureUrl={this.state.contractPictureUrl}
  1438. attachment={this.state.attachment}
  1439. processState={this.props.processState}
  1440. loadData={this.callback}
  1441. reset={this.state.visible}
  1442. dataSource={this.state.dataProps}
  1443. proceedsData={this.state.proceedsData}
  1444. proceedsTotal={this.state.proTotal}
  1445. invoiceTotal={this.state.invTotal}
  1446. contactList={this.state.refundInvoice}
  1447. onCancel={this.visitCancel}
  1448. />
  1449. }
  1450. </TabPane>
  1451. );
  1452. })}
  1453. {tabList.map((item, index) => {
  1454. if (item.usedOrder) {
  1455. return (
  1456. <TabPane
  1457. tab={"原订单" + (tabList.length - index)}
  1458. key={item.usedOrder}
  1459. >
  1460. {
  1461. this.state.activeKey == item.usedOrder &&
  1462. <Form
  1463. layout="horizontal"
  1464. onSubmit={this.handleSubmit}
  1465. id="demand-form"
  1466. style={{ paddingBottom: "40px" }}
  1467. >
  1468. <Spin spinning={this.state.loading}>
  1469. {
  1470. this.state.activeKey == item.usedOrder &&
  1471. <OrderDetail
  1472. domId={'yuandingdan' + (index + 1)}
  1473. orderData={this.state.primaryOrderData}
  1474. getOrderLog={this.getOrderLog}
  1475. dataSourceX={this.state.dataSourceX}
  1476. contactList={this.state.contactList}
  1477. orderNo={this.state.primaryOrderNo}
  1478. totalCui={this.state.totalCui}
  1479. contactListNew={this.state.contactListNew}
  1480. isCaiWu={true}
  1481. />
  1482. }
  1483. </Spin>
  1484. </Form>
  1485. }
  1486. </TabPane>
  1487. );
  1488. } else {
  1489. return "";
  1490. }
  1491. })}
  1492. {this.state.status === 4 && this.state.isAddition ? (
  1493. this.state.type === 4 || this.state.type === 5 ? (
  1494. <TabPane tab="附加订单" key="c">
  1495. <OrderDetail
  1496. domId='fujiadingdan'
  1497. orderData={this.state.additionalOrderData}
  1498. getOrderLog={this.getOrderLog}
  1499. dataSourceX={this.state.dataSourceX}
  1500. contactList={this.state.contactList}
  1501. totalCui={this.state.totalCui}
  1502. contactListNew={this.state.contactListNew}
  1503. orderNo={this.state.additionalOrder}
  1504. isCaiWu={true}
  1505. />
  1506. </TabPane>
  1507. ) : (
  1508. ""
  1509. )
  1510. ) : (
  1511. ""
  1512. )}
  1513. </Tabs>
  1514. </Modal>
  1515. }
  1516. <Modal
  1517. maskClosable={false}
  1518. visible={this.state.noVisible}
  1519. onOk={this.handleOk}
  1520. onCancel={this.noCancel}
  1521. width="400px"
  1522. title={"拒绝理由"}
  1523. footer=""
  1524. className="admin-desc-content"
  1525. confirmLoading={this.state.confirmLoading}
  1526. >
  1527. <Form layout="horizontal" id="demand-form">
  1528. <Spin spinning={this.state.loading}>
  1529. <div className="clearfix">
  1530. <FormItem
  1531. labelCol={{ span: 4 }}
  1532. wrapperCol={{ span: 16 }}
  1533. label="拒绝理由"
  1534. >
  1535. <Input
  1536. type="textarea"
  1537. placeholder="请输入拒绝理由"
  1538. rows={4}
  1539. value={this.state.reason}
  1540. onChange={e => {
  1541. this.setState({ reason: e.target.value });
  1542. }}
  1543. />
  1544. </FormItem>
  1545. </div>
  1546. <div className="clearfix">
  1547. <Button
  1548. className="cancel"
  1549. type="primary"
  1550. onClick={this.examOks}
  1551. style={{ marginLeft: "50px" }}
  1552. htmlType="submit"
  1553. loading={this.state.aloading}
  1554. >
  1555. 确定
  1556. </Button>
  1557. <Button
  1558. className="cancel"
  1559. type="ghost"
  1560. onClick={this.noCancel}
  1561. style={{ marginLeft: "50px" }}
  1562. >
  1563. 取消
  1564. </Button>
  1565. </div>
  1566. </Spin>
  1567. </Form>
  1568. </Modal>
  1569. {/* <Modal
  1570. visible={this.state.rizhivisible}
  1571. className="admin-desc-content"
  1572. width="800px"
  1573. maskClosable={false}
  1574. title="订单日志"
  1575. footer={null}
  1576. onCancel={this.closeOrderLog}
  1577. >
  1578. <div className="patent-table">
  1579. <Spin spinning={this.state.loading}>
  1580. <Table
  1581. bordered
  1582. columns={this.state.columnsrizhi}
  1583. dataSource={this.state.dataSourcerizhi}
  1584. pagination={false}
  1585. />
  1586. </Spin>
  1587. </div>
  1588. </Modal> */}
  1589. <OrderRiZi
  1590. dataSourcerizhi={this.state.dataSourcerizhi}
  1591. closeOrderLog={this.closeOrderLog}
  1592. visible={this.state.rizhivisible}
  1593. loading={this.state.loading}
  1594. />
  1595. <Modal
  1596. visible={this.state.dvisible}
  1597. footer=""
  1598. title="所有列表信息"
  1599. className="admin-desc-content"
  1600. width="1300px"
  1601. onCancel={() => {
  1602. this.setState({
  1603. dvisible: false
  1604. });
  1605. this.state.pagination.pageSize = 10;
  1606. this.setState({
  1607. pagination: this.state.pagination
  1608. });
  1609. this.loadData();
  1610. }}
  1611. >
  1612. <Spin spinning={this.state.loading}>
  1613. <div
  1614. className="patent-table"
  1615. style={{
  1616. // width: 900,
  1617. // position: "relative",
  1618. // left: "50%",
  1619. // transform: "translate(-50%)",
  1620. padding: "25px 30px 30px 30px"
  1621. }}
  1622. ref={e => {
  1623. this.refs.all = e;
  1624. }}
  1625. >
  1626. <Table
  1627. columns={this.state.columns}
  1628. dataSource={this.state.dataSource}
  1629. pagination={false}
  1630. bordered
  1631. size="small"
  1632. />
  1633. </div>
  1634. </Spin>
  1635. <ReactToPrint
  1636. trigger={() => (
  1637. <Button
  1638. type="primary"
  1639. style={{
  1640. float: "right",
  1641. marginTop: 10,
  1642. position: "absolute",
  1643. top: 0,
  1644. right: 30
  1645. }}
  1646. >
  1647. 打印
  1648. </Button>
  1649. )}
  1650. content={() => this.refs.all}
  1651. />
  1652. </Modal>
  1653. </div>
  1654. {/* {this.state.addnextVisible && <ProjectDetailsReadOnly
  1655. infor={this.state.dataInfor}
  1656. visible={this.state.addnextVisible}
  1657. onCancel={this.nextCancel}
  1658. />} */}
  1659. {
  1660. // 项目业务详情
  1661. this.state.addnextVisible &&
  1662. <NewEditProject
  1663. readOnly={true}
  1664. visible={this.state.addnextVisible}
  1665. dataInfor={this.state.dataInfor}
  1666. onCancel={this.nextCancel}
  1667. />
  1668. }
  1669. </div>
  1670. );
  1671. }
  1672. })
  1673. );
  1674. export default contractChange;