changeDetailJsjl.js 29 KB

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