contractCwjl.js 50 KB

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