changeDetailYxgly.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907
  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:changeColor(this.props.data.firstAmount),
  318. },
  319. {
  320. labelA: "变更原因",
  321. formItemLayoutA: formItemLayout,
  322. dataA: this.props.data.remarks,
  323. },
  324. ];
  325. const planData = [
  326. {
  327. labelA: "项目进度",
  328. formItemLayoutA: formItemLayout,
  329. dataA: this.props.data.projectState,
  330. labelB: "发生成本费用(万元)",
  331. formItemLayoutB: formItemLayout,
  332. dataB: this.props.data.zxsCost,
  333. },
  334. {
  335. labelA: "变更原因",
  336. formItemLayoutA: formItemLayout,
  337. dataA: this.props.data.zxsRemarks,
  338. },
  339. ];
  340. const financeData = [
  341. {
  342. labelA: "发生成本(万元)",
  343. formItemLayoutA: formItemLayout,
  344. dataA: this.props.data.cwCost,
  345. labelB: "应退金额(万元)",
  346. formItemLayoutB: formItemLayout,
  347. dataB: this.props.data.refundableAmount,
  348. },
  349. ];
  350. const buttonData = [
  351. {
  352. name: "同意",
  353. title: "理由",
  354. placeholder: "请输入理由",
  355. type: "primary",
  356. status: 2,
  357. onChange: (value) => {
  358. this.setState({
  359. remarks: value,
  360. });
  361. },
  362. },
  363. {
  364. name: "拒绝",
  365. title: "理由",
  366. placeholder: "请输入理由",
  367. type: "danger",
  368. status: 3,
  369. onChange: (value) => {
  370. this.setState({
  371. remarks: value,
  372. });
  373. },
  374. },
  375. ];
  376. const orgCodeUrl = this.props.pictureUrl;
  377. const attachment = this.props.attachment
  378. // console.log(this.props.attachment);
  379. // console.log(this.props.orderUid);
  380. return (
  381. <div className="clearfix changeDetail">
  382. <div
  383. className="clearfix"
  384. ref={(e) => {
  385. this.refs = e;
  386. }}
  387. >
  388. <div
  389. style={{
  390. borderRadius: "50%",
  391. width: 300,
  392. height: 300,
  393. position: "absolute",
  394. top: 230,
  395. left: 525,
  396. transform: "rotate(-5deg)",
  397. zIndex: 1,
  398. display:
  399. (this.props.data.processState == 7 ||
  400. this.props.data.processState == 8) &&
  401. this.props.data.status == 4
  402. ? "block"
  403. : "none",
  404. }}
  405. >
  406. {/* <span
  407. style={{
  408. fontSize: 29,
  409. position: "absolute",
  410. left: "50%",
  411. top: "50%",
  412. transform: "translate(-50%,-50%)",
  413. color: "red"
  414. }}
  415. >
  416. 通过
  417. </span> */}
  418. <img src={tongguo} style={{ width: "100%" }} />
  419. </div>
  420. <div
  421. style={{
  422. borderRadius: "50%",
  423. width: 300,
  424. height: 300,
  425. position: "absolute",
  426. top: 284,
  427. left: 586,
  428. transform: "rotate(-5deg)",
  429. zIndex: 1,
  430. display: this.props.data.status == 5 ? "block" : "none",
  431. }}
  432. >
  433. <img src={quxiao} style={{ width: "63%" }} />
  434. </div>
  435. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  436. 合同变更记录
  437. </h2>
  438. {pageData.map((item, index) => {
  439. return <Itemlist orderUid={this.props.orderUid} key={index} pageData={item} />;
  440. })}
  441. <Form.Item
  442. label="变更凭证"
  443. labelCol={{ span: 4 }}
  444. wrapperCol={{ span: 18 }}
  445. >
  446. {/*<Upload*/}
  447. {/* className="demandDetailShow-upload"*/}
  448. {/* listType="picture-card"*/}
  449. {/* fileList={orgCodeUrl}*/}
  450. {/* onPreview={(file) => {*/}
  451. {/* this.setState({*/}
  452. {/* previewImage: file.url || file.thumbUrl,*/}
  453. {/* previewVisible: true,*/}
  454. {/* });*/}
  455. {/* }}*/}
  456. {/*/>*/}
  457. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  458. <ImgList fileList={orgCodeUrl} ItemWidth={'96px'} />
  459. </div>
  460. <Modal
  461. maskClosable={false}
  462. footer={null}
  463. width={"50%"}
  464. visible={this.state.previewVisible}
  465. onCancel={() => {
  466. this.setState({ previewVisible: false, rotateDeg: 0 });
  467. }}
  468. >
  469. <img
  470. alt=""
  471. style={{
  472. width: "100%",
  473. transform: `rotate(${this.state.rotateDeg}deg)`,
  474. }}
  475. src={this.state.previewImage || ""}
  476. />
  477. <Button
  478. onClick={this.rotate}
  479. style={{
  480. position: "relative",
  481. left: "50%",
  482. transform: "translateX(-50%)",
  483. }}
  484. >
  485. 旋转
  486. </Button>
  487. <Button
  488. onClick={this.upImg}
  489. style={{
  490. position: "absolute",
  491. left: -81,
  492. top: "50%",
  493. transform: "translateY(-50%)",
  494. }}
  495. >
  496. 上一张
  497. </Button>
  498. <Button
  499. onClick={this.downImg}
  500. style={{
  501. position: "absolute",
  502. right: -81,
  503. top: "50%",
  504. transform: "translateY(-50%)",
  505. }}
  506. >
  507. 下一张
  508. </Button>
  509. </Modal>
  510. <Rizhi changeId={this.props.id} />
  511. </Form.Item>
  512. {
  513. this.props.contractPictureUrl && this.props.contractPictureUrl.length != 0 &&
  514. <div className="clearfix">
  515. <Form.Item
  516. labelCol={{ span: 4 }}
  517. wrapperCol={{ span: 18 }}
  518. label="最新合同"
  519. >
  520. <div style={{ paddingTop: 10 }}>
  521. <ImgList
  522. fileList={
  523. this.props.contractPictureUrl
  524. }
  525. ItemWidth={"96px"}
  526. />
  527. </div>
  528. </Form.Item>
  529. </div>
  530. }
  531. {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
  532. <ul
  533. style={{
  534. width: "868px",
  535. overflow: "hidden",
  536. paddingLeft: "90px",
  537. position: "relative",
  538. }}
  539. >
  540. {/* <span>操作人:</span> */}
  541. {this.props.dataSource.map((item, index) => {
  542. if (item.status == 0) {
  543. item.status = "发起";
  544. } else if (item.status == 1) {
  545. item.status = "审核中";
  546. } else if (item.status == 2) {
  547. item.status = "通过";
  548. } else if (item.status == 3) {
  549. item.status = "驳回";
  550. } else if (item.status == 4) {
  551. item.status = "完成";
  552. }
  553. return (
  554. <li
  555. key={index}
  556. style={{
  557. width: "100%",
  558. height: "auto",
  559. wordBreak: "break-all",
  560. marginBottom: "10px",
  561. }}
  562. >
  563. {item.aname + ":" + "(" + item.status + ")" + item.remarks}
  564. </li>
  565. );
  566. })}
  567. </ul>
  568. <ProAndCuiList id={this.props.id} />
  569. {/* 收款情况 */}
  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. {/* 当前财务状态 */}
  612. <div
  613. style={{
  614. display: this.props.data.processState > 5 ? "block" : "none",
  615. }}
  616. >
  617. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  618. 当前财务状态(财务填写)
  619. </h3>
  620. {financeData.map((item, index) => {
  621. return <Itemlist orderUid={this.props.orderUid} key={index} pageData={item} />;
  622. })}
  623. </div>
  624. {/* 回收退票 */}
  625. <div
  626. style={{
  627. display:
  628. (this.props.data.processState == 8 ||
  629. this.props.data.processState == 7) &&
  630. (this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6)
  631. ? "block"
  632. : "none",
  633. }}
  634. >
  635. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  636. 回收退票
  637. </h3>
  638. <Table
  639. size="middle"
  640. pagination={false}
  641. bordered
  642. columns={this.state.ContactsLists}
  643. dataSource={this.state.contactList}
  644. />
  645. </div>
  646. {/* 完成审核,上传附件 */}
  647. <div style={{
  648. position: "relative",
  649. display:
  650. (this.props.data.processState == 7 ||
  651. this.props.data.processState == 8) &&
  652. this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6
  653. ? "block"
  654. : "none",
  655. marginTop: 10,
  656. }}
  657. >
  658. <hr
  659. style={{
  660. marginTop: 12,
  661. marginBottom: 10,
  662. backgroundColor: "black",
  663. height: 1,
  664. border: "none",
  665. }}
  666. />
  667. <h3
  668. style={{
  669. marginLeft: 20,
  670. fontWeight: 800,
  671. marginBottom: 10,
  672. display: "inline-block",
  673. }}
  674. >
  675. 完成审核,上传附件{" "}
  676. <span
  677. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  678. >
  679. (注:由营销员上传变更后附件,全变更流程完成。)
  680. </span>
  681. </h3>
  682. <div>
  683. <Form.Item
  684. label="变更附件"
  685. labelCol={{ span: 4 }}
  686. wrapperCol={{ span: 18 }}
  687. >
  688. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  689. {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'changeDetailyxgly1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
  690. </div>
  691. <Modal
  692. maskClosable={false}
  693. footer={null}
  694. width={"50%"}
  695. visible={this.state.previewVisible}
  696. onCancel={() => {
  697. this.setState({ previewVisible: false, rotateDeg: 0 }, () => {
  698. // this.reset();
  699. });
  700. }}
  701. >
  702. <img
  703. alt=""
  704. style={{
  705. width: "100%",
  706. transform: `rotate(${this.state.rotateDeg}deg)`,
  707. }}
  708. src={this.state.previewImage || ""}
  709. />
  710. <Button
  711. onClick={this.rotate}
  712. style={{
  713. position: "relative",
  714. left: "50%",
  715. transform: "translateX(-50%)",
  716. }}
  717. >
  718. 旋转
  719. </Button>
  720. <Button
  721. onClick={this.upImg}
  722. style={{
  723. position: "absolute",
  724. left: -81,
  725. top: "50%",
  726. transform: "translateY(-50%)",
  727. }}
  728. >
  729. 上一张
  730. </Button>
  731. <Button
  732. onClick={this.downImg}
  733. style={{
  734. position: "absolute",
  735. right: -81,
  736. top: "50%",
  737. transform: "translateY(-50%)",
  738. }}
  739. >
  740. 下一张
  741. </Button>
  742. </Modal>
  743. {/* <Rizhi changeId={this.props.id} /> */}
  744. </Form.Item>
  745. </div>
  746. </div>
  747. {/* {this.props.data.type === 0 && this.props.data.processState >= 2 ? (
  748. <div>
  749. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  750. 当前项目进度(咨询师经理填写)
  751. </h3>
  752. {planData.map((item, index) => {
  753. return <Itemlist key={index} pageData={item} />;
  754. })}
  755. </div>
  756. ) : (
  757. ""
  758. )}
  759. {this.props.data.type === 0 ? (
  760. this.props.data.processState >= 5 ? (
  761. <div>
  762. <h3
  763. style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}
  764. >
  765. 当前财务状态(财务填写)
  766. </h3>
  767. {financeData.map((item, index) => {
  768. return <Itemlist key={index} pageData={item} />;
  769. })}
  770. </div>
  771. ) : (
  772. ""
  773. )
  774. ) : this.props.data.status === 4 ? (
  775. <div>
  776. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  777. 当前财务状态(财务填写)
  778. </h3>
  779. {financeData.map((item, index) => {
  780. return <Itemlist key={index} pageData={item} />;
  781. })}
  782. </div>
  783. ) : (
  784. ""
  785. )} */}
  786. <div
  787. style={{
  788. display:
  789. (this.props.data.processState == 7 ||
  790. this.props.data.processState == 8) &&
  791. this.props.data.status == 4 &&
  792. this.props.data.refundStatus
  793. ? "block"
  794. : "none",
  795. }}
  796. >
  797. <Refund data={this.props.data} id={this.props.id} />
  798. </div>
  799. </div>
  800. {this.props.processState === this.props.data.processState ? (
  801. 1 ? (
  802. <div>
  803. <div className="clearfix">
  804. <FormItem
  805. style={{ height: "auto" }}
  806. labelCol={{ span: 4 }}
  807. wrapperCol={{ span: 18 }}
  808. label="备注"
  809. >
  810. <TextArea
  811. rows={4}
  812. placeholder="请输入备注信息"
  813. style={{ width: "95%" }}
  814. value={this.state.reason}
  815. onChange={(e) => {
  816. let reason = e.target.value;
  817. this.setState({ reason });
  818. }}
  819. />
  820. </FormItem>
  821. </div>
  822. <div
  823. className="clearfix"
  824. style={{ display: "flex", justifyContent: "space-around" }}
  825. >
  826. {buttonData.map((item, index) => {
  827. return (
  828. <AgreeButton
  829. data={item}
  830. key={index}
  831. backData={this.props.data}
  832. processState={this.props.processState}
  833. visible={this.changeButtonStatus}
  834. loadData={this.props.loadData}
  835. reason={this.state.reason}
  836. ajaxData={this.state}
  837. rejectState={this.state.rejectState}
  838. onCancel={this.props.onCancel}
  839. />
  840. );
  841. })}
  842. </div>
  843. </div>
  844. ) : (
  845. ""
  846. )
  847. ) : (
  848. ""
  849. )}
  850. {/* <ReactToPrint
  851. trigger={() => (
  852. <div className="clearfix">
  853. <Button type="primary" style={{ float: "right", marginTop: 10 }}>
  854. 打印
  855. </Button>
  856. </div>
  857. )}
  858. content={() => this.refs}
  859. /> */}
  860. {/* <OrderCoor
  861. orderNo={this.props.orderNo}
  862. /> */}
  863. <ReactToPrint
  864. trigger={() => (
  865. <Button
  866. type="primary"
  867. style={{
  868. float: "right",
  869. marginTop: 10,
  870. position: "absolute",
  871. top: 0,
  872. right: 30,
  873. }}
  874. >
  875. 打印
  876. </Button>
  877. )}
  878. content={() => this.refs}
  879. />
  880. </div>
  881. );
  882. }
  883. }
  884. export { ChangeDetail, getChangeType };