changeDetailCwzj.js 28 KB

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