changeDetailYxy.js 28 KB

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