changeDetailCwzj.js 34 KB

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