changeDetailJszj.js 27 KB

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