changeDetailYxy.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966
  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.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. } else if (item.status == 5) {
  562. item.status = "撤销";
  563. }
  564. return (
  565. <li
  566. key={index}
  567. style={{
  568. width: "100%",
  569. height: "auto",
  570. wordBreak: "break-all",
  571. marginBottom: "10px",
  572. }}
  573. >
  574. {item.aname + ":" + "(" + item.status + ")" + item.remarks}
  575. </li>
  576. );
  577. })}
  578. </ul>
  579. <ProAndCuiList id={this.props.id} />
  580. {/* 收款情况1 */}
  581. <div className="clearfix">
  582. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  583. 收款情况
  584. </h3>
  585. <div style={{ marginLeft: "90px" }}>
  586. <ul>
  587. {(this.props.proceedsData.bill || []).map((item, index) => (
  588. <li key={index}>
  589. {item.payTime +
  590. " " +
  591. item.aName +
  592. " 收款:" +
  593. item.transactionAmount +
  594. "万元"}
  595. </li>
  596. ))}
  597. </ul>
  598. <div>收款总计:{this.props.proceedsTotal}万元</div>
  599. </div>
  600. <br />
  601. <div style={{ marginLeft: "90px" }}>
  602. <ul>
  603. {(this.props.proceedsData.invoice || []).map((item, index) => (
  604. <li key={index}>
  605. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  606. </li>
  607. ))}
  608. </ul>
  609. <div>开票总计:{this.props.invoiceTotal}万元</div>
  610. </div>
  611. <p style={{ marginLeft: "90px", color: "red" }}>
  612. 系统预估 产生成本(万元):
  613. {this.props.data.estimateCost
  614. ? this.props.data.estimateCost
  615. : "0"}{" "}
  616. &nbsp;应退金额(万元):
  617. {this.props.data.estimateRefundable
  618. ? this.props.data.estimateRefundable
  619. : "0"}
  620. </p>
  621. </div>
  622. {/* {this.props.data.type === 0 ? (
  623. <div>
  624. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  625. 当前项目进度(咨询师经理填写)
  626. </h3>
  627. {planData.map((item, index) => {
  628. return <Itemlist key={index} pageData={item} />;
  629. })}
  630. </div>
  631. ) : (
  632. ""
  633. )} */}
  634. {/* 当前财务状态 */}
  635. <div
  636. style={{
  637. display: this.props.data.processState > 5 ? "block" : "none",
  638. marginTop: '10px'
  639. }}
  640. >
  641. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  642. 当前财务状态(财务填写)
  643. </h3>
  644. {financeData.map((item, index) => {
  645. return <Itemlist key={index} pageData={item} orderUid={this.props.orderUid} />;
  646. })}
  647. </div>
  648. {/* 回收退票3 */}
  649. <div
  650. style={{
  651. display:
  652. (this.props.data.processState == 8 ||
  653. this.props.data.processState == 7) &&
  654. (this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6)
  655. ? "block"
  656. : "none",
  657. marginTop: '10px'
  658. }}
  659. >
  660. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  661. 回收退票
  662. </h3>
  663. <Table
  664. size="middle"
  665. pagination={false}
  666. bordered
  667. columns={this.state.ContactsLists}
  668. dataSource={this.state.contactList}
  669. />
  670. </div>
  671. {/* 完成审核,上传附件 */}
  672. <div style={{
  673. position: "relative",
  674. display:
  675. (this.props.data.processState == 7 ||
  676. this.props.data.processState == 8) &&
  677. this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3
  678. ? "block"
  679. : "none",
  680. marginTop: 10,
  681. }}
  682. >
  683. <hr
  684. style={{
  685. marginTop: 12,
  686. marginBottom: 10,
  687. backgroundColor: "black",
  688. height: 1,
  689. border: "none",
  690. }}
  691. />
  692. <h3
  693. style={{
  694. marginLeft: 20,
  695. fontWeight: 800,
  696. marginBottom: 10,
  697. display: "inline-block",
  698. }}
  699. >
  700. 完成审核,上传附件{" "}
  701. <span
  702. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  703. >
  704. (注:由营销员上传变更后附件,全变更流程完成。)
  705. </span>
  706. </h3>
  707. <div>
  708. <Form.Item
  709. label="变更附件"
  710. labelCol={{ span: 4 }}
  711. wrapperCol={{ span: 18 }}
  712. >
  713. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  714. {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'hetongbiangenjiluyxy1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
  715. </div>
  716. <Modal
  717. maskClosable={false}
  718. footer={null}
  719. width={"50%"}
  720. visible={this.state.uploadVisible}
  721. onCancel={() => {
  722. this.setState({ uploadVisible: false, rotateDeg: 0 }, () => {
  723. // this.reset();
  724. });
  725. }}
  726. >
  727. <img
  728. alt=""
  729. style={{
  730. width: "100%",
  731. transform: `rotate(${this.state.rotateDeg}deg)`,
  732. }}
  733. src={this.state.previewImage || ""}
  734. />
  735. <Button
  736. onClick={this.rotate}
  737. style={{
  738. position: "relative",
  739. left: "50%",
  740. transform: "translateX(-50%)",
  741. }}
  742. >
  743. 旋转
  744. </Button>
  745. <Button
  746. onClick={this.upImg}
  747. style={{
  748. position: "absolute",
  749. left: -81,
  750. top: "50%",
  751. transform: "translateY(-50%)",
  752. }}
  753. >
  754. 上一张
  755. </Button>
  756. <Button
  757. onClick={this.downImg}
  758. style={{
  759. position: "absolute",
  760. right: -81,
  761. top: "50%",
  762. transform: "translateY(-50%)",
  763. }}
  764. >
  765. 下一张
  766. </Button>
  767. </Modal>
  768. {/* <Rizhi changeId={this.props.id} /> */}
  769. </Form.Item>
  770. </div>
  771. </div>
  772. {/* <div>
  773. 营销员变更
  774. </div> */}
  775. {/* 完成审核,上传附件 */}
  776. <div style={{
  777. position: "relative",
  778. display:
  779. (this.props.data.processState == 7 ||
  780. this.props.data.processState == 8) &&
  781. this.props.data.status == 6
  782. ? "block"
  783. : "none",
  784. marginTop: 10,
  785. }}
  786. >
  787. <hr
  788. style={{
  789. marginTop: 12,
  790. marginBottom: 10,
  791. backgroundColor: "black",
  792. height: 1,
  793. border: "none",
  794. }}
  795. />
  796. <h3
  797. style={{
  798. marginLeft: 20,
  799. fontWeight: 800,
  800. marginBottom: 10,
  801. display: "inline-block",
  802. }}
  803. >
  804. 完成审核,上传附件{" "}
  805. <span
  806. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  807. >
  808. (注:由营销员上传变更后附件,全变更流程完成。)
  809. </span>
  810. </h3>
  811. <div>
  812. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  813. 变更附件:
  814. </h3>
  815. <div style={{ marginLeft: 20, display: 'inline-block' }}>
  816. <PicturesWall
  817. fileList={this.getVoucherUrl}
  818. pictureUrl={this.state.voucherUrl}
  819. url="/api/admin/orderChange/uploadChangeAttachment"
  820. sign="order_change_file"
  821. />
  822. </div>
  823. </div>
  824. </div>
  825. <div style={{ display: ' flex', justifyContent: 'center' }}>
  826. <Popconfirm
  827. title="确定提交附件,完成订单?"
  828. onConfirm={this.OrderChange}
  829. okText="确定"
  830. cancelText="取消">
  831. <Button
  832. type="primary"
  833. shape="round"
  834. size="large"
  835. style={{
  836. display:
  837. (this.props.data.processState == 7 ||
  838. this.props.data.processState == 8) &&
  839. this.props.data.status == 6
  840. ? "block"
  841. : "none",
  842. }}
  843. // onClick={this.OrderChange}
  844. >
  845. 提交附件,完成订单
  846. </Button>
  847. </Popconfirm>
  848. </div>
  849. {/* <ul>
  850. <span>备注</span>
  851. {this.state.dataSource.map((item, index) => (
  852. <li key={index}>{item.remarks}</li>
  853. ))}
  854. </ul> */}
  855. {/* {this.props.data.type === 0 ? (
  856. this.props.data.processState >= 5 ? (
  857. <div style={{ marginTop: "20px" }}>
  858. <h3
  859. style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}
  860. >
  861. 当前财务状态(财务填写)
  862. </h3>
  863. {financeData.map((item, index) => {
  864. return <Itemlist key={index} pageData={item} />;
  865. })}
  866. </div>
  867. ) : (
  868. ""
  869. )
  870. ) : this.props.data.status === 4 ? (
  871. <div>
  872. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  873. 当前财务状态(财务填写)
  874. </h3>
  875. {financeData.map((item, index) => {
  876. return <Itemlist key={index} pageData={item} />;
  877. })}
  878. </div>
  879. ) : (
  880. ""
  881. )} */}
  882. <div
  883. style={{
  884. display:
  885. (this.props.data.processState == 7 ||
  886. this.props.data.processState == 8) &&
  887. this.props.data.status == 4 &&
  888. this.props.data.refundStatus
  889. ? "block"
  890. : "none",
  891. }}
  892. >
  893. <Refund data={this.props.data} id={this.props.id} />
  894. </div>
  895. </div>
  896. {this.props.processState === this.props.data.processState &&
  897. this.props.data.status != 5 ? (
  898. <div
  899. className="clearfix"
  900. style={{ display: "flex", justifyContent: "space-around" }}
  901. >
  902. {buttonData.map((item, index) => {
  903. return (
  904. <AgreeButton
  905. data={item}
  906. key={index}
  907. backData={this.props.data}
  908. processState={this.props.processState}
  909. onCancel={this.props.onCancel}
  910. />
  911. );
  912. })}
  913. </div>
  914. ) : (
  915. ""
  916. )}
  917. <ReactToPrint
  918. trigger={() => (
  919. <Button
  920. type="primary"
  921. style={{
  922. float: "right",
  923. marginTop: 10,
  924. position: "absolute",
  925. top: 0,
  926. right: 30,
  927. display:
  928. (this.props.data.processState == 7 ||
  929. this.props.data.processState == 8) &&
  930. this.props.data.status == 4
  931. ? "block"
  932. : "block",
  933. }}
  934. >
  935. 打印
  936. </Button>
  937. )}
  938. content={() => this.refs}
  939. />
  940. </div>
  941. );
  942. }
  943. }
  944. export { ChangeDetail };