changeDetailYxy.js 29 KB

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