contractCwjl.js 51 KB

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