contractCwzy.js 51 KB

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