changeDetailCwzj.js 27 KB

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