contractCwjl.js 48 KB

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