contractCwjl.js 51 KB

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