changeDetailYxy.js 30 KB

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