changeDetailJsjl.js 27 KB

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