changeDetailCwzj.js 33 KB

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