contractCwjl.js 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701
  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 NewEditProject from "../../../common/projectOperation/newEditProject";
  27. const contractChange = Form.create()(
  28. React.createClass({
  29. loadData(pageNo) {
  30. this.setState({
  31. loading: true
  32. });
  33. $.ajax({
  34. method: "get",
  35. dataType: "json",
  36. crossDomain: false,
  37. url: globalConfig.context + "/api/admin/orderChange/orderChangeList",
  38. data: {
  39. pageNo: pageNo || 1,
  40. pageSize: this.state.pagination.pageSize,
  41. userName: this.state.searchData.userNameSearch,
  42. processState: this.props.processState,
  43. timeType: this.state.searchData.timeTypeSearch,
  44. startTime: this.state.searchData.releaseDate[0],
  45. endTime: this.state.searchData.releaseDate[1],
  46. salesmanName: this.state.searchData.salesmanNameSearch,
  47. complete: this.state.searchData.completeSearch || 1,
  48. deps: this.state.searchData.deps,
  49. orderNo: this.state.searchData.orderNoSearch,
  50. contractNo: this.state.searchData.contractNoSearch,
  51. type: this.state.searchData.changeSearch
  52. },
  53. success: function (data) {
  54. ShowModal(this);
  55. let theArr = [];
  56. if (data.error.length || data.data.list == "") {
  57. if (data.error && data.error.length) {
  58. message.warning(data.error[0].message);
  59. }
  60. } else {
  61. for (let i = 0; i < data.data.list.length; i++) {
  62. let thisdata = data.data.list[i];
  63. theArr.push({
  64. key: i,
  65. orderNo: thisdata.orderNo,
  66. createTimes: thisdata.createTimes,
  67. nickname: thisdata.nickname,
  68. orderType: thisdata.orderType,
  69. establishTimes: thisdata.establishTimes,
  70. orderStatus: thisdata.orderStatus,
  71. totalAmount: thisdata.totalAmount,
  72. settlementAmount: thisdata.settlementAmount,
  73. arrears: thisdata.arrears,
  74. salesmanName: thisdata.salesmanName,
  75. depName: thisdata.depName,
  76. processState: thisdata.processState,
  77. type: thisdata.type,
  78. status: thisdata.status,
  79. id: thisdata.id,
  80. contractNo: thisdata.contractNo,
  81. processStateText: getProcessStatusNew(
  82. thisdata.examineName,
  83. thisdata.processState,
  84. thisdata.status
  85. )
  86. });
  87. }
  88. this.state.pagination.total = data.data.totalCount;
  89. this.state.pagination.current = data.data.pageNo;
  90. }
  91. if (data.data && data.data.list && !data.data.list.length) {
  92. this.state.pagination.total = 0;
  93. }
  94. this.setState({
  95. dataSource: theArr,
  96. pageNo: pageNo,
  97. pagination: this.state.pagination
  98. });
  99. }.bind(this)
  100. }).always(
  101. function () {
  102. this.setState({
  103. loading: false
  104. });
  105. }.bind(this)
  106. );
  107. },
  108. getInitialState() {
  109. return {
  110. dvisible: false,
  111. page: 1,
  112. searchData: {
  113. releaseDate: []
  114. },
  115. primaryOrderData: {}, //原订单数据
  116. orderData: {}, //现订单数据
  117. pictureUrl: [],
  118. voucherUrl: [],
  119. attachment: [],
  120. declarationBatch: 1,
  121. dataInfor: {},
  122. attachmentUrl: [],
  123. //收款数据
  124. proceedsData: {},
  125. proTotal: 0,
  126. invTotal: 0,
  127. contractData: {},
  128. // 回收退票数据
  129. refundInvoice: [],
  130. RefundInvoice: [],
  131. additionalOrderData: {},
  132. paginations: false,
  133. activeKey: "a",
  134. confirmLoading: false,
  135. aloading: false,
  136. pagination: {
  137. defaultCurrent: 1,
  138. defaultPageSize: 10,
  139. showQuickJumper: true,
  140. pageSize: 10,
  141. onChange: function (page) {
  142. this.loadData(page);
  143. }.bind(this),
  144. showTotal: function (total) {
  145. return "共" + total + "条数据";
  146. }
  147. },
  148. columns: [
  149. {
  150. title: "合同编号",
  151. dataIndex: "contractNo",
  152. key: "contractNo"
  153. },
  154. {
  155. title: "订单编号",
  156. dataIndex: "orderNo",
  157. key: "orderNo"
  158. },
  159. {
  160. title: "客户名称",
  161. dataIndex: "nickname",
  162. key: "nickname",
  163. width: 150,
  164. render: (text) => {
  165. return (
  166. <Tooltip title={text}>
  167. <div
  168. // style={{
  169. // maxWidth: '150px',
  170. // overflow: 'hidden',
  171. // textOverflow: "ellipsis",
  172. // whiteSpace: 'nowrap',
  173. // }}
  174. >{text}</div>
  175. </Tooltip>
  176. )
  177. },
  178. },
  179. {
  180. title: "订单部门",
  181. dataIndex: "depName",
  182. key: "depName"
  183. },
  184. {
  185. title: "订单类型",
  186. dataIndex: "orderType",
  187. key: "orderType",
  188. render: text => {
  189. return text ? "科技项目" : "认证项目";
  190. }
  191. },
  192. {
  193. title: "下单时间",
  194. dataIndex: "establishTimes",
  195. key: "establishTimes"
  196. },
  197. {
  198. title: "订单状态",
  199. dataIndex: "orderStatus",
  200. key: "orderStatus",
  201. render: text => {
  202. return getNewOrderStatus(text);
  203. }
  204. },
  205. {
  206. title: "合同额(万元)",
  207. dataIndex: "totalAmount",
  208. key: "totalAmount"
  209. },
  210. {
  211. title: "已付额(万元)",
  212. dataIndex: "settlementAmount",
  213. key: "settlementAmount"
  214. },
  215. {
  216. title: "欠款(万元)",
  217. dataIndex: "arrears",
  218. key: "arrears"
  219. },
  220. {
  221. title: "订单负责人",
  222. dataIndex: "salesmanName",
  223. key: "salesmanName"
  224. },
  225. {
  226. title: "变更类型",
  227. dataIndex: "type",
  228. key: "type",
  229. render: text => {
  230. return getType(text);
  231. }
  232. },
  233. {
  234. title: "审核状态",
  235. dataIndex: "processStateText",
  236. key: "processStateText"
  237. },
  238. {
  239. title: "提交时间",
  240. dataIndex: "createTimes",
  241. key: "createTimes"
  242. }
  243. ],
  244. dataSource: [],
  245. // 传递给子组件的
  246. dataProps: [],
  247. columnsX: [
  248. {
  249. title: "业务项目名称",
  250. dataIndex: "commodityName",
  251. key: "commodityName",
  252. render: (text, record) => {
  253. return (
  254. <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
  255. )
  256. }
  257. },
  258. {
  259. title: "项目类别",
  260. dataIndex: "cname",
  261. key: "cname"
  262. },
  263. {
  264. title: "项目数量",
  265. dataIndex: "commodityQuantity",
  266. key: "commodityQuantity"
  267. },
  268. {
  269. title: "金额(万元)",
  270. dataIndex: "commodityPrice",
  271. key: "commodityPrice"
  272. },
  273. {
  274. title: "负责人",
  275. dataIndex: "contacts",
  276. key: "contacts"
  277. },
  278. {
  279. title: "负责人电话",
  280. dataIndex: "contactsMobile",
  281. key: "contactsMobile"
  282. },
  283. {
  284. title: "项目状态",
  285. dataIndex: "projectStatus",
  286. key: "projectStatus",
  287. render: text => {
  288. return getProjectName(text);
  289. }
  290. },
  291. {
  292. title: "主要项目",
  293. dataIndex: "main",
  294. key: "main",
  295. render: text => {
  296. return text ? "是" : "否";
  297. }
  298. },
  299. {
  300. title: "总年限",
  301. dataIndex: "yearSum",
  302. key: "yearSum",
  303. render: (text, record) => {
  304. return (
  305. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  306. );
  307. }
  308. },
  309. {
  310. title: "年限",
  311. dataIndex: "serviceLife",
  312. key: "serviceLife",
  313. render: (text, record) => {
  314. return (
  315. <div>{!!text && JSON.parse(text).toString()}</div>
  316. );
  317. }
  318. },
  319. {
  320. title: "本次派单",
  321. dataIndex: "serviceYear",
  322. key: "serviceYear",
  323. render: (text, record) => {
  324. return (
  325. <div>{!text ? "" : text}</div>
  326. );
  327. }
  328. },
  329. {
  330. title: "项目说明",
  331. dataIndex: "taskComment",
  332. key: "taskComment",
  333. render: text => {
  334. return (
  335. <Tooltip title={text}>
  336. <div
  337. style={{
  338. width: 100,
  339. overflow: "hidden",
  340. whiteSpace: "nowrap",
  341. textOverflow: "ellipsis",
  342. }}
  343. >{text}</div>
  344. </Tooltip>
  345. )
  346. }
  347. }
  348. ],
  349. // 子组件改变的表格title数组
  350. changeList: undefined,
  351. columnsrizhi: [
  352. {
  353. title: "流程",
  354. dataIndex: "processName",
  355. key: "processName"
  356. },
  357. {
  358. title: "操作人",
  359. dataIndex: "adminName",
  360. key: "adminName"
  361. },
  362. {
  363. title: "时间",
  364. dataIndex: "createDate",
  365. key: "createDate"
  366. }
  367. ],
  368. dataSourceX: [],
  369. ContactsLists: [
  370. {
  371. title: "催款科目",
  372. dataIndex: "dunSubject",
  373. key: "dunSubject",
  374. render: text => {
  375. return getjiedian(text);
  376. }
  377. },
  378. {
  379. title: "金额(万元)",
  380. dataIndex: "money",
  381. key: "money"
  382. },
  383. {
  384. title: "催款状态",
  385. dataIndex: "dunStatus",
  386. key: "dunStatus",
  387. render: text => {
  388. return getCuikuan(text);
  389. }
  390. }
  391. ]
  392. };
  393. },
  394. departmentList() {
  395. this.setState({
  396. loading: true
  397. });
  398. $.ajax({
  399. method: "get",
  400. dataType: "json",
  401. crossDomain: false,
  402. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  403. data: {},
  404. success: function (data) {
  405. let thedata = data.data;
  406. let theArr = [];
  407. if (!thedata) {
  408. if (data.error && data.error.length) {
  409. message.warning(data.error[0].message);
  410. }
  411. } else {
  412. thedata.map(function (item, index) {
  413. theArr.push({
  414. key: index,
  415. name: item.name,
  416. id: item.id
  417. });
  418. });
  419. }
  420. this.setState({
  421. departmentArr: theArr
  422. });
  423. }.bind(this)
  424. }).always(
  425. function () {
  426. this.setState({
  427. loading: false
  428. });
  429. }.bind(this)
  430. );
  431. },
  432. //页面加载函数
  433. componentWillMount() {
  434. this.loadData();
  435. },
  436. //整行点击
  437. tableRowClick(record) {
  438. this.setState(
  439. {
  440. visible: true,
  441. type: record.type,
  442. status: record.status,
  443. buttonStatus: true,
  444. orderStatus: record.orderStatus,
  445. processStateText: record.processStateText,
  446. id: record.id,
  447. orderNo: record.orderNo
  448. },
  449. () => {
  450. this.xiangqing(record.orderNo);
  451. this.xiangmu(record.orderNo);
  452. this.jiedian(record.orderNo);
  453. this.jiedianNew(record.orderNo);
  454. this.createTabs();
  455. }
  456. );
  457. },
  458. //点击打卡项目详情
  459. tableRowClickX(record) {
  460. this.setState({
  461. jid: record.id, //项目ID
  462. kid: record.commodityId, //商品ID
  463. commodityName: record.commodityName, //金额
  464. commodityPrice: record.commodityPrice, //金额
  465. commodityQuantity: record.commodityQuantity, //数量
  466. taskComment: record.taskComment, //备注
  467. main: record.main.toString(), //是否为主要
  468. addnextVisible: true,
  469. dataInfor: record,
  470. addState: 0
  471. });
  472. },
  473. //项目详情关闭
  474. nextCancel() {
  475. this.setState({
  476. addnextVisible: false
  477. });
  478. },
  479. // 合同变更详情
  480. ChangeDetail(id) {
  481. let url = window.location.href.substring(7);
  482. $.ajax({
  483. method: "get",
  484. dataType: "json",
  485. crossDomain: false,
  486. url:
  487. globalConfig.context +
  488. "/api/admin/orderChange/orderChangeDetailsById",
  489. data: {
  490. id: id
  491. },
  492. success: function (data) {
  493. if (data.data) {
  494. let thisdata = data.data;
  495. Object.assign(thisdata, {
  496. processStateText: this.state.processStateText,
  497. userName: this.state.userName,
  498. contractNo: this.state.contractNo
  499. });
  500. this.setState({
  501. contractData: thisdata,
  502. voucherUrl: thisdata.voucherUrl
  503. ? splitUrl(
  504. thisdata.voucherUrl,
  505. ",",
  506. globalConfig.avatarHost + "/upload",
  507. url
  508. )
  509. : [],
  510. attachment: thisdata.attachmentUrl
  511. ? splitUrl(
  512. thisdata.attachmentUrl,
  513. ",",
  514. globalConfig.avatarHost + "/upload",
  515. url
  516. )
  517. : [],
  518. contractPictureUrl: thisdata.contractPictureUrl
  519. ? splitUrl(
  520. thisdata.contractPictureUrl,
  521. ",",
  522. globalConfig.avatarHost + "/upload",
  523. url
  524. )
  525. : []
  526. });
  527. }
  528. }.bind(this)
  529. });
  530. $.ajax({
  531. method: "get",
  532. dataType: "json",
  533. crossDomain: false,
  534. url:
  535. globalConfig.context +
  536. "/api/admin/orderChange/listOrderInvoiceAndBill",
  537. data: {
  538. orderNo: this.state.orderNo
  539. },
  540. success: function (data) {
  541. if (!data.data) return;
  542. let proTotal = 0;
  543. let invTotal = 0;
  544. data.data.bill.forEach(item => {
  545. proTotal += item.transactionAmount;
  546. });
  547. data.data.invoice.forEach(item => {
  548. invTotal += item.amount;
  549. });
  550. this.setState({
  551. proceedsData: data.data,
  552. proTotal: (Math.round(proTotal * 1000000) / 1000000).toFixed(6),
  553. invTotal: (Math.round(invTotal * 1000000) / 1000000).toFixed(6),
  554. });
  555. }.bind(this)
  556. });
  557. $.ajax({
  558. method: "get",
  559. dataType: "json",
  560. crossDomain: false,
  561. url:
  562. globalConfig.context +
  563. "/api/admin/orderChange/listOrderRefundInvoice",
  564. data: {
  565. orderNo: this.state.orderNo
  566. },
  567. success: data => {
  568. if (!data) return;
  569. data.data.forEach(item => {
  570. item.load = true;
  571. });
  572. this.setState({
  573. refundInvoice: data.data
  574. });
  575. }
  576. });
  577. },
  578. //订单详情
  579. xiangqing(orderNos) {
  580. $.ajax({
  581. method: "get",
  582. dataType: "json",
  583. crossDomain: false,
  584. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  585. data: {
  586. orderNo: orderNos
  587. },
  588. success: function (data) {
  589. if (data.error.length || data.data.list == "") {
  590. if (data.error && data.error.length) {
  591. message.warning(data.error[0].message);
  592. }
  593. } else {
  594. let thisdata = data.data;
  595. this.setState({
  596. userName: thisdata.userName,
  597. primaryOrderNo: thisdata.primaryOrder,
  598. additionalOrder: thisdata.additionalOrder,
  599. contractNo: thisdata.contractNo,
  600. // arrears: thisdata.arrears,
  601. orderData: thisdata,
  602. isAddition: thisdata.additionalOrder ? true : false,
  603. contractPictureUrl: thisdata.contractPictureUrl
  604. ? splitUrl(
  605. thisdata.contractPictureUrl,
  606. ",",
  607. globalConfig.avatarHost + "/upload"
  608. )
  609. : [],
  610. replenishUrl: thisdata.agreementUrl
  611. ? splitUrl(
  612. thisdata.agreementUrl,
  613. ",",
  614. globalConfig.avatarHost + "/upload"
  615. )
  616. : [],
  617. });
  618. // console.log(thisdata.contractPictureUrl);
  619. }
  620. }.bind(this)
  621. });
  622. },
  623. // 原订单数据
  624. primaryOrder(primaryOrder) {
  625. $.ajax({
  626. method: "get",
  627. dataType: "json",
  628. crossDomain: false,
  629. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  630. data: {
  631. orderNo: primaryOrder
  632. },
  633. success: function (data) {
  634. if (data.error.length || data.data.list == "") {
  635. if (data.error && data.error.length) {
  636. message.warning(data.error[0].message);
  637. }
  638. } else {
  639. let thisdata = data.data;
  640. this.setState({
  641. primaryOrderData: thisdata
  642. });
  643. }
  644. }.bind(this)
  645. });
  646. },
  647. // 附加订单数据
  648. additionalOrder(additionalOrder) {
  649. $.ajax({
  650. method: "get",
  651. dataType: "json",
  652. crossDomain: false,
  653. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  654. data: {
  655. orderNo: additionalOrder
  656. },
  657. success: function (data) {
  658. if (data.error.length || data.data.list == "") {
  659. if (data.error && data.error.length) {
  660. message.warning(data.error[0].message);
  661. }
  662. } else {
  663. let thisdata = data.data;
  664. this.setState({
  665. additionalOrderData: thisdata
  666. });
  667. }
  668. }.bind(this)
  669. });
  670. },
  671. //项目列表
  672. xiangmu(orderNos) {
  673. $.ajax({
  674. method: "get",
  675. dataType: "json",
  676. crossDomain: false,
  677. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  678. data: {
  679. orderNo: orderNos
  680. },
  681. success: function (data) {
  682. let theArr = [];
  683. if (data.error.length || data.data.list == "") {
  684. if (data.error && data.error.length) {
  685. message.warning(data.error[0].message);
  686. }
  687. } else {
  688. for (let i = 0; i < data.data.length; i++) {
  689. let thisdata = data.data[i];
  690. thisdata.key = i;
  691. thisdata.sort = thisdata.cSort;
  692. theArr.push(thisdata);
  693. }
  694. }
  695. this.setState({
  696. dataSourceX: theArr
  697. });
  698. }.bind(this)
  699. });
  700. },
  701. // 查看收款金额
  702. getProceeds(id) {
  703. $.ajax({
  704. method: "get",
  705. dataType: "json",
  706. crossDomain: false,
  707. url:
  708. globalConfig.context +
  709. "/api/admin/orderChange/orderChangeDetailsById",
  710. data: {
  711. id: id
  712. },
  713. success: function (data) {
  714. if (data.error.length || data.data.list == "") {
  715. if (data.error && data.error.length) {
  716. message.warning(data.error[0].message);
  717. }
  718. } else {
  719. // let thisdata = data.data;
  720. }
  721. }.bind(this)
  722. });
  723. },
  724. search(obj) {
  725. this.setState({
  726. searchData: obj
  727. }, () => {
  728. this.loadData(1);
  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. visible: false
  1198. });
  1199. this.loadData(this.state.pageNo);
  1200. },
  1201. visitOk() {
  1202. this.setState({
  1203. visible: false
  1204. });
  1205. },
  1206. changeList(arr) {
  1207. const newArr = [];
  1208. this.state.columns.forEach(item => {
  1209. arr.forEach(val => {
  1210. if (val === item.title) {
  1211. newArr.push(item);
  1212. }
  1213. });
  1214. });
  1215. this.setState({
  1216. changeList: newArr
  1217. });
  1218. },
  1219. printAll() {
  1220. this.setState({
  1221. dvisible: true
  1222. // loading: true
  1223. });
  1224. this.state.pagination.pageSize = 9999999;
  1225. this.setState({
  1226. pagination: this.state.pagination
  1227. });
  1228. this.loadData();
  1229. },
  1230. exportAll() {
  1231. window.location.href =
  1232. globalConfig.context +
  1233. "/api/admin/orderChange/exportMyChange?" +
  1234. `orderNo=${this.state.searchData.orderNoSearch
  1235. ? this.state.searchData.orderNoSearch
  1236. : ""
  1237. }&processState=${this.props.processState ? this.props.processState : ""
  1238. }&userName=${this.state.searchData.userNameSearch
  1239. ? this.state.searchData.userNameSearch
  1240. : ""
  1241. }&contractNo=${this.state.searchData.contractNoSearch
  1242. ? this.state.searchData.contractNoSearch
  1243. : ""
  1244. }
  1245. &timeType=${this.state.searchData.timeTypeSearch
  1246. ? this.state.searchData.timeTypeSearch
  1247. : ""
  1248. }
  1249. &startTime=${this.state.searchData.releaseDate[0]
  1250. ? this.state.searchData.releaseDate[0]
  1251. : ""
  1252. }
  1253. &endTime=${this.state.searchData.releaseDate[1]
  1254. ? this.state.searchData.releaseDate[1]
  1255. : ""
  1256. }
  1257. &salesmanName=${this.state.searchData.salesmanNameSearch
  1258. ? this.state.searchData.salesmanNameSearch
  1259. : ""
  1260. }
  1261. &complete=${this.state.searchData.completeSearch || 1}
  1262. &depId=${this.state.searchData.depIdSearch
  1263. ? this.state.searchData.depIdSearch
  1264. : ""
  1265. }
  1266. &type=${this.state.searchData.changeSearch
  1267. ? this.state.searchData.changeSearch
  1268. : ""
  1269. }`;
  1270. },
  1271. createTabs() {
  1272. $.ajax({
  1273. url: globalConfig.context + "/api/admin/orderChange/getOrderChange",
  1274. method: "get",
  1275. data: {
  1276. orderNo: this.state.orderNo
  1277. },
  1278. success: data => {
  1279. if (data.error && data.error.length) {
  1280. message.warning(data.error[0].message);
  1281. } else {
  1282. this.setState({
  1283. tabList: data.data
  1284. });
  1285. }
  1286. }
  1287. });
  1288. },
  1289. render() {
  1290. const tabList = this.state.tabList || [];
  1291. const formItemLayout = {
  1292. labelCol: { span: 8 },
  1293. wrapperCol: { span: 14 }
  1294. };
  1295. const FormItem = Form.Item;
  1296. const { TabPane } = Tabs;
  1297. const departmentArr = this.state.departmentArr || [];
  1298. return (
  1299. <div className="user-content" style={{ position: "relative" }}>
  1300. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  1301. <div className="content-title" style={{ marginBottom: 10 }}>
  1302. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1303. 合同变更查看订单
  1304. </span>
  1305. </div>
  1306. <div className="user-search">
  1307. {/* <SearchInput search={this.search} /> */}
  1308. {/* <ChooseList
  1309. columns={this.state.columns}
  1310. changeFn={this.changeList}
  1311. changeList={this.state.changeList}
  1312. top={55}
  1313. /> */}
  1314. <Tabs defaultActiveKey="2" className="test">
  1315. <TabPane tab="搜索" key="2">
  1316. <div style={{ marginLeft: 10 }}>
  1317. <SearchInput search={this.search} />
  1318. </div>
  1319. </TabPane>
  1320. <TabPane tab="打印" key="3">
  1321. <Button
  1322. type="primary"
  1323. style={{ margin: "11px 0px 10px 10px" }}
  1324. onClick={this.printAll}
  1325. disabled={!this.state.dataSource.length}
  1326. >
  1327. 打印所有列表信息
  1328. </Button>
  1329. </TabPane>
  1330. <TabPane tab="导出Excel" key="4">
  1331. <Button
  1332. type="primary"
  1333. style={{ margin: "11px 0px 10px 10px" }}
  1334. onClick={this.exportAll}
  1335. >
  1336. 导出当前列表
  1337. </Button>
  1338. </TabPane>
  1339. <TabPane tab="更改表格显示数据" key="1">
  1340. <div style={{ marginLeft: 10 }}>
  1341. <ChooseList
  1342. columns={this.state.columns}
  1343. changeFn={this.changeList}
  1344. changeList={this.state.changeList}
  1345. top={55}
  1346. margin={11}
  1347. />
  1348. </div>
  1349. </TabPane>
  1350. {/* <TabPane tab="批量操作" key="6">
  1351. <Button
  1352. type="primary"
  1353. disabled={this.state.selectedRowKeys.length == 0}
  1354. style={{ margin: "0px 0px 10px 10px" }}
  1355. onClick={e => {
  1356. e.stopPropagation(),
  1357. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1358. }}
  1359. >
  1360. 转交
  1361. </Button>
  1362. </TabPane> */}
  1363. </Tabs>
  1364. <div className="patent-table">
  1365. <Spin spinning={this.state.loading}>
  1366. <Table
  1367. bordered
  1368. columns={
  1369. this.state.changeList == undefined
  1370. ? this.state.columns
  1371. : this.state.changeList
  1372. }
  1373. scroll={{ x: "max-content", y: 0 }}
  1374. dataSource={this.state.dataSource}
  1375. pagination={this.state.pagination}
  1376. onRowClick={this.tableRowClick}
  1377. // scroll={{ y: 140 }}
  1378. size="small"
  1379. />
  1380. </Spin>
  1381. </div>
  1382. {
  1383. this.state.visible &&
  1384. <Modal
  1385. className="customeDetails"
  1386. footer=""
  1387. maskClosable={false}
  1388. width="1200px"
  1389. visible={this.state.visible}
  1390. onOk={this.visitOk}
  1391. onCancel={this.visitCancel}
  1392. >
  1393. <Tabs
  1394. activeKey={this.state.activeKey}
  1395. onChange={this.callback}
  1396. type="card"
  1397. >
  1398. <TabPane tab="订单详情" key="a">
  1399. <Form
  1400. layout="horizontal"
  1401. onSubmit={this.handleSubmit}
  1402. id="demand-form"
  1403. style={{ paddingBottom: "40px" }}
  1404. >
  1405. <Spin spinning={this.state.loading}>
  1406. {
  1407. this.state.activeKey == "a" &&
  1408. <OrderDetail
  1409. domId='dindanxiangqing'
  1410. orderData={this.state.orderData}
  1411. getOrderLog={this.getOrderLog}
  1412. dataSourceX={this.state.dataSourceX}
  1413. contactList={this.state.contactList}
  1414. orderNo={this.state.orderNo}
  1415. totalCui={this.state.totalCui}
  1416. contactListNew={this.state.contactListNew}
  1417. pictureUrl={this.state.contractPictureUrl}
  1418. isCaiWu={true}
  1419. />
  1420. }
  1421. </Spin>
  1422. </Form>
  1423. </TabPane>
  1424. {tabList.map((item, index, arr) => {
  1425. return (
  1426. <TabPane tab={"合同变更记录" + (tabList.length - index)} key={item.id}>
  1427. {
  1428. this.state.activeKey === String(item.id) &&
  1429. <ChangeDetail
  1430. domId={'changeDetail' + (index + 1)}
  1431. id={item.id}
  1432. money={
  1433. index == arr.length - 1
  1434. ? this.state.orderData.totalAmount + ""
  1435. : undefined
  1436. }
  1437. data={this.state.contractData}
  1438. // loadData={this.ChangeDetail}
  1439. txt={this.state.processStateText}
  1440. pictureUrl={this.state.voucherUrl}
  1441. contractPictureUrl={this.state.contractPictureUrl}
  1442. attachment={this.state.attachment}
  1443. processState={this.props.processState}
  1444. loadData={this.callback}
  1445. reset={this.state.visible}
  1446. dataSource={this.state.dataProps}
  1447. proceedsData={this.state.proceedsData}
  1448. proceedsTotal={this.state.proTotal}
  1449. invoiceTotal={this.state.invTotal}
  1450. contactList={this.state.refundInvoice}
  1451. onCancel={this.visitCancel}
  1452. />
  1453. }
  1454. </TabPane>
  1455. );
  1456. })}
  1457. {tabList.map((item, index) => {
  1458. if (item.usedOrder) {
  1459. return (
  1460. <TabPane
  1461. tab={"原订单" + (tabList.length - index)}
  1462. key={item.usedOrder}
  1463. >
  1464. {
  1465. this.state.activeKey == item.usedOrder &&
  1466. <Form
  1467. layout="horizontal"
  1468. onSubmit={this.handleSubmit}
  1469. id="demand-form"
  1470. style={{ paddingBottom: "40px" }}
  1471. >
  1472. <Spin spinning={this.state.loading}>
  1473. <OrderDetail
  1474. domId={'yuandingdan' + (index + 1)}
  1475. orderData={this.state.primaryOrderData}
  1476. getOrderLog={this.getOrderLog}
  1477. dataSourceX={this.state.dataSourceX}
  1478. contactList={this.state.contactList}
  1479. orderNo={this.state.primaryOrderNo}
  1480. totalCui={this.state.totalCui}
  1481. contactListNew={this.state.contactListNew}
  1482. isCaiWu={true}
  1483. />
  1484. </Spin>
  1485. </Form>
  1486. }
  1487. </TabPane>
  1488. );
  1489. } else {
  1490. return "";
  1491. }
  1492. })}
  1493. {this.state.status === 4 && this.state.isAddition ? (
  1494. this.state.type === 4 || this.state.type === 5 ? (
  1495. <TabPane tab="附加订单" key="c">
  1496. <OrderDetail
  1497. domId='fujiadingdan'
  1498. orderData={this.state.additionalOrderData}
  1499. getOrderLog={this.getOrderLog}
  1500. dataSourceX={this.state.dataSourceX}
  1501. contactList={this.state.contactList}
  1502. totalCui={this.state.totalCui}
  1503. contactListNew={this.state.contactListNew}
  1504. orderNo={this.state.additionalOrder}
  1505. isCaiWu={true}
  1506. />
  1507. </TabPane>
  1508. ) : (
  1509. ""
  1510. )
  1511. ) : (
  1512. ""
  1513. )}
  1514. </Tabs>
  1515. </Modal>
  1516. }
  1517. <Modal
  1518. maskClosable={false}
  1519. visible={this.state.noVisible}
  1520. onOk={this.handleOk}
  1521. onCancel={this.noCancel}
  1522. width="400px"
  1523. title={"拒绝理由"}
  1524. footer=""
  1525. className="admin-desc-content"
  1526. confirmLoading={this.state.confirmLoading}
  1527. >
  1528. <Form layout="horizontal" id="demand-form">
  1529. <Spin spinning={this.state.loading}>
  1530. <div className="clearfix">
  1531. <FormItem
  1532. labelCol={{ span: 4 }}
  1533. wrapperCol={{ span: 16 }}
  1534. label="拒绝理由"
  1535. >
  1536. <Input
  1537. type="textarea"
  1538. placeholder="请输入拒绝理由"
  1539. rows={4}
  1540. value={this.state.reason}
  1541. onChange={(e) => {
  1542. this.setState({ reason: e.target.value });
  1543. }}
  1544. />
  1545. </FormItem>
  1546. </div>
  1547. <div className="clearfix">
  1548. <Button
  1549. className="cancel"
  1550. type="primary"
  1551. onClick={this.examOks}
  1552. style={{ marginLeft: "50px" }}
  1553. htmlType="submit"
  1554. loading={this.state.aloading}
  1555. >
  1556. 确定
  1557. </Button>
  1558. <Button
  1559. className="cancel"
  1560. type="ghost"
  1561. onClick={this.noCancel}
  1562. style={{ marginLeft: "50px" }}
  1563. >
  1564. 取消
  1565. </Button>
  1566. </div>
  1567. </Spin>
  1568. </Form>
  1569. </Modal>
  1570. {/* <Modal
  1571. visible={this.state.rizhivisible}
  1572. className="admin-desc-content"
  1573. width="800px"
  1574. maskClosable={false}
  1575. title="订单日志"
  1576. footer={null}
  1577. onCancel={this.closeOrderLog}
  1578. >
  1579. <div className="patent-table">
  1580. <Spin spinning={this.state.loading}>
  1581. <Table
  1582. bordered
  1583. columns={this.state.columnsrizhi}
  1584. dataSource={this.state.dataSourcerizhi}
  1585. pagination={false}
  1586. />
  1587. </Spin>
  1588. </div>
  1589. </Modal> */}
  1590. <OrderRiZi
  1591. dataSourcerizhi={this.state.dataSourcerizhi}
  1592. closeOrderLog={this.closeOrderLog}
  1593. visible={this.state.rizhivisible}
  1594. loading={this.state.loading}
  1595. />
  1596. <Modal
  1597. visible={this.state.dvisible}
  1598. footer=""
  1599. title="所有列表信息"
  1600. className="admin-desc-content"
  1601. width="1300px"
  1602. onCancel={() => {
  1603. this.setState({
  1604. dvisible: false,
  1605. });
  1606. this.state.pagination.pageSize = 10;
  1607. this.setState({
  1608. pagination: this.state.pagination,
  1609. });
  1610. this.loadData();
  1611. }}
  1612. >
  1613. <Spin spinning={this.state.loading}>
  1614. <div
  1615. className="patent-table"
  1616. style={{
  1617. // width: 900,
  1618. // position: "relative",
  1619. // left: "50%",
  1620. // transform: "translate(-50%)",
  1621. padding: "25px 30px 30px 30px",
  1622. }}
  1623. ref={(e) => {
  1624. this.refs.all = e;
  1625. }}
  1626. >
  1627. <Table
  1628. columns={this.state.columns}
  1629. dataSource={this.state.dataSource}
  1630. pagination={false}
  1631. bordered
  1632. size="small"
  1633. />
  1634. </div>
  1635. </Spin>
  1636. <ReactToPrint
  1637. trigger={() => (
  1638. <Button
  1639. type="primary"
  1640. style={{
  1641. float: "right",
  1642. marginTop: 10,
  1643. position: "absolute",
  1644. top: 0,
  1645. right: 30,
  1646. }}
  1647. >
  1648. 打印
  1649. </Button>
  1650. )}
  1651. content={() => this.refs.all}
  1652. />
  1653. </Modal>
  1654. </div>
  1655. {/* {this.state.addnextVisible && <ProjectDetailsReadOnly
  1656. infor={this.state.dataInfor}
  1657. visible={this.state.addnextVisible}
  1658. onCancel={this.nextCancel}
  1659. />} */}
  1660. {
  1661. // 项目业务详情
  1662. this.state.addnextVisible &&
  1663. <NewEditProject
  1664. readOnly={true}
  1665. visible={this.state.addnextVisible}
  1666. dataInfor={this.state.dataInfor}
  1667. onCancel={this.nextCancel}
  1668. />
  1669. }
  1670. </div>
  1671. );
  1672. }
  1673. })
  1674. );
  1675. export default contractChange;