changeDetailJszj.js 28 KB

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