changeDetailYxgly.js 23 KB

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