changeDetailYxgly.js 27 KB

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