changeDetailCwzj.js 32 KB

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