changeDetailCwzj.js 29 KB

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