changeDetailCwzj.js 33 KB

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