changeDetailYxgly.js 26 KB

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