changeDetailCwzj.js 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  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(this.props.data.examineName, this.props.data.processState)
  334. : getProcessStatusNew(
  335. this.props.data.examineName,
  336. this.props.data.processState,
  337. this.props.data.status
  338. ),
  339. labelB: "变更类型",
  340. formItemLayoutB: formItemLayout,
  341. dataB: getChangeType(this.props.data.type)
  342. },
  343. {
  344. labelA: "合同额(万元)",
  345. formItemLayoutA: formItemLayout,
  346. dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
  347. labelB: "已收款(万元)",
  348. formItemLayoutB: formItemLayout,
  349. dataB: changeColor(this.props.data.settlementAmount)
  350. },
  351. {
  352. labelA: "欠款(万元)",
  353. formItemLayoutA: formItemLayout,
  354. dataA: changeColor(this.props.data.arrears),
  355. labelB: "申请退款(万元)",
  356. formItemLayoutB: formItemLayout,
  357. dataB: changeColor(this.props.data.changeAmount)
  358. },
  359. {
  360. labelA: "首付款(万元)",
  361. formItemLayoutA: formItemLayout,
  362. dataA: changeColor(this.props.data.firstAmount),
  363. },
  364. {
  365. labelA: "变更原因",
  366. formItemLayoutA: formItemLayout,
  367. dataA: this.props.data.remarks
  368. }
  369. ];
  370. const planData = [
  371. {
  372. labelA: "项目进度",
  373. formItemLayoutA: formItemLayout,
  374. dataA: this.props.data.projectState,
  375. onChangeA: value => {
  376. this.setState({
  377. projectState: value
  378. });
  379. },
  380. labelB: "发生成本费用(万元)",
  381. formItemLayoutB: formItemLayout,
  382. dataB: this.props.data.zxsCost,
  383. onChangeB: value => {
  384. this.setState({
  385. zxsCost: value
  386. });
  387. }
  388. },
  389. {
  390. labelA: "备注",
  391. formItemLayoutA: formItemLayout,
  392. dataA: this.props.data.zxsRemarks,
  393. onChangeA: value => {
  394. this.setState({
  395. zxsRemarks: value
  396. });
  397. }
  398. }
  399. ];
  400. const financeData = [
  401. // {
  402. // labelA: "收款时间",
  403. // formItemLayoutA: formItemLayout,
  404. // dataA: this.props.data.paymentTimes,
  405. // labelB: "收款金额(万元)",
  406. // formItemLayoutB: formItemLayout,
  407. // dataB: this.props.data.paymentAmount
  408. // },
  409. // {
  410. // labelA: "开票时间",
  411. // formItemLayoutA: formItemLayout,
  412. // dataA: this.props.data.invoiceTimes,
  413. // labelB: "已开票金额(万元)",
  414. // formItemLayoutB: formItemLayout,
  415. // dataB: this.props.data.invoiceAmount
  416. // },
  417. {
  418. labelA: "发生成本(万元)",
  419. formItemLayoutA: formItemLayout,
  420. dataA: this.props.data.cwCost,
  421. labelB: "应退金额(万元)",
  422. formItemLayoutB: formItemLayout,
  423. dataB: this.props.data.refundableAmount
  424. }
  425. // {
  426. // labelA: "补充资料/备注",
  427. // formItemLayoutA: formItemLayout,
  428. // dataA: this.props.data.cwRemarks
  429. // }
  430. ];
  431. const buttonData = [
  432. {
  433. name: "同意",
  434. title: "理由",
  435. placeholder: "请输入理由",
  436. type: "primary",
  437. status: 2,
  438. onChange: value => {
  439. this.setState({
  440. remarks: value
  441. });
  442. }
  443. },
  444. {
  445. name: "拒绝",
  446. title: "理由",
  447. placeholder: "请输入理由",
  448. type: "danger",
  449. status: 3,
  450. onChange: value => {
  451. this.setState({
  452. remarks: value
  453. });
  454. }
  455. }
  456. ];
  457. const orgCodeUrl = this.props.pictureUrl;
  458. const attachment = this.props.attachment
  459. return (
  460. <div className="clearfix changeDetail">
  461. <div
  462. className="clearfix"
  463. ref={(e) => {
  464. this.refs = e;
  465. }}
  466. >
  467. <div
  468. style={{
  469. borderRadius: "50%",
  470. width: 300,
  471. height: 300,
  472. position: "absolute",
  473. top: 230,
  474. left: 525,
  475. transform: "rotate(-5deg)",
  476. zIndex: 1,
  477. display:
  478. (this.props.data.processState == 7 ||
  479. this.props.data.processState == 8) &&
  480. this.props.data.status == 4
  481. ? "block"
  482. : "none",
  483. }}
  484. >
  485. {/* <span
  486. style={{
  487. fontSize: 29,
  488. position: "absolute",
  489. left: "50%",
  490. top: "50%",
  491. transform: "translate(-50%,-50%)",
  492. color: "red"
  493. }}
  494. >
  495. 通过
  496. </span> */}
  497. <img src={tongguo} style={{ width: "100%" }} />
  498. </div>
  499. <div
  500. style={{
  501. borderRadius: "50%",
  502. width: 300,
  503. height: 300,
  504. position: "absolute",
  505. top: 284,
  506. left: 586,
  507. transform: "rotate(-5deg)",
  508. zIndex: 1,
  509. display: this.props.data.status == 5 ? "block" : "none",
  510. }}
  511. >
  512. <img src={quxiao} style={{ width: "63%" }} />
  513. </div>
  514. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  515. 合同变更记录
  516. </h2>
  517. {pageData.map((item, index) => {
  518. return <Itemlist key={index} pageData={item} orderUid={this.props.orderUid} />;
  519. })}
  520. <Form.Item
  521. label="变更凭证"
  522. labelCol={{ span: 4 }}
  523. wrapperCol={{ span: 18 }}
  524. >
  525. {/*<Upload*/}
  526. {/* className="demandDetailShow-upload"*/}
  527. {/* listType="picture-card"*/}
  528. {/* fileList={orgCodeUrl}*/}
  529. {/* onPreview={(file) => {*/}
  530. {/* this.setState({*/}
  531. {/* previewImage: file.url || file.thumbUrl,*/}
  532. {/* previewVisible: true,*/}
  533. {/* });*/}
  534. {/* }}*/}
  535. {/*/>*/}
  536. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  537. {orgCodeUrl ? <ImgList domId={'changeDetailCwzj' + this.props.id} fileList={orgCodeUrl} /> : <div />}
  538. </div>
  539. <Modal
  540. maskClosable={false}
  541. footer={null}
  542. width={"50%"}
  543. visible={this.state.previewVisible}
  544. onCancel={() => {
  545. this.setState({ previewVisible: false }, () => { });
  546. }}
  547. >
  548. <img
  549. alt=""
  550. style={{
  551. width: "100%",
  552. transform: `rotate(${this.state.rotateDeg}deg)`,
  553. }}
  554. src={this.state.previewImage || ""}
  555. />
  556. <Button
  557. onClick={this.rotate}
  558. style={{
  559. position: "relative",
  560. left: "50%",
  561. transform: "translateX(-50%)",
  562. }}
  563. >
  564. 旋转
  565. </Button>
  566. <Button
  567. onClick={this.upImg}
  568. style={{
  569. position: "absolute",
  570. left: -81,
  571. top: "50%",
  572. transform: "translateY(-50%)",
  573. }}
  574. >
  575. 上一张
  576. </Button>
  577. <Button
  578. onClick={this.downImg}
  579. style={{
  580. position: "absolute",
  581. right: -81,
  582. top: "50%",
  583. transform: "translateY(-50%)",
  584. }}
  585. >
  586. 下一张
  587. </Button>
  588. </Modal>
  589. <Rizhi changeId={this.props.id} />
  590. </Form.Item>
  591. {
  592. this.props.contractPictureUrl && this.props.contractPictureUrl.length != 0 &&
  593. <div className="clearfix">
  594. <Form.Item
  595. labelCol={{ span: 4 }}
  596. wrapperCol={{ span: 18 }}
  597. label="最新合同"
  598. >
  599. <div style={{ paddingTop: 10 }}>
  600. <ImgList
  601. fileList={
  602. this.props.contractPictureUrl
  603. }
  604. ItemWidth={"96px"}
  605. />
  606. </div>
  607. </Form.Item>
  608. </div>
  609. }
  610. {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
  611. <ul
  612. style={{
  613. width: "868px",
  614. overflow: "hidden",
  615. paddingLeft: "90px",
  616. paddingTop: "10px",
  617. position: "relative",
  618. bottom: "20px",
  619. }}
  620. >
  621. {/* <span>操作人:</span> */}
  622. {this.props.dataSource.map((item, index) => {
  623. if (item.status == 0) {
  624. item.status = "发起";
  625. } else if (item.status == 1) {
  626. item.status = "审核中";
  627. } else if (item.status == 2) {
  628. item.status = "通过";
  629. } else if (item.status == 3) {
  630. item.status = "驳回";
  631. } else if (item.status == 4) {
  632. item.status = "完成";
  633. } else if (item.status == 5) {
  634. item.status = "撤销";
  635. }
  636. return (
  637. <li
  638. key={index}
  639. style={{
  640. width: "100%",
  641. height: "auto",
  642. wordBreak: "break-all",
  643. marginBottom: "10px",
  644. }}
  645. >
  646. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  647. </li>
  648. );
  649. })}
  650. </ul>
  651. <ProAndCuiList id={this.props.id} />
  652. {/* 收款情况 */}
  653. <div className="clearfix">
  654. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  655. 收款情况
  656. </h3>
  657. <div style={{ marginLeft: "90px" }}>
  658. <ul>
  659. {(this.props.proceedsData.bill || []).map((item, index) => (
  660. <li key={index}>
  661. {item.payTime +
  662. " " +
  663. item.aName +
  664. " 收款:" +
  665. item.transactionAmount +
  666. "万元"}
  667. </li>
  668. ))}
  669. </ul>
  670. <div>收款总计:{this.props.proceedsTotal}万元</div>
  671. </div>
  672. <br />
  673. <div style={{ marginLeft: "90px" }}>
  674. <ul>
  675. {(this.props.proceedsData.invoice || []).map((item, index) => (
  676. <li key={index}>
  677. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  678. </li>
  679. ))}
  680. </ul>
  681. <div>开票总计:{this.props.invoiceTotal}万元</div>
  682. </div>
  683. <p style={{ marginLeft: "90px", color: "red" }}>
  684. 系统预估 产生成本(万元):
  685. {this.props.data.estimateCost
  686. ? this.props.data.estimateCost
  687. : "0"}{" "}
  688. &nbsp;应退金额(万元):
  689. {this.props.data.estimateRefundable
  690. ? this.props.data.estimateRefundable
  691. : "0"}
  692. </p>
  693. </div>
  694. {/* 当前财务状态 */}
  695. {this.props.data.processState > 5 &&
  696. (this.props.data.status == 1 || this.props.data.status == 3) &&
  697. this.props.processState == this.props.data.processState ? (
  698. // this.state.buttonStatus ? (
  699. <div>
  700. <div style={{ marginBottom: 10 }}>
  701. <div className="clearfix">
  702. <div>
  703. <h3
  704. style={{
  705. marginLeft: 10,
  706. fontWeight: 800,
  707. marginBottom: 10,
  708. }}
  709. >
  710. 当前财务状态(财务填写)
  711. </h3>
  712. {financeData.map((item, index) => {
  713. return <Itemlist key={index} pageData={item} orderUid={this.props.orderUid} />;
  714. })}
  715. </div>
  716. </div>
  717. <div
  718. style={{
  719. marginTop: "10px",
  720. display:
  721. this.props.processState == this.props.data.processState
  722. ? "block"
  723. : "none",
  724. }}
  725. >
  726. <Form.Item
  727. label="备注"
  728. labelCol={{ span: 4 }}
  729. wrapperCol={{ span: 14 }}
  730. >
  731. <Input.TextArea
  732. rows={4}
  733. value={this.state.reason}
  734. placeholder="请输入补充资料/备注"
  735. onChange={(e) => {
  736. this.setState({
  737. reason: e.target.value,
  738. });
  739. }}
  740. />
  741. </Form.Item>
  742. </div>
  743. </div>
  744. <div
  745. className="clearfix"
  746. style={{ display: "flex", justifyContent: "space-around" }}
  747. >
  748. {buttonData.map((item, index) => {
  749. return (
  750. <AgreeButton
  751. data={item}
  752. key={index}
  753. backData={this.props.data}
  754. processState={this.props.processState}
  755. visible={this.changeButtonStatus}
  756. ajaxData={this.state}
  757. loadData={this.props.loadData}
  758. reason={this.state.reason}
  759. rejectState={this.state.rejectState}
  760. onCancel={this.props.onCancel}
  761. />
  762. );
  763. })}
  764. </div>
  765. <Select
  766. defaultValue="0"
  767. style={{
  768. width: 120,
  769. float: "left",
  770. position: "relative",
  771. bottom: "28px",
  772. right: "-600px",
  773. }}
  774. onChange={(val) => {
  775. this.setState({ rejectState: val });
  776. }}
  777. >
  778. <Option
  779. value="0"
  780. style={{
  781. display: this.props.processState >= 1 ? "block" : "none",
  782. }}
  783. >
  784. 营销员
  785. </Option>
  786. <Option
  787. value="1"
  788. style={{
  789. display: this.props.processState >= 2 ? "block" : "none",
  790. }}
  791. >
  792. 营销管理员
  793. </Option>
  794. <Option
  795. value="2"
  796. style={{
  797. display: this.props.processState >= 3 ? "block" : "none",
  798. }}
  799. >
  800. 咨询师
  801. </Option>
  802. <Option
  803. value="3"
  804. style={{
  805. display: this.props.processState >= 4 ? "block" : "none",
  806. }}
  807. >
  808. 咨询师经理
  809. </Option>
  810. <Option
  811. value="4"
  812. style={{
  813. display: this.props.processState >= 5 ? "block" : "none",
  814. }}
  815. >
  816. 咨询师总监
  817. </Option>
  818. <Option
  819. value="5"
  820. style={{
  821. display: this.props.processState >= 6 ? "block" : "none",
  822. }}
  823. >
  824. 财务专员(退单)
  825. </Option>
  826. <Option
  827. value="6"
  828. style={{
  829. display: this.props.processState >= 7 ? "block" : "none",
  830. }}
  831. >
  832. 财务总监
  833. </Option>
  834. <Option
  835. value="7"
  836. style={{
  837. display: this.props.processState >= 8 ? "block" : "none",
  838. }}
  839. >
  840. 总裁
  841. </Option>
  842. </Select>
  843. </div>
  844. ) : (
  845. <div>
  846. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  847. 当前财务状态(财务填写)
  848. </h3>
  849. {financeData.map((item, index) => {
  850. return <Itemlist key={index} pageData={item} orderUid={this.props.orderUid} />;
  851. })}
  852. </div>
  853. )}
  854. {/* 回收退票 */}
  855. <div
  856. style={{
  857. display:
  858. (this.props.data.processState == 8 ||
  859. this.props.data.processState == 7) &&
  860. (this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6)
  861. ? "block"
  862. : "none",
  863. }}
  864. >
  865. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  866. 回收退票
  867. </h3>
  868. {/* {this.state.processStatus == 0 ? ( */}
  869. <Button
  870. type="primary"
  871. onClick={this.addcontact}
  872. style={{
  873. float: "right",
  874. marginRight: "50px",
  875. marginBottom: "15px",
  876. position: "relative",
  877. zIndex: "999",
  878. display: "none",
  879. }}
  880. >
  881. 添加回收退票
  882. </Button>
  883. {/* ) : (
  884. ""
  885. )} */}
  886. <Table
  887. size="middle"
  888. pagination={false}
  889. bordered
  890. columns={this.state.ContactsLists}
  891. dataSource={this.state.contactList}
  892. />
  893. </div>
  894. {/* 完成审核,上传附件 */}
  895. <div style={{
  896. position: "relative",
  897. display:
  898. (this.props.data.processState == 7 ||
  899. this.props.data.processState == 8) &&
  900. this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6
  901. ? "block"
  902. : "none",
  903. marginTop: 10,
  904. }}
  905. >
  906. <hr
  907. style={{
  908. marginTop: 12,
  909. marginBottom: 10,
  910. backgroundColor: "black",
  911. height: 1,
  912. border: "none",
  913. }}
  914. />
  915. <h3
  916. style={{
  917. marginLeft: 20,
  918. fontWeight: 800,
  919. marginBottom: 10,
  920. display: "inline-block",
  921. }}
  922. >
  923. 完成审核,上传附件{" "}
  924. <span
  925. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  926. >
  927. (注:由营销员上传变更后附件,全变更流程完成。)
  928. </span>
  929. </h3>
  930. <div>
  931. <Form.Item
  932. label="变更附件"
  933. labelCol={{ span: 4 }}
  934. wrapperCol={{ span: 18 }}
  935. >
  936. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  937. {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'changeDetailCwzj1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
  938. </div>
  939. <Modal
  940. maskClosable={false}
  941. footer={null}
  942. width={"50%"}
  943. visible={this.state.previewVisible}
  944. onCancel={() => {
  945. this.setState({ previewVisible: false, rotateDeg: 0 }, () => {
  946. // this.reset();
  947. });
  948. }}
  949. >
  950. <img
  951. alt=""
  952. style={{
  953. width: "100%",
  954. transform: `rotate(${this.state.rotateDeg}deg)`,
  955. }}
  956. src={this.state.previewImage || ""}
  957. />
  958. <Button
  959. onClick={this.rotate}
  960. style={{
  961. position: "relative",
  962. left: "50%",
  963. transform: "translateX(-50%)",
  964. }}
  965. >
  966. 旋转
  967. </Button>
  968. <Button
  969. onClick={this.upImg}
  970. style={{
  971. position: "absolute",
  972. left: -81,
  973. top: "50%",
  974. transform: "translateY(-50%)",
  975. }}
  976. >
  977. 上一张
  978. </Button>
  979. <Button
  980. onClick={this.downImg}
  981. style={{
  982. position: "absolute",
  983. right: -81,
  984. top: "50%",
  985. transform: "translateY(-50%)",
  986. }}
  987. >
  988. 下一张
  989. </Button>
  990. </Modal>
  991. {/* <Rizhi changeId={this.props.id} /> */}
  992. </Form.Item>
  993. </div>
  994. </div>
  995. {/* {this.props.data.type === 0 && this.props.data.processState >= 4 ? (
  996. <div>
  997. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  998. 当前项目进度(咨询师经理填写)
  999. </h3>
  1000. {planData.map((item, index) => {
  1001. return <Itemlist key={index} pageData={item} />;
  1002. })}
  1003. </div>
  1004. ) : (
  1005. ""
  1006. )} */}
  1007. {/* {this.props.data.type === 0 ? (
  1008. this.props.data.processState >= 5 ? (
  1009. <div>
  1010. <h3
  1011. style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}
  1012. >
  1013. 当前财务状态(财务填写)
  1014. </h3>
  1015. {financeData.map((item, index) => {
  1016. return <Itemlist key={index} pageData={item} />;
  1017. })}
  1018. </div>
  1019. ) : (
  1020. ""
  1021. )
  1022. ) : this.props.data.status === 4 ? (
  1023. <div>
  1024. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1025. 当前财务状态(财务填写)
  1026. </h3>
  1027. {financeData.map((item, index) => {
  1028. return <Itemlist key={index} pageData={item} />;
  1029. })}
  1030. </div>
  1031. ) : (
  1032. ""
  1033. )} */}
  1034. </div>
  1035. <div
  1036. style={{
  1037. display:
  1038. (this.props.data.processState == 7 ||
  1039. this.props.data.processState == 8) &&
  1040. this.props.data.status == 4 &&
  1041. this.props.data.refundStatus
  1042. ? "block"
  1043. : "none",
  1044. }}
  1045. >
  1046. <Refund data={this.props.data} id={this.props.id} />
  1047. </div>
  1048. {/* <ReactToPrint
  1049. trigger={() => (
  1050. <div className="clearfix">
  1051. <Button type="primary" style={{ float: "right", marginTop: 10 }}>
  1052. 打印
  1053. </Button>
  1054. </div>
  1055. )}
  1056. content={() => this.refs}
  1057. /> */}
  1058. </div>
  1059. );
  1060. }
  1061. }
  1062. export { ChangeDetail };