contractCwzy.js 50 KB

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