changeDetailYxy.js 29 KB

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