contractCwzy.js 50 KB

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