changeDetailCwzj.js 29 KB

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