changeDetailCwzj.js 27 KB

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