changeDetailYxy.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  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(
  327. this.props.data.processState == 2
  328. ? this.props.data.consultantExamine
  329. : this.props.data.managerExamine,
  330. this.props.data.processState
  331. )
  332. : getProcessStatusNew(
  333. this.props.data.processState,
  334. this.props.data.status
  335. ),
  336. labelB: "变更类型",
  337. formItemLayoutB: formItemLayout,
  338. dataB: getChangeType(this.props.data.type)
  339. },
  340. {
  341. labelA: "合同额(万元)",
  342. formItemLayoutA: formItemLayout,
  343. dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
  344. labelB: "已收款(万元)",
  345. formItemLayoutB: formItemLayout,
  346. dataB: changeColor(this.props.data.settlementAmount)
  347. },
  348. {
  349. labelA: "欠款(万元)",
  350. formItemLayoutA: formItemLayout,
  351. dataA: changeColor(this.props.data.arrears),
  352. labelB: "申请退款(万元)",
  353. formItemLayoutB: formItemLayout,
  354. dataB: changeColor(this.props.data.changeAmount)
  355. },
  356. {
  357. labelA: "变更原因",
  358. formItemLayoutA: formItemLayout,
  359. dataA: this.props.data.remarks
  360. }
  361. ];
  362. const planData = [
  363. {
  364. labelA: "项目进度",
  365. formItemLayoutA: formItemLayout,
  366. dataA: this.props.data.projectState,
  367. labelB: "发生成本费用(万元)",
  368. formItemLayoutB: formItemLayout,
  369. dataB: this.props.data.zxsCost
  370. },
  371. {
  372. labelA: "备注",
  373. formItemLayoutA: formItemLayout,
  374. dataA: this.props.data.zxsRemarks
  375. }
  376. ];
  377. const financeData = [
  378. {
  379. labelA: "发生成本(万元)",
  380. formItemLayoutA: formItemLayout,
  381. dataA: this.props.data.cwCost,
  382. labelB: "应退金额(万元)",
  383. formItemLayoutB: formItemLayout,
  384. dataB: this.props.data.refundableAmount
  385. }
  386. ];
  387. const buttonData = [
  388. {
  389. name: "同意",
  390. title: "理由",
  391. placeholder: "请输入理由",
  392. type: "primary",
  393. status: 2,
  394. onChange: value => {
  395. this.setState({
  396. remarks: value
  397. });
  398. }
  399. },
  400. {
  401. name: "拒绝",
  402. title: "理由",
  403. placeholder: "请输入理由",
  404. type: "danger",
  405. status: 3,
  406. onChange: value => {
  407. this.setState({
  408. remarks: value
  409. });
  410. }
  411. }
  412. ];
  413. const orgCodeUrl = this.props.pictureUrl;
  414. const attachment = this.props.attachment
  415. return (
  416. <div className="clearfix changeDetail">
  417. <div
  418. className="clearfix"
  419. style={{ marginTop: 0 }}
  420. ref={(e) => {
  421. this.refs = e;
  422. }}
  423. >
  424. <div
  425. style={{
  426. borderRadius: "50%",
  427. width: 300,
  428. height: 300,
  429. position: "absolute",
  430. top: 230,
  431. left: 525,
  432. transform: "rotate(-5deg)",
  433. zIndex: 1,
  434. display:
  435. (this.props.data.processState == 7 ||
  436. this.props.data.processState == 8) &&
  437. this.props.data.status == 4
  438. ? "block"
  439. : "none",
  440. }}
  441. >
  442. {/* <span
  443. style={{
  444. fontSize: 29,
  445. position: "absolute",
  446. left: "50%",
  447. top: "50%",
  448. transform: "translate(-50%,-50%)",
  449. color: "red"
  450. }}
  451. >
  452. 通过
  453. </span> */}
  454. <img src={tongguo} style={{ width: "100%" }} />
  455. </div>
  456. <div
  457. style={{
  458. borderRadius: "50%",
  459. width: 300,
  460. height: 300,
  461. position: "absolute",
  462. top: 284,
  463. left: 586,
  464. transform: "rotate(-5deg)",
  465. zIndex: 1,
  466. display: this.props.data.status == 5 ? "block" : "none",
  467. }}
  468. >
  469. {/* <span
  470. style={{
  471. fontSize: 29,
  472. position: "absolute",
  473. left: "50%",
  474. top: "50%",
  475. transform: "translate(-50%,-50%)",
  476. color: "red"
  477. }}
  478. >
  479. 通过
  480. </span> */}
  481. <img src={quxiao} style={{ width: "63%" }} />
  482. </div>
  483. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  484. 合同变更记录
  485. </h2>
  486. {pageData.map((item, index) => {
  487. return <Itemlist key={index} pageData={item} orderUid={this.props.orderUid} />;
  488. })}
  489. <Form.Item
  490. label="变更凭证"
  491. labelCol={{ span: 4 }}
  492. wrapperCol={{ span: 18 }}
  493. >
  494. {orgCodeUrl ? <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  495. <ImgList domId={this.props.domId ? this.props.domId + '1' : 'changeDetailYxy1'} fileList={orgCodeUrl} ItemWidth={'96px'} />
  496. </div> : <div />}
  497. <div style={{ marginLeft: '-60px' }}>
  498. <Rizhi changeId={this.props.id} />
  499. </div>
  500. </Form.Item>
  501. {/* {this.props.data.type === 0 && this.props.data.processState >= 2 ? (
  502. <div>
  503. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  504. 当前项目进度(咨询师经理填写)
  505. </h3>
  506. {planData.map((item, index) => {
  507. return <Itemlist key={index} pageData={item} />;
  508. })}
  509. </div>
  510. ) : (
  511. ""
  512. )} */}
  513. {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
  514. {
  515. this.props.contractPictureUrl && this.props.contractPictureUrl.length != 0 &&
  516. <div className="clearfix">
  517. <Form.Item
  518. labelCol={{ span: 4 }}
  519. wrapperCol={{ span: 18 }}
  520. label="最新合同"
  521. >
  522. <div style={{ paddingTop: 10 }}>
  523. <ImgList
  524. fileList={
  525. this.props.contractPictureUrl
  526. }
  527. ItemWidth={"96px"}
  528. />
  529. </div>
  530. </Form.Item>
  531. </div>
  532. }
  533. <ul
  534. style={{
  535. width: "868px",
  536. overflow: "hidden",
  537. paddingLeft: "90px",
  538. position: "relative",
  539. bottom: "20px",
  540. paddingTop: '28px'
  541. }}
  542. >
  543. {/* <span>操作人:</span> */}
  544. {this.props.dataSource.map((item, index) => {
  545. if (item.status == 0) {
  546. item.status = "发起";
  547. } else if (item.status == 1) {
  548. item.status = "审核中";
  549. } else if (item.status == 2) {
  550. item.status = "通过";
  551. } else if (item.status == 3) {
  552. item.status = "驳回";
  553. } else if (item.status == 4) {
  554. item.status = "完成";
  555. } else if (item.status == 5) {
  556. item.status = "撤销";
  557. }
  558. return (
  559. <li
  560. key={index}
  561. style={{
  562. width: "100%",
  563. height: "auto",
  564. wordBreak: "break-all",
  565. marginBottom: "10px",
  566. }}
  567. >
  568. {item.aname + ":" + "(" + item.status + ")" + item.remarks}
  569. </li>
  570. );
  571. })}
  572. </ul>
  573. <ProAndCuiList id={this.props.id} />
  574. {/* 收款情况1 */}
  575. <div className="clearfix">
  576. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  577. 收款情况
  578. </h3>
  579. <div style={{ marginLeft: "90px" }}>
  580. <ul>
  581. {(this.props.proceedsData.bill || []).map((item, index) => (
  582. <li key={index}>
  583. {item.payTime +
  584. " " +
  585. item.aName +
  586. " 收款:" +
  587. item.transactionAmount +
  588. "万元"}
  589. </li>
  590. ))}
  591. </ul>
  592. <div>收款总计:{this.props.proceedsTotal}万元</div>
  593. </div>
  594. <br />
  595. <div style={{ marginLeft: "90px" }}>
  596. <ul>
  597. {(this.props.proceedsData.invoice || []).map((item, index) => (
  598. <li key={index}>
  599. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  600. </li>
  601. ))}
  602. </ul>
  603. <div>开票总计:{this.props.invoiceTotal}万元</div>
  604. </div>
  605. <p style={{ marginLeft: "90px", color: "red" }}>
  606. 系统预估 产生成本(万元):
  607. {this.props.data.estimateCost
  608. ? this.props.data.estimateCost
  609. : "0"}{" "}
  610. &nbsp;应退金额(万元):
  611. {this.props.data.estimateRefundable
  612. ? this.props.data.estimateRefundable
  613. : "0"}
  614. </p>
  615. </div>
  616. {/* {this.props.data.type === 0 ? (
  617. <div>
  618. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  619. 当前项目进度(咨询师经理填写)
  620. </h3>
  621. {planData.map((item, index) => {
  622. return <Itemlist key={index} pageData={item} />;
  623. })}
  624. </div>
  625. ) : (
  626. ""
  627. )} */}
  628. {/* 当前财务状态 */}
  629. <div
  630. style={{
  631. display: this.props.data.processState > 5 ? "block" : "none",
  632. marginTop: '10px'
  633. }}
  634. >
  635. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  636. 当前财务状态(财务填写)
  637. </h3>
  638. {financeData.map((item, index) => {
  639. return <Itemlist key={index} pageData={item} orderUid={this.props.orderUid} />;
  640. })}
  641. </div>
  642. {/* 回收退票3 */}
  643. <div
  644. style={{
  645. display:
  646. (this.props.data.processState == 8 ||
  647. this.props.data.processState == 7) &&
  648. (this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6)
  649. ? "block"
  650. : "none",
  651. marginTop: '10px'
  652. }}
  653. >
  654. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  655. 回收退票
  656. </h3>
  657. <Table
  658. size="middle"
  659. pagination={false}
  660. bordered
  661. columns={this.state.ContactsLists}
  662. dataSource={this.state.contactList}
  663. />
  664. </div>
  665. {/* 完成审核,上传附件 */}
  666. <div style={{
  667. position: "relative",
  668. display:
  669. (this.props.data.processState == 7 ||
  670. this.props.data.processState == 8) &&
  671. this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3
  672. ? "block"
  673. : "none",
  674. marginTop: 10,
  675. }}
  676. >
  677. <hr
  678. style={{
  679. marginTop: 12,
  680. marginBottom: 10,
  681. backgroundColor: "black",
  682. height: 1,
  683. border: "none",
  684. }}
  685. />
  686. <h3
  687. style={{
  688. marginLeft: 20,
  689. fontWeight: 800,
  690. marginBottom: 10,
  691. display: "inline-block",
  692. }}
  693. >
  694. 完成审核,上传附件{" "}
  695. <span
  696. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  697. >
  698. (注:由营销员上传变更后附件,全变更流程完成。)
  699. </span>
  700. </h3>
  701. <div>
  702. <Form.Item
  703. label="变更附件"
  704. labelCol={{ span: 4 }}
  705. wrapperCol={{ span: 18 }}
  706. >
  707. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  708. {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'hetongbiangenjiluyxy1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
  709. </div>
  710. <Modal
  711. maskClosable={false}
  712. footer={null}
  713. width={"50%"}
  714. visible={this.state.uploadVisible}
  715. onCancel={() => {
  716. this.setState({ uploadVisible: false, rotateDeg: 0 }, () => {
  717. // this.reset();
  718. });
  719. }}
  720. >
  721. <img
  722. alt=""
  723. style={{
  724. width: "100%",
  725. transform: `rotate(${this.state.rotateDeg}deg)`,
  726. }}
  727. src={this.state.previewImage || ""}
  728. />
  729. <Button
  730. onClick={this.rotate}
  731. style={{
  732. position: "relative",
  733. left: "50%",
  734. transform: "translateX(-50%)",
  735. }}
  736. >
  737. 旋转
  738. </Button>
  739. <Button
  740. onClick={this.upImg}
  741. style={{
  742. position: "absolute",
  743. left: -81,
  744. top: "50%",
  745. transform: "translateY(-50%)",
  746. }}
  747. >
  748. 上一张
  749. </Button>
  750. <Button
  751. onClick={this.downImg}
  752. style={{
  753. position: "absolute",
  754. right: -81,
  755. top: "50%",
  756. transform: "translateY(-50%)",
  757. }}
  758. >
  759. 下一张
  760. </Button>
  761. </Modal>
  762. {/* <Rizhi changeId={this.props.id} /> */}
  763. </Form.Item>
  764. </div>
  765. </div>
  766. {/* <div>
  767. 营销员变更
  768. </div> */}
  769. {/* 完成审核,上传附件 */}
  770. <div style={{
  771. position: "relative",
  772. display:
  773. (this.props.data.processState == 7 ||
  774. this.props.data.processState == 8) &&
  775. this.props.data.status == 6
  776. ? "block"
  777. : "none",
  778. marginTop: 10,
  779. }}
  780. >
  781. <hr
  782. style={{
  783. marginTop: 12,
  784. marginBottom: 10,
  785. backgroundColor: "black",
  786. height: 1,
  787. border: "none",
  788. }}
  789. />
  790. <h3
  791. style={{
  792. marginLeft: 20,
  793. fontWeight: 800,
  794. marginBottom: 10,
  795. display: "inline-block",
  796. }}
  797. >
  798. 完成审核,上传附件{" "}
  799. <span
  800. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  801. >
  802. (注:由营销员上传变更后附件,全变更流程完成。)
  803. </span>
  804. </h3>
  805. <div>
  806. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  807. 变更附件:
  808. </h3>
  809. <div style={{ marginLeft: 20, display: 'inline-block' }}>
  810. <PicturesWall
  811. fileList={this.getVoucherUrl}
  812. pictureUrl={this.state.voucherUrl}
  813. url="/api/admin/orderChange/uploadChangeAttachment"
  814. sign="order_change_file"
  815. />
  816. </div>
  817. </div>
  818. </div>
  819. <div style={{ display: ' flex', justifyContent: 'center' }}>
  820. <Popconfirm
  821. title="确定提交附件,完成订单?"
  822. onConfirm={this.OrderChange}
  823. okText="确定"
  824. cancelText="取消">
  825. <Button
  826. type="primary"
  827. shape="round"
  828. size="large"
  829. style={{
  830. display:
  831. (this.props.data.processState == 7 ||
  832. this.props.data.processState == 8) &&
  833. this.props.data.status == 6
  834. ? "block"
  835. : "none",
  836. }}
  837. // onClick={this.OrderChange}
  838. >
  839. 提交附件,完成订单
  840. </Button>
  841. </Popconfirm>
  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 };