changeDetailCwzj.js 28 KB

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