changeDetailYxgly.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. import React, { Component } from "react";
  2. import {Form, Upload, Modal, Button, message, Input, Table, Tooltip} from "antd";
  3. import AgreeButton from "./agreeButton.js";
  4. import Rizhi from "./rizhi.js";
  5. import { getProcessStatusNew } from "../../../../tools.js";
  6. import { shenghePeo, changeColor } from "@/tools.js";
  7. import $ from "jquery/src/ajax";
  8. import tongguo from "../../../../../../image/tongguo.png";
  9. import quxiao from "../../../../../../image/quxiao.png";
  10. import ProAndCuiList from "./proAndCuiList.jsx";
  11. import ReactToPrint from "react-to-print";
  12. const FormItem = Form.Item;
  13. import Refund from "./refund.js"
  14. import ImgList from "../../../../common/imgList/index";
  15. import EnterpriseNameChange from "../../../../common/enterpriseNameChange";
  16. const { TextArea } = Input;
  17. const formItemLayout = {
  18. labelCol: { span: 8 },
  19. wrapperCol: { span: 14 }
  20. };
  21. const changeType = [
  22. {
  23. value: "0",
  24. key: "退单退款"
  25. },
  26. {
  27. value: "1",
  28. key: "项目及金额变更"
  29. },
  30. {
  31. value: "2",
  32. key: "仅项目变更"
  33. },
  34. {
  35. value: "3",
  36. key: "仅金额变更"
  37. },
  38. {
  39. value: "4",
  40. key: "重报"
  41. },
  42. {
  43. value: "5",
  44. key: "赠送"
  45. }
  46. ];
  47. const getChangeType = function (e) {
  48. if (e || e == 0) {
  49. let str = e.toString();
  50. let theType = "";
  51. changeType.map(function (item) {
  52. if (item.value == str) {
  53. theType = item.key;
  54. }
  55. });
  56. return theType;
  57. }
  58. };
  59. class Itemlist extends Component {
  60. constructor(props) {
  61. super(props);
  62. }
  63. render() {
  64. let pageData = this.props.pageData;
  65. return (
  66. <div className="clearfix">
  67. {pageData.labelA === '客户名称' ? <Form.Item
  68. label={pageData.labelA}
  69. {...pageData.formItemLayoutA}
  70. className="half-item"
  71. >
  72. <div>
  73. {pageData.dataA}
  74. <EnterpriseNameChange
  75. type='journal'
  76. style={{ marginLeft: 10 }}
  77. enterpriseId={this.props.orderUid}/>
  78. </div>
  79. </Form.Item> : pageData.labelA !== '当前进度' ? <Form.Item
  80. label={pageData.labelA}
  81. {...pageData.formItemLayoutA}
  82. className="half-item"
  83. >
  84. <div>{pageData.dataA}</div>
  85. </Form.Item> :
  86. <Form.Item
  87. label={pageData.labelA}
  88. {...pageData.formItemLayoutA}
  89. className="half-item"
  90. >
  91. <Tooltip placement="topLeft" title={pageData.dataA}>
  92. <div style={{
  93. width: '350px !important',
  94. whiteSpace: 'nowrap',
  95. wordBreak: 'break-all',
  96. overflow: 'hidden',
  97. textOverflow: 'ellipsis',
  98. }}>{pageData.dataA}</div>
  99. </Tooltip>
  100. </Form.Item>}
  101. <Form.Item
  102. label={pageData.labelB}
  103. {...pageData.formItemLayoutB}
  104. className="half-item"
  105. >
  106. <span>{pageData.dataB}</span>
  107. </Form.Item>
  108. </div>
  109. );
  110. }
  111. }
  112. class ChangeDetail extends Component {
  113. constructor(props) {
  114. super(props);
  115. this.state = {
  116. rotateDeg: 0,
  117. previewVisible: false,
  118. buttonStatus: true,
  119. dataSource: [],
  120. reason: "",
  121. rejectState: 0,
  122. // 累计回收退票
  123. refundInvoice: 0,
  124. // 收款信息
  125. proceedsData: [],
  126. proceedsTotal: this.props.proceedsTotal,
  127. // 开票信息
  128. invoiceData: [],
  129. invoiceTotal: this.props.invoiceTotal,
  130. cost: 10,
  131. refund: 8,
  132. // 测试添加退票
  133. contactList: this.props.contactList,
  134. ContactsLists: [
  135. {
  136. title: "金额(万元)",
  137. dataIndex: "amount",
  138. key: "amount",
  139. render: (text, record) => {
  140. return (
  141. <div>
  142. 实际回收退票(万元)
  143. <Input
  144. value={record.amount}
  145. placeholder="请输入金额(必填项)"
  146. disabled={record.load}
  147. key={record.id}
  148. required="required"
  149. onChange={(e) => {
  150. record.amount = e.target.value;
  151. this.setState({ contactList: this.state.contactList });
  152. }}
  153. style={{ width: "120px" }}
  154. />
  155. </div>
  156. );
  157. },
  158. },
  159. {
  160. title: "时间",
  161. dataIndex: "createTimes",
  162. key: "createTimes",
  163. render: (text, record) => {
  164. return <div>{record.createTimes}</div>;
  165. },
  166. },
  167. ],
  168. };
  169. this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
  170. this.changeButtonStatus = this.changeButtonStatus.bind(this);
  171. this.moneyOld = this.moneyOld.bind(this);
  172. this.downImg = this.downImg.bind(this);
  173. this.upImg = this.upImg.bind(this);
  174. this.rotate = this.rotate.bind(this);
  175. }
  176. // componentWillUpdate() {
  177. // this.loadDataChange();
  178. // console.log(this.props);
  179. // }
  180. // componentDidUpdate() {
  181. // this.loadDataChange();
  182. // console.log(this.props);
  183. // }
  184. // loadDataChange() {
  185. // console.log(this.props);
  186. // $.ajax({
  187. // method: "get",
  188. // dataType: "json",
  189. // crossDomain: false,
  190. // url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  191. // data: {
  192. // changeId: this.props.data.id
  193. // },
  194. // success: function(data) {
  195. // if (data.error.length || data.data.list == "") {
  196. // if (data.error && data.error.length) {
  197. // message.warning(data.error[0].message);
  198. // }
  199. // } else {
  200. // this.setState({
  201. // dataSource: data.data
  202. // });
  203. // }
  204. // }.bind(this)
  205. // });
  206. // }
  207. downImg() {
  208. let num = 0;
  209. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  210. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  211. num = i;
  212. }
  213. }
  214. if (num == this.props.pictureUrl.length - 1) {
  215. return message.warning("已经是最后一张了哦");
  216. }
  217. this.state.previewImage = this.props.pictureUrl[num + 1].url;
  218. this.setState({
  219. previewImage: this.state.previewImage,
  220. rotateDeg: 0,
  221. });
  222. }
  223. upImg() {
  224. let num = 0;
  225. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  226. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  227. num = i;
  228. }
  229. }
  230. if (num == 0) {
  231. return message.warning("已经是第一张了哦");
  232. }
  233. this.state.previewImage = this.props.pictureUrl[num - 1].url;
  234. this.setState({
  235. previewImage: this.state.previewImage,
  236. rotateDeg: 0,
  237. });
  238. }
  239. rotate() {
  240. let rotateDeg = this.state.rotateDeg + 90;
  241. this.setState({
  242. rotateDeg,
  243. });
  244. }
  245. moneyOld(str, money) {
  246. if (money) {
  247. return (
  248. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>
  249. {str}(原合同金额{money}万元)
  250. </span>
  251. );
  252. } else {
  253. return (
  254. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>
  255. {str}
  256. </span>
  257. );
  258. }
  259. }
  260. componentWillReceiveProps(nextProps) {
  261. this.setState({
  262. paymentTimes: nextProps.data.paymentTimes,
  263. paymentAmount: nextProps.data.paymentAmount,
  264. invoiceTimes: nextProps.data.invoiceTimes,
  265. invoiceAmount: nextProps.data.invoiceAmount,
  266. cwCost: nextProps.data.cwCost,
  267. refundableAmount: nextProps.data.refundableAmount,
  268. cwRemarks: nextProps.data.cwRemarks,
  269. contactList: nextProps.contactList,
  270. refundInvoice: nextProps.data.refundInvoice,
  271. });
  272. }
  273. getOrgCodeUrl(e) {
  274. this.setState({
  275. orgCodeUrl: e,
  276. });
  277. }
  278. //同意拒绝按钮的有无
  279. changeButtonStatus() {
  280. this.setState({
  281. buttonStatus: !this.state.buttonStatus,
  282. });
  283. window.setTimeout(() => {
  284. this.setState({
  285. reason: "",
  286. });
  287. }, 100);
  288. }
  289. render() {
  290. const pageData = [
  291. {
  292. labelA: "客户名称",
  293. formItemLayoutA: formItemLayout,
  294. dataA: this.props.data.userName,
  295. labelB: "合同编号",
  296. formItemLayoutB: formItemLayout,
  297. dataB: this.props.data.contractNo,
  298. },
  299. {
  300. labelA: "时间",
  301. formItemLayoutA: formItemLayout,
  302. dataA: this.props.data.createTimes,
  303. labelB: "发起人",
  304. formItemLayoutB: formItemLayout,
  305. dataB: this.props.data.applicant,
  306. },
  307. {
  308. labelA: "当前进度",
  309. formItemLayoutA: formItemLayout,
  310. // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
  311. dataA:
  312. this.props.data.processState == 2 || this.props.data.processState == 3
  313. ? shenghePeo(
  314. this.props.data.processState == 2
  315. ? this.props.data.consultantExamine
  316. : this.props.data.managerExamine,
  317. this.props.data.processState
  318. )
  319. : getProcessStatusNew(
  320. this.props.data.processState,
  321. this.props.data.status
  322. ),
  323. labelB: "变更类型",
  324. formItemLayoutB: formItemLayout,
  325. dataB: getChangeType(this.props.data.type),
  326. },
  327. {
  328. labelA: "合同额(万元)",
  329. formItemLayoutA: formItemLayout,
  330. dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
  331. labelB: "已收款(万元)",
  332. formItemLayoutB: formItemLayout,
  333. dataB: changeColor(this.props.data.settlementAmount),
  334. },
  335. {
  336. labelA: "欠款(万元)",
  337. formItemLayoutA: formItemLayout,
  338. dataA: changeColor(this.props.data.arrears),
  339. labelB: "申请退款(万元)",
  340. formItemLayoutB: formItemLayout,
  341. dataB: changeColor(this.props.data.changeAmount),
  342. },
  343. {
  344. labelA: "变更原因",
  345. formItemLayoutA: formItemLayout,
  346. dataA: this.props.data.remarks,
  347. },
  348. ];
  349. const planData = [
  350. {
  351. labelA: "项目进度",
  352. formItemLayoutA: formItemLayout,
  353. dataA: this.props.data.projectState,
  354. labelB: "发生成本费用(万元)",
  355. formItemLayoutB: formItemLayout,
  356. dataB: this.props.data.zxsCost,
  357. },
  358. {
  359. labelA: "变更原因",
  360. formItemLayoutA: formItemLayout,
  361. dataA: this.props.data.zxsRemarks,
  362. },
  363. ];
  364. const financeData = [
  365. {
  366. labelA: "发生成本(万元)",
  367. formItemLayoutA: formItemLayout,
  368. dataA: this.props.data.cwCost,
  369. labelB: "应退金额(万元)",
  370. formItemLayoutB: formItemLayout,
  371. dataB: this.props.data.refundableAmount,
  372. },
  373. ];
  374. const buttonData = [
  375. {
  376. name: "同意",
  377. title: "理由",
  378. placeholder: "请输入理由",
  379. type: "primary",
  380. status: 2,
  381. onChange: (value) => {
  382. this.setState({
  383. remarks: value,
  384. });
  385. },
  386. },
  387. {
  388. name: "拒绝",
  389. title: "理由",
  390. placeholder: "请输入理由",
  391. type: "danger",
  392. status: 3,
  393. onChange: (value) => {
  394. this.setState({
  395. remarks: value,
  396. });
  397. },
  398. },
  399. ];
  400. const orgCodeUrl = this.props.pictureUrl;
  401. return (
  402. <div className="clearfix changeDetail">
  403. <div
  404. className="clearfix"
  405. ref={(e) => {
  406. this.refs = e;
  407. }}
  408. >
  409. <div
  410. style={{
  411. borderRadius: "50%",
  412. width: 300,
  413. height: 300,
  414. position: "absolute",
  415. top: 230,
  416. left: 525,
  417. transform: "rotate(-5deg)",
  418. zIndex: 1,
  419. display:
  420. (this.props.data.processState == 7 ||
  421. this.props.data.processState == 8) &&
  422. this.props.data.status == 4
  423. ? "block"
  424. : "none",
  425. }}
  426. >
  427. {/* <span
  428. style={{
  429. fontSize: 29,
  430. position: "absolute",
  431. left: "50%",
  432. top: "50%",
  433. transform: "translate(-50%,-50%)",
  434. color: "red"
  435. }}
  436. >
  437. 通过
  438. </span> */}
  439. <img src={tongguo} style={{ width: "100%" }} />
  440. </div>
  441. <div
  442. style={{
  443. borderRadius: "50%",
  444. width: 300,
  445. height: 300,
  446. position: "absolute",
  447. top: 284,
  448. left: 586,
  449. transform: "rotate(-5deg)",
  450. zIndex: 1,
  451. display: this.props.data.status == 5 ? "block" : "none",
  452. }}
  453. >
  454. <img src={quxiao} style={{ width: "63%" }} />
  455. </div>
  456. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  457. 合同变更记录
  458. </h2>
  459. {pageData.map((item, index) => {
  460. return <Itemlist orderUid={this.props.orderUid} key={index} pageData={item} />;
  461. })}
  462. <Form.Item
  463. label="变更凭证"
  464. labelCol={{ span: 4 }}
  465. wrapperCol={{ span: 18 }}
  466. >
  467. {/*<Upload*/}
  468. {/* className="demandDetailShow-upload"*/}
  469. {/* listType="picture-card"*/}
  470. {/* fileList={orgCodeUrl}*/}
  471. {/* onPreview={(file) => {*/}
  472. {/* this.setState({*/}
  473. {/* previewImage: file.url || file.thumbUrl,*/}
  474. {/* previewVisible: true,*/}
  475. {/* });*/}
  476. {/* }}*/}
  477. {/*/>*/}
  478. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  479. <ImgList fileList={orgCodeUrl} ItemWidth={'96px'}/>
  480. </div>
  481. <Modal
  482. maskClosable={false}
  483. footer={null}
  484. width={"50%"}
  485. visible={this.state.previewVisible}
  486. onCancel={() => {
  487. this.setState({ previewVisible: false, rotateDeg: 0 });
  488. }}
  489. >
  490. <img
  491. alt=""
  492. style={{
  493. width: "100%",
  494. transform: `rotate(${this.state.rotateDeg}deg)`,
  495. }}
  496. src={this.state.previewImage || ""}
  497. />
  498. <Button
  499. onClick={this.rotate}
  500. style={{
  501. position: "relative",
  502. left: "50%",
  503. transform: "translateX(-50%)",
  504. }}
  505. >
  506. 旋转
  507. </Button>
  508. <Button
  509. onClick={this.upImg}
  510. style={{
  511. position: "absolute",
  512. left: -81,
  513. top: "50%",
  514. transform: "translateY(-50%)",
  515. }}
  516. >
  517. 上一张
  518. </Button>
  519. <Button
  520. onClick={this.downImg}
  521. style={{
  522. position: "absolute",
  523. right: -81,
  524. top: "50%",
  525. transform: "translateY(-50%)",
  526. }}
  527. >
  528. 下一张
  529. </Button>
  530. </Modal>
  531. <Rizhi changeId={this.props.id} />
  532. </Form.Item>
  533. {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
  534. <ul
  535. style={{
  536. width: "868px",
  537. overflow: "hidden",
  538. paddingLeft: "90px",
  539. position: "relative",
  540. }}
  541. >
  542. {/* <span>操作人:</span> */}
  543. {this.props.dataSource.map((item, index) => {
  544. if (item.status == 0) {
  545. item.status = "发起";
  546. } else if (item.status == 1) {
  547. item.status = "审核中";
  548. } else if (item.status == 2) {
  549. item.status = "通过";
  550. } else if (item.status == 3) {
  551. item.status = "驳回";
  552. } else if (item.status == 4) {
  553. item.status = "完成";
  554. }
  555. return (
  556. <li
  557. key={index}
  558. style={{
  559. width: "100%",
  560. height: "auto",
  561. wordBreak: "break-all",
  562. marginBottom: "10px",
  563. }}
  564. >
  565. {item.aname + ":" + "(" + item.status + ")" + item.remarks}
  566. </li>
  567. );
  568. })}
  569. </ul>
  570. <ProAndCuiList id={this.props.id} />
  571. <div className="clearfix">
  572. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  573. 收款情况
  574. </h3>
  575. <div style={{ marginLeft: "90px" }}>
  576. <ul>
  577. {(this.props.proceedsData.bill || []).map((item, index) => (
  578. <li key={index}>
  579. {item.payTime +
  580. " " +
  581. item.aName +
  582. " 收款:" +
  583. item.transactionAmount +
  584. "万元"}
  585. </li>
  586. ))}
  587. </ul>
  588. <div>收款总计:{this.props.proceedsTotal}万元</div>
  589. </div>
  590. <br />
  591. <div style={{ marginLeft: "90px" }}>
  592. <ul>
  593. {(this.props.proceedsData.invoice || []).map((item, index) => (
  594. <li key={index}>
  595. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  596. </li>
  597. ))}
  598. </ul>
  599. <div>开票总计:{this.props.invoiceTotal}万元</div>
  600. </div>
  601. <p style={{ marginLeft: "90px", color: "red" }}>
  602. 系统预估 产生成本(万元):
  603. {this.props.data.estimateCost
  604. ? this.props.data.estimateCost
  605. : "0"}{" "}
  606. &nbsp;应退金额(万元):
  607. {this.props.data.estimateRefundable
  608. ? this.props.data.estimateRefundable
  609. : "0"}
  610. </p>
  611. </div>
  612. <div
  613. style={{
  614. display:
  615. (this.props.data.processState == 8 ||
  616. this.props.data.processState == 7) &&
  617. (this.props.data.status == 2 || this.props.data.status == 4)
  618. ? "block"
  619. : "none",
  620. }}
  621. >
  622. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  623. 回收退票
  624. </h3>
  625. <Table
  626. size="middle"
  627. pagination={false}
  628. bordered
  629. columns={this.state.ContactsLists}
  630. dataSource={this.state.contactList}
  631. />
  632. </div>
  633. <div
  634. style={{
  635. display: this.props.data.processState > 5 ? "block" : "none",
  636. }}
  637. >
  638. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  639. 当前财务状态(财务填写)
  640. </h3>
  641. {financeData.map((item, index) => {
  642. return <Itemlist orderUid={this.props.orderUid} key={index} pageData={item} />;
  643. })}
  644. </div>
  645. {/* {this.props.data.type === 0 && this.props.data.processState >= 2 ? (
  646. <div>
  647. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  648. 当前项目进度(咨询师经理填写)
  649. </h3>
  650. {planData.map((item, index) => {
  651. return <Itemlist key={index} pageData={item} />;
  652. })}
  653. </div>
  654. ) : (
  655. ""
  656. )}
  657. {this.props.data.type === 0 ? (
  658. this.props.data.processState >= 5 ? (
  659. <div>
  660. <h3
  661. style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}
  662. >
  663. 当前财务状态(财务填写)
  664. </h3>
  665. {financeData.map((item, index) => {
  666. return <Itemlist key={index} pageData={item} />;
  667. })}
  668. </div>
  669. ) : (
  670. ""
  671. )
  672. ) : this.props.data.status === 4 ? (
  673. <div>
  674. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  675. 当前财务状态(财务填写)
  676. </h3>
  677. {financeData.map((item, index) => {
  678. return <Itemlist key={index} pageData={item} />;
  679. })}
  680. </div>
  681. ) : (
  682. ""
  683. )} */}
  684. <div
  685. style={{
  686. display:
  687. (this.props.data.processState == 7 ||
  688. this.props.data.processState == 8) &&
  689. this.props.data.status == 4 &&
  690. this.props.data.refundStatus
  691. ? "block"
  692. : "none",
  693. }}
  694. >
  695. <Refund data={this.props.data} id={this.props.id} />
  696. </div>
  697. </div>
  698. {this.props.processState === this.props.data.processState ? (
  699. 1 ? (
  700. <div>
  701. <div className="clearfix">
  702. <FormItem
  703. style={{ height: "auto" }}
  704. labelCol={{ span: 4 }}
  705. wrapperCol={{ span: 18 }}
  706. label="备注"
  707. >
  708. <TextArea
  709. rows={4}
  710. placeholder="请输入备注信息"
  711. style={{ width: "95%" }}
  712. value={this.state.reason}
  713. onChange={(e) => {
  714. let reason = e.target.value;
  715. this.setState({ reason });
  716. }}
  717. />
  718. </FormItem>
  719. </div>
  720. <div
  721. className="clearfix"
  722. style={{ display: "flex", justifyContent: "space-around" }}
  723. >
  724. {buttonData.map((item, index) => {
  725. return (
  726. <AgreeButton
  727. data={item}
  728. key={index}
  729. backData={this.props.data}
  730. processState={this.props.processState}
  731. visible={this.changeButtonStatus}
  732. loadData={this.props.loadData}
  733. reason={this.state.reason}
  734. ajaxData={this.state}
  735. rejectState={this.state.rejectState}
  736. onCancel={this.props.onCancel}
  737. />
  738. );
  739. })}
  740. </div>
  741. </div>
  742. ) : (
  743. ""
  744. )
  745. ) : (
  746. ""
  747. )}
  748. {/* <ReactToPrint
  749. trigger={() => (
  750. <div className="clearfix">
  751. <Button type="primary" style={{ float: "right", marginTop: 10 }}>
  752. 打印
  753. </Button>
  754. </div>
  755. )}
  756. content={() => this.refs}
  757. /> */}
  758. <ReactToPrint
  759. trigger={() => (
  760. <Button
  761. type="primary"
  762. style={{
  763. float: "right",
  764. marginTop: 10,
  765. position: "absolute",
  766. top: 0,
  767. right: 30,
  768. }}
  769. >
  770. 打印
  771. </Button>
  772. )}
  773. content={() => this.refs}
  774. />
  775. </div>
  776. );
  777. }
  778. }
  779. export { ChangeDetail, changeType, getChangeType };