changeDetailJszj.js 27 KB

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