changeDetailCwzj.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  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. width={"50%"}
  549. visible={this.state.previewVisible}
  550. onCancel={() => {
  551. this.setState({ previewVisible: false }, () => {});
  552. }}
  553. >
  554. <img
  555. alt=""
  556. style={{
  557. width: "100%",
  558. transform: `rotate(${this.state.rotateDeg}deg)`,
  559. }}
  560. src={this.state.previewImage || ""}
  561. />
  562. <Button
  563. onClick={this.rotate}
  564. style={{
  565. position: "relative",
  566. left: "50%",
  567. transform: "translateX(-50%)",
  568. }}
  569. >
  570. 旋转
  571. </Button>
  572. <Button
  573. onClick={this.upImg}
  574. style={{
  575. position: "absolute",
  576. left: -81,
  577. top: "50%",
  578. transform: "translateY(-50%)",
  579. }}
  580. >
  581. 上一张
  582. </Button>
  583. <Button
  584. onClick={this.downImg}
  585. style={{
  586. position: "absolute",
  587. right: -81,
  588. top: "50%",
  589. transform: "translateY(-50%)",
  590. }}
  591. >
  592. 下一张
  593. </Button>
  594. </Modal>
  595. <Rizhi changeId={this.props.id} />
  596. </Form.Item>
  597. {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
  598. <ul
  599. style={{
  600. width: "868px",
  601. overflow: "hidden",
  602. paddingLeft: "90px",
  603. paddingTop: "10px",
  604. position: "relative",
  605. bottom: "20px",
  606. }}
  607. >
  608. {/* <span>操作人:</span> */}
  609. {this.props.dataSource.map((item, index) => {
  610. if (item.status == 0) {
  611. item.status = "发起";
  612. } else if (item.status == 1) {
  613. item.status = "审核中";
  614. } else if (item.status == 2) {
  615. item.status = "通过";
  616. } else if (item.status == 3) {
  617. item.status = "驳回";
  618. } else if (item.status == 4) {
  619. item.status = "完成";
  620. }
  621. return (
  622. <li
  623. key={index}
  624. style={{
  625. width: "100%",
  626. height: "auto",
  627. wordBreak: "break-all",
  628. marginBottom: "10px",
  629. }}
  630. >
  631. {item.aname + ":" + "(" + item.status + ")" + item.remarks}
  632. </li>
  633. );
  634. })}
  635. </ul>
  636. <ProAndCuiList id={this.props.id} />
  637. <div className="clearfix">
  638. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  639. 收款情况
  640. </h3>
  641. <div style={{ marginLeft: "90px" }}>
  642. <ul>
  643. {(this.props.proceedsData.bill || []).map((item, index) => (
  644. <li key={index}>
  645. {item.payTime +
  646. " " +
  647. item.aName +
  648. " 收款:" +
  649. item.transactionAmount +
  650. "万元"}
  651. </li>
  652. ))}
  653. </ul>
  654. <div>收款总计:{this.props.proceedsTotal}万元</div>
  655. </div>
  656. <br />
  657. <div style={{ marginLeft: "90px" }}>
  658. <ul>
  659. {(this.props.proceedsData.invoice || []).map((item, index) => (
  660. <li key={index}>
  661. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  662. </li>
  663. ))}
  664. </ul>
  665. <div>开票总计:{this.props.invoiceTotal}万元</div>
  666. </div>
  667. <p style={{ marginLeft: "90px", color: "red" }}>
  668. 系统预估 产生成本(万元):
  669. {this.props.data.estimateCost
  670. ? this.props.data.estimateCost
  671. : "0"}{" "}
  672. &nbsp;应退金额(万元):
  673. {this.props.data.estimateRefundable
  674. ? this.props.data.estimateRefundable
  675. : "0"}
  676. </p>
  677. </div>
  678. <div
  679. style={{
  680. display:
  681. (this.props.data.processState == 8 ||
  682. this.props.data.processState == 7) &&
  683. (this.props.data.status == 2 || this.props.data.status == 4)
  684. ? "block"
  685. : "none",
  686. }}
  687. >
  688. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  689. 回收退票
  690. </h3>
  691. {/* {this.state.processStatus == 0 ? ( */}
  692. <Button
  693. type="primary"
  694. onClick={this.addcontact}
  695. style={{
  696. float: "right",
  697. marginRight: "50px",
  698. marginBottom: "15px",
  699. position: "relative",
  700. zIndex: "999",
  701. display: "none",
  702. }}
  703. >
  704. 添加回收退票
  705. </Button>
  706. {/* ) : (
  707. ""
  708. )} */}
  709. <Table
  710. pagination={false}
  711. bordered
  712. columns={this.state.ContactsLists}
  713. dataSource={this.state.contactList}
  714. />
  715. </div>
  716. {/* {this.props.data.type === 0 && this.props.data.processState >= 4 ? (
  717. <div>
  718. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  719. 当前项目进度(咨询师经理填写)
  720. </h3>
  721. {planData.map((item, index) => {
  722. return <Itemlist key={index} pageData={item} />;
  723. })}
  724. </div>
  725. ) : (
  726. ""
  727. )} */}
  728. {/* {this.props.data.type === 0 ? (
  729. this.props.data.processState >= 5 ? (
  730. <div>
  731. <h3
  732. style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}
  733. >
  734. 当前财务状态(财务填写)
  735. </h3>
  736. {financeData.map((item, index) => {
  737. return <Itemlist key={index} pageData={item} />;
  738. })}
  739. </div>
  740. ) : (
  741. ""
  742. )
  743. ) : this.props.data.status === 4 ? (
  744. <div>
  745. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  746. 当前财务状态(财务填写)
  747. </h3>
  748. {financeData.map((item, index) => {
  749. return <Itemlist key={index} pageData={item} />;
  750. })}
  751. </div>
  752. ) : (
  753. ""
  754. )} */}
  755. </div>
  756. {this.props.data.processState > 5 &&
  757. (this.props.data.status == 1 || this.props.data.status == 3)&&
  758. this.props.processState == this.props.data.processState ? (
  759. // this.state.buttonStatus ? (
  760. <div>
  761. <div style={{ marginBottom: 10 }}>
  762. <div className="clearfix">
  763. <div>
  764. <h3
  765. style={{
  766. marginLeft: 10,
  767. fontWeight: 800,
  768. marginBottom: 10,
  769. }}
  770. >
  771. 当前财务状态(财务填写)
  772. </h3>
  773. {financeData.map((item, index) => {
  774. return <Itemlist key={index} pageData={item} />;
  775. })}
  776. </div>
  777. </div>
  778. <div
  779. style={{
  780. marginTop: "10px",
  781. display:
  782. this.props.processState == this.props.data.processState
  783. ? "block"
  784. : "none",
  785. }}
  786. >
  787. <Form.Item
  788. label="备注"
  789. labelCol={{ span: 4 }}
  790. wrapperCol={{ span: 14 }}
  791. >
  792. <Input.TextArea
  793. rows={4}
  794. value={this.state.reason}
  795. placeholder="请输入补充资料/备注"
  796. onChange={(e) => {
  797. this.setState({
  798. reason: e.target.value,
  799. });
  800. }}
  801. />
  802. </Form.Item>
  803. </div>
  804. </div>
  805. <div
  806. className="clearfix"
  807. style={{ display: "flex", justifyContent: "space-around" }}
  808. >
  809. {buttonData.map((item, index) => {
  810. return (
  811. <AgreeButton
  812. data={item}
  813. key={index}
  814. backData={this.props.data}
  815. processState={this.props.processState}
  816. visible={this.changeButtonStatus}
  817. ajaxData={this.state}
  818. loadData={this.props.loadData}
  819. reason={this.state.reason}
  820. rejectState={this.state.rejectState}
  821. onCancel={this.props.onCancel}
  822. />
  823. );
  824. })}
  825. </div>
  826. <Select
  827. defaultValue="0"
  828. style={{
  829. width: 120,
  830. float: "left",
  831. position: "relative",
  832. bottom: "28px",
  833. right: "-600px",
  834. }}
  835. onChange={(val) => {
  836. this.setState({ rejectState: val });
  837. }}
  838. >
  839. <Option
  840. value="0"
  841. style={{
  842. display: this.props.processState >= 1 ? "block" : "none",
  843. }}
  844. >
  845. 营销员
  846. </Option>
  847. <Option
  848. value="1"
  849. style={{
  850. display: this.props.processState >= 2 ? "block" : "none",
  851. }}
  852. >
  853. 营销管理员
  854. </Option>
  855. <Option
  856. value="2"
  857. style={{
  858. display: this.props.processState >= 3 ? "block" : "none",
  859. }}
  860. >
  861. 咨询师
  862. </Option>
  863. <Option
  864. value="3"
  865. style={{
  866. display: this.props.processState >= 4 ? "block" : "none",
  867. }}
  868. >
  869. 咨询师经理
  870. </Option>
  871. <Option
  872. value="4"
  873. style={{
  874. display: this.props.processState >= 5 ? "block" : "none",
  875. }}
  876. >
  877. 咨询师总监
  878. </Option>
  879. <Option
  880. value="5"
  881. style={{
  882. display: this.props.processState >= 6 ? "block" : "none",
  883. }}
  884. >
  885. 财务专员(退单)
  886. </Option>
  887. <Option
  888. value="6"
  889. style={{
  890. display: this.props.processState >= 7 ? "block" : "none",
  891. }}
  892. >
  893. 财务总监
  894. </Option>
  895. <Option
  896. value="7"
  897. style={{
  898. display: this.props.processState >= 8 ? "block" : "none",
  899. }}
  900. >
  901. 总裁
  902. </Option>
  903. </Select>
  904. </div>
  905. ) : (
  906. <div>
  907. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  908. 当前财务状态(财务填写)
  909. </h3>
  910. {financeData.map((item, index) => {
  911. return <Itemlist key={index} pageData={item} />;
  912. })}
  913. </div>
  914. )}
  915. <div
  916. style={{
  917. display:
  918. (this.props.data.processState == 7 ||
  919. this.props.data.processState == 8) &&
  920. this.props.data.status == 4 &&
  921. this.props.data.refundStatus
  922. ? "block"
  923. : "none",
  924. }}
  925. >
  926. <Refund data={this.props.data} id={this.props.id} />
  927. </div>
  928. {/* <ReactToPrint
  929. trigger={() => (
  930. <div className="clearfix">
  931. <Button type="primary" style={{ float: "right", marginTop: 10 }}>
  932. 打印
  933. </Button>
  934. </div>
  935. )}
  936. content={() => this.refs}
  937. /> */}
  938. </div>
  939. );
  940. }
  941. }
  942. export { ChangeDetail };