changeDetailCwjl.js 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705
  1. import React, { Component } from "react";
  2. import {
  3. Form,
  4. Upload,
  5. Modal,
  6. Input,
  7. DatePicker,
  8. Button,
  9. message,
  10. Select,
  11. Table,
  12. Popconfirm,
  13. Spin
  14. } from "antd";
  15. import AgreeButton from "./agreeButton.js";
  16. import Rizhi from "./rizhi.js";
  17. import PicturesWall from "./picturesWall";
  18. import moment from "moment";
  19. import { getProcessStatusNew, moneyVerify } from "@/tools.js";
  20. import { shenghePeo, changeColor } from "@/tools.js";
  21. import { typeList } from '@/dataDic.js'
  22. import $ from "jquery/src/ajax";
  23. import ReactToPrint from "react-to-print";
  24. import tongguo from "../../../../../../image/tongguo.png";
  25. import quxiao from "../../../../../../image/quxiao.png";
  26. import ProAndCuiList from "./proAndCuiList.jsx";
  27. import Refund from "./refund.js"
  28. import "./xButton.less"
  29. import ImgList from "../../../../common/imgList";
  30. import FlowChart from '../../../../common/flowchart'; // 流程图
  31. const { RangePicker } = DatePicker;
  32. const { TextArea } = Input;
  33. const FormItem = Form.Item;
  34. const formItemLayout = {
  35. labelCol: { span: 8 },
  36. wrapperCol: { span: 14 }
  37. };
  38. const formItemLayoutRefund = {
  39. labelCol: { span: 5 },
  40. wrapperCol: { span: 11 }
  41. };
  42. const getChangeType = function (e) {
  43. if (e || e == 0) {
  44. let str = e.toString();
  45. let theType = "";
  46. typeList.map(function (item) {
  47. if (item.value == str) {
  48. theType = item.key;
  49. }
  50. });
  51. return theType;
  52. }
  53. };
  54. class Itemlist extends Component {
  55. constructor(props) {
  56. super(props);
  57. }
  58. render() {
  59. let pageData = this.props.pageData;
  60. return (
  61. <div className="clearfix">
  62. <Form.Item
  63. label={pageData.labelA}
  64. {...pageData.formItemLayoutA}
  65. className="half-item"
  66. style={{ marginBottom: "-5px" }}
  67. >
  68. <p style={{ width: 731, wordWrap: "break-word" }}>
  69. {pageData.dataA}
  70. {
  71. pageData.labelA === '当前进度' &&
  72. <FlowChart id={this.props.id} />
  73. }
  74. </p>
  75. </Form.Item>
  76. <Form.Item
  77. label={pageData.labelB}
  78. {...pageData.formItemLayoutB}
  79. className="half-item"
  80. style={{ marginBottom: "-5px" }}
  81. >
  82. <span>{pageData.dataB}</span>
  83. </Form.Item>
  84. </div>
  85. );
  86. }
  87. }
  88. class ItemInput extends Component {
  89. constructor(props) {
  90. super(props);
  91. this.state = {
  92. valueA: "",
  93. valueB: ""
  94. };
  95. }
  96. componentWillReceiveProps(nextProps) {
  97. if (!nextProps.reset) {
  98. this.reset();
  99. }
  100. }
  101. reset() {
  102. this.setState({
  103. valueA: "",
  104. valueB: ""
  105. });
  106. }
  107. render() {
  108. let pageData = this.props.pageData;
  109. return (
  110. <div className="clearfix">
  111. <Form.Item
  112. label={pageData.labelA}
  113. {...pageData.formItemLayoutA}
  114. className="half-item"
  115. >
  116. <Input
  117. value={this.state.valueA}
  118. placeholder={"请输入" + pageData.labelA}
  119. style={{ width: 160 }}
  120. onChange={e => {
  121. this.setState({ valueA: e.target.value });
  122. pageData.onChangeA(e.target.value);
  123. }}
  124. />
  125. </Form.Item>
  126. <Form.Item
  127. label={pageData.labelB}
  128. {...pageData.formItemLayoutB}
  129. className="half-item"
  130. >
  131. {pageData.mark ? (
  132. <Input
  133. value={this.state.valueB}
  134. placeholder={"请输入" + pageData.labelB}
  135. style={{ width: 160 }}
  136. onChange={e => {
  137. this.setState({ valueB: e.target.value });
  138. pageData.onChangeB(e.target.value);
  139. }}
  140. />
  141. ) : (
  142. ""
  143. )}
  144. </Form.Item>
  145. </div>
  146. );
  147. }
  148. }
  149. class ChangeDetail extends Component {
  150. constructor(props) {
  151. super(props);
  152. this.state = {
  153. rotateDeg: 0,
  154. previewVisible: false,
  155. buttonStatus: true,
  156. changeType: 2,
  157. dataSource: [],
  158. voucherUrl: [],
  159. loading: false,
  160. reason: "",
  161. // 累计回收退票
  162. refundInvoice: 0,
  163. // 退票数组
  164. contactList: [],
  165. // 退款数据
  166. refundDataSource: [],
  167. rejectState: 0,
  168. // 收款信息
  169. proceedsData: [],
  170. proceedsTotal: this.props.proceedsTotal,
  171. // 开票信息
  172. invoiceData: [],
  173. invoiceTotal: this.props.invoiceTotal,
  174. cost: 10,
  175. refund: 8,
  176. // 测试添加退票
  177. contactList: this.props.contactList,
  178. // 退款
  179. refundColumn: [
  180. {
  181. title: "退款金额(万元)",
  182. dataIndex: "refundAmount",
  183. key: "refundAmount",
  184. },
  185. {
  186. title: "退款时间",
  187. dataIndex: "refundDate",
  188. key: "refundDate"
  189. },
  190. {
  191. title: "备注",
  192. dataIndex: "remarks",
  193. key: "remarks"
  194. },
  195. {
  196. title: "操作",
  197. dataIndex: "delete",
  198. key: "delete",
  199. render: (text, record) => {
  200. return (
  201. <Popconfirm
  202. title="是否删除?"
  203. onConfirm={() => {
  204. this.deleteRefund(record)
  205. }}
  206. okText="删除"
  207. cancelText="不删除"
  208. >
  209. <Button
  210. style={{ display: !this.props.refundStatus ? "block" : "none" }}
  211. type="danger">
  212. 删除
  213. </Button>
  214. </Popconfirm>
  215. )
  216. }
  217. }
  218. ],
  219. ContactsLists: [
  220. {
  221. title: "金额(万元)",
  222. dataIndex: "amount",
  223. key: "amount",
  224. render: (text, record) => {
  225. return (
  226. <div>
  227. 实际回收退票(万元)
  228. <Input
  229. value={record.amount}
  230. placeholder="请输入金额(必填项)"
  231. disabled={record.load}
  232. key={record.id}
  233. required="required"
  234. onChange={e => {
  235. record.amount = e.target.value;
  236. this.setState({ contactList: this.state.contactList });
  237. }}
  238. style={{ width: "120px" }}
  239. />
  240. </div>
  241. );
  242. }
  243. },
  244. {
  245. title: "时间",
  246. dataIndex: "createTimes",
  247. key: "createTimes",
  248. render: (text, record) => {
  249. return (
  250. <div>
  251. {/* <DatePicker
  252. showTime
  253. placeholder="请输入退票时间"
  254. onChange={v => {
  255. record.time = v._d;
  256. this.setState({ contactList: this.state.contactList });
  257. }}
  258. onOk={v => {
  259. record.time = v._d;
  260. this.setState({ contactList: this.state.contactList });
  261. console.log(this.state);
  262. }}
  263. /> */}
  264. {record.createTimes}
  265. </div>
  266. );
  267. }
  268. },
  269. {
  270. title: "操作",
  271. dataIndex: "dels",
  272. key: "dels",
  273. render: (text, record, index) => {
  274. return (
  275. <div
  276. style={{
  277. display:
  278. (this.props.data.processState == 8 ||
  279. this.props.data.processState == 9 ||
  280. this.props.data.processState == 10) &&
  281. this.props.data.status == 4
  282. ? "none"
  283. : "block"
  284. }}
  285. >
  286. <Popconfirm
  287. title="是否删除?"
  288. onConfirm={() => {
  289. this.confirmDelet(record);
  290. }}
  291. okText="删除"
  292. cancelText="不删除"
  293. >
  294. <Button
  295. style={{
  296. marginRight: "10px",
  297. color: "#ffffff",
  298. background: "#f00",
  299. border: "none",
  300. }}
  301. >
  302. 删除
  303. </Button>
  304. </Popconfirm>
  305. {record.load != true ? (
  306. <Button
  307. type="primary"
  308. onClick={() => {
  309. this.contactSave(record);
  310. }}
  311. >
  312. 保存
  313. </Button>
  314. ) : (
  315. ""
  316. )}
  317. </div>
  318. );
  319. }
  320. }
  321. ]
  322. };
  323. this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
  324. this.changeButtonStatus = this.changeButtonStatus.bind(this);
  325. this.reset = this.reset.bind(this);
  326. this.addcontact = this.addcontact.bind(this);
  327. this.contactSave = this.contactSave.bind(this);
  328. this.confirmDelet = this.confirmDelet.bind(this);
  329. this.finish = this.finish.bind(this);
  330. this.reload = this.reLoad.bind(this);
  331. this.downImg = this.downImg.bind(this);
  332. this.upImg = this.upImg.bind(this);
  333. this.rotate = this.rotate.bind(this);
  334. this.moneyOld = this.moneyOld.bind(this);
  335. this.addRefund = this.addRefund.bind(this);
  336. this.refundCancel = this.refundCancel.bind(this);
  337. this.sumitRefund = this.sumitRefund.bind(this);
  338. this.getVoucherUrl = this.getVoucherUrl.bind(this);
  339. this.refundGetList = this.refundGetList.bind(this);
  340. this.deleteRefund = this.deleteRefund.bind(this);
  341. this.refundExecute = this.refundExecute.bind(this);
  342. }
  343. componentWillReceiveProps(nextProps) {
  344. this.setState({
  345. paymentTimes: nextProps.data.paymentTimes,
  346. paymentAmount: nextProps.data.paymentAmount,
  347. invoiceTimes: nextProps.data.invoiceTimes,
  348. invoiceAmount: nextProps.data.invoiceAmount,
  349. cwCost: nextProps.data.cwCost,
  350. refundableAmount: nextProps.data.refundableAmount,
  351. cwRemarks: nextProps.data.cwRemarks,
  352. contactList: nextProps.contactList,
  353. refundInvoice: nextProps.data.refundInvoice
  354. });
  355. if (!nextProps.reset) {
  356. this.reset();
  357. }
  358. }
  359. refundExecute() {
  360. this.setState({
  361. loading: true
  362. });
  363. $.ajax({
  364. method: "post",
  365. dataType: "json",
  366. crossDomain: false,
  367. url: globalConfig.context + "/api/admin/orderChange/pushRefund",
  368. data: {
  369. id: this.props.id,
  370. refundUrl: this.state.refundUrl
  371. },
  372. success: function (data) {
  373. let theArr = [];
  374. if (data.error && data.error.length) {
  375. message.warning(data.error[0].message);
  376. } else {
  377. message.success("提交退款成功!")
  378. this.refundGetList()
  379. this.props.onCancel()
  380. }
  381. }.bind(this)
  382. }).always(
  383. function () {
  384. this.setState({
  385. loading: false
  386. });
  387. }.bind(this)
  388. );
  389. }
  390. deleteRefund(record) {
  391. this.setState({
  392. loading: true
  393. });
  394. $.ajax({
  395. method: "post",
  396. dataType: "json",
  397. crossDomain: false,
  398. url: globalConfig.context + "/api/admin/orderChange/deleteRefund",
  399. data: {
  400. id: record.id
  401. },
  402. success: function (data) {
  403. let theArr = [];
  404. if (data.error && data.error.length) {
  405. message.warning(data.error[0].message);
  406. } else {
  407. message.success("删除成功!")
  408. this.refundGetList()
  409. }
  410. }.bind(this)
  411. }).always(
  412. function () {
  413. this.setState({
  414. loading: false
  415. });
  416. }.bind(this)
  417. );
  418. }
  419. sumitRefund() {
  420. if (this.state.refundMoney == "" || this.state.refundMoney == undefined) {
  421. message.warning("请填写正确退款金额")
  422. return
  423. } else if (this.state.refundRemarks == "" || this.state.refundRemarks == undefined) {
  424. message.warning("请填写备注")
  425. return
  426. } else if (this.state.refundDate == "" || this.state.refundDate == undefined) {
  427. message.warning("请选择退款时间")
  428. return
  429. }
  430. this.setState({
  431. loading: true
  432. });
  433. $.ajax({
  434. method: "post",
  435. dataType: "json",
  436. crossDomain: false,
  437. url: globalConfig.context + "/api/admin/orderChange/addRefund",
  438. data: {
  439. refundAmount: this.state.refundMoney,
  440. refundDate: this.state.refundDate,
  441. remarks: this.state.refundRemarks,
  442. orderNo: this.props.data.orderNo,
  443. cid: this.props.id,
  444. },
  445. success: function (data) {
  446. let theArr = [];
  447. if (data.error && data.error.length) {
  448. message.warning(data.error[0].message);
  449. } else {
  450. message.success("添加成功!")
  451. this.refundGetList()
  452. this.setState({
  453. addRefundVisible: false
  454. })
  455. }
  456. }.bind(this)
  457. }).always(
  458. function () {
  459. this.setState({
  460. loading: false
  461. });
  462. }.bind(this)
  463. );
  464. }
  465. refundGetList() {
  466. this.setState({
  467. loading: true
  468. });
  469. $.ajax({
  470. method: "get",
  471. dataType: "json",
  472. crossDomain: false,
  473. url: globalConfig.context + "/api/admin/orderChange/listRefund",
  474. data: {
  475. id: this.props.id
  476. },
  477. success: function (data) {
  478. let theArr = [];
  479. if (data.error && data.error.length) {
  480. message.warning(data.error[0].message);
  481. } else {
  482. this.setState({
  483. refundDataSource: data.data
  484. })
  485. }
  486. }.bind(this)
  487. }).always(
  488. function () {
  489. this.setState({
  490. loading: false
  491. });
  492. }.bind(this)
  493. );
  494. }
  495. moneyOld(str, money) {
  496. if (money) {
  497. return (
  498. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>
  499. {str}(原合同金额{money}万元)
  500. </span>
  501. );
  502. } else {
  503. return (
  504. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>
  505. {str}
  506. </span>
  507. );
  508. }
  509. }
  510. componentDidMount() {
  511. window.setTimeout(() => {
  512. const contactList = this.props.contactList;
  513. contactList.forEach(item => {
  514. item.load = true;
  515. });
  516. this.setState({
  517. contactList
  518. });
  519. }, 0);
  520. this.refundGetList()
  521. }
  522. addRefund() {
  523. this.setState({
  524. addRefundVisible: true,
  525. refundMoney: undefined,
  526. refundDate: undefined,
  527. refundRemarks: undefined,
  528. })
  529. }
  530. refundCancel() {
  531. this.setState({
  532. addRefundVisible: false,
  533. refundMoney: undefined,
  534. refundDate: undefined,
  535. refundRemarks: undefined,
  536. })
  537. }
  538. getVoucherUrl(e) {
  539. this.setState({
  540. voucherUrl: e
  541. });
  542. let url = ""
  543. e.forEach((item, index) => {
  544. if (item.response && item.response.data) {
  545. if (index < e.length - 1) {
  546. url += item.response.data + ","
  547. } else {
  548. url += item.response.data
  549. }
  550. }
  551. })
  552. this.setState({
  553. refundUrl: url
  554. })
  555. }
  556. downImg() {
  557. let num = 0;
  558. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  559. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  560. num = i;
  561. }
  562. }
  563. if (num == this.props.pictureUrl.length - 1) {
  564. return message.warning("已经是最后一张了哦");
  565. }
  566. this.state.previewImage = this.props.pictureUrl[num + 1].url;
  567. this.setState({
  568. previewImage: this.state.previewImage,
  569. rotateDeg: 0
  570. });
  571. }
  572. upImg() {
  573. let num = 0;
  574. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  575. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  576. num = i;
  577. }
  578. }
  579. if (num == 0) {
  580. return message.warning("已经是第一张了哦");
  581. }
  582. this.state.previewImage = this.props.pictureUrl[num - 1].url;
  583. this.setState({
  584. previewImage: this.state.previewImage,
  585. rotateDeg: 0
  586. });
  587. }
  588. rotate() {
  589. let rotateDeg = this.state.rotateDeg + 90;
  590. this.setState({
  591. rotateDeg
  592. });
  593. }
  594. reset() {
  595. this.setState({
  596. paymentTimes: null,
  597. paymentAmount: "",
  598. invoiceTimes: null,
  599. invoiceAmount: "",
  600. cwCost: "",
  601. refundableAmount: "",
  602. cwRemarks: ""
  603. });
  604. }
  605. getOrgCodeUrl(e) {
  606. this.setState({
  607. orgCodeUrl: e
  608. });
  609. }
  610. // //查看催款节点
  611. // loaduserss(record) {
  612. // this.state.orderList = [];
  613. // this.setState({
  614. // orderNoss: record ? record.orderNo : this.props.datauser.orderNo
  615. // });
  616. // $.ajax({
  617. // method: "get",
  618. // dataType: "json",
  619. // crossDomain: false,
  620. // url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  621. // data: {
  622. // orderNo: record ? record.orderNo : this.props.datauser.orderNo
  623. // },
  624. // success: function(data) {
  625. // let theArr = [];
  626. // let thisData = [];
  627. // if (!thisData) {
  628. // if (data.error && data.error.length) {
  629. // message.warning(data.error[0].message);
  630. // }
  631. // thisData = {};
  632. // } else {
  633. // for (let i = 0; i < data.data.length; i++) {
  634. // thisData = data.data[i];
  635. // theArr.push({
  636. // key: i,
  637. // dunSubject: thisData.dunSubject
  638. // ? thisData.dunSubject.toString()
  639. // : "", //催款科目
  640. // id: thisData.id, //节点Id
  641. // money: thisData.money, //催款金额
  642. // dunStatus: thisData.dunStatus, //催款状态
  643. // orderNo: record ? record.orderNo : this.props.datauser.orderNo
  644. // });
  645. // }
  646. // this.setState({
  647. // contactList: theArr
  648. // });
  649. // }
  650. // }.bind(this)
  651. // }).always(
  652. // function() {
  653. // this.setState({
  654. // loading: false
  655. // });
  656. // }.bind(this)
  657. // );
  658. // }
  659. timestampToTime(timestamp) {
  660. var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  661. var Y = date.getFullYear() + "-";
  662. var M =
  663. (date.getMonth() + 1 < 10
  664. ? "0" + (date.getMonth() + 1)
  665. : date.getMonth() + 1) + "-";
  666. var D = date.getDate() + " ";
  667. var h = date.getHours() + ":";
  668. var m = date.getMinutes() + ":";
  669. var s = date.getSeconds();
  670. return Y + M + D + h + m + s;
  671. }
  672. reLoad() {
  673. $.ajax({
  674. method: "get",
  675. dataType: "json",
  676. crossDomain: false,
  677. url:
  678. globalConfig.context + "/api/admin/orderChange/listOrderRefundInvoice",
  679. data: {
  680. orderNo: this.props.data.orderNo
  681. },
  682. success: data => {
  683. if (!data) return;
  684. data.data.forEach(item => {
  685. item.load = true;
  686. });
  687. this.setState({
  688. contactList: data.data
  689. });
  690. }
  691. });
  692. }
  693. // 完成订单
  694. finish() {
  695. $.ajax({
  696. url: globalConfig.context + "/api/admin/orderChange/completeOrderChange",
  697. method: "get",
  698. data: {
  699. orderNo: this.props.data.orderNo,
  700. type: this.props.data.type,
  701. id: this.props.data.id
  702. },
  703. success: data => {
  704. if (data) {
  705. message.success("保存成功!");
  706. window.location.reload();
  707. }
  708. }
  709. });
  710. }
  711. contactSave(index) {
  712. if (this.state.contactList) {
  713. let Data = this.state.contactList;
  714. for (var a = 0; a < Data.length; a++) {
  715. if (Data[a].amount == "") {
  716. message.warning("退票金额不能为空");
  717. // this.refs.signFirstPayment.focus();
  718. return false;
  719. }
  720. }
  721. }
  722. // this.setState({
  723. // loading: true
  724. // });
  725. $.ajax({
  726. url:
  727. globalConfig.context + "/api/admin/orderChange/addOrderRefundInvoice",
  728. method: "post",
  729. data: {
  730. orderNo: this.props.data.orderNo,
  731. amount: index.amount
  732. }
  733. }).done(
  734. function (data) {
  735. if (!data.error.length) {
  736. message.success("保存成功!");
  737. let num = 0;
  738. this.state.contactList.forEach(item => {
  739. num += +item.amount;
  740. // if (item.key == index.key) {
  741. // item.load = true;
  742. // let time = this.timestampToTime(new Date().getTime());
  743. // item.createTimes = time;
  744. // }
  745. });
  746. this.setState({
  747. contactList: this.state.contactList,
  748. refundInvoice: num
  749. });
  750. this.reLoad();
  751. } else {
  752. message.warning(data.error[0].message);
  753. }
  754. }.bind(this)
  755. );
  756. }
  757. //点击新增催款节点
  758. addcontact() {
  759. // let key = this.state.contactList.length
  760. // if(key == 0) {
  761. // key
  762. // }
  763. this.state.contactList.push({
  764. key: this.state.contactList.length,
  765. amount: "",
  766. createTime: undefined
  767. // orderNo: this.state.orderNoss,
  768. // dunTarget: this.state.kehuId
  769. });
  770. this.setState({
  771. contactList: this.state.contactList
  772. });
  773. }
  774. //删除收款节点
  775. confirmDelet(index) {
  776. // if (index.id) {
  777. // this.state.contactList.splice(index.key, 1);
  778. // this.setState({
  779. // contactList: this.state.contactList
  780. // });
  781. // this.contactSave();
  782. // } else {
  783. // this.state.contactList.splice(index.key, 1);
  784. // this.setState({
  785. // contactList: this.state.contactList
  786. // });
  787. // }
  788. // if(this.state.contactList.length == 1) {
  789. // this.state.contactList = []
  790. // this.setState({
  791. // contactList: this.state.contactList
  792. // });
  793. // return
  794. // }
  795. // let num = index.key
  796. // if (this.state.contactList[num + 1].key) {
  797. // this.state.contactList[num + 1].key = index.key;
  798. // }
  799. if (index.key || !index.id) {
  800. let num = this.state.contactList.findIndex(item => item.key == index.key);
  801. this.state.contactList.splice(num, 1);
  802. let total = 0;
  803. this.state.contactList.forEach(item => {
  804. total += +item.amount;
  805. });
  806. this.setState({
  807. contactList: this.state.contactList,
  808. refundInvoice: total
  809. });
  810. } else {
  811. $.ajax({
  812. url:
  813. globalConfig.context +
  814. "/api/admin/orderChange/deleteOrderRefundInvoice",
  815. method: "post",
  816. data: {
  817. id: index.id
  818. }
  819. }).done(
  820. function (data) {
  821. if (!data.error.length) {
  822. message.success("删除成功!");
  823. this.reLoad();
  824. } else {
  825. message.warning(data.error[0].message);
  826. }
  827. }.bind(this)
  828. );
  829. }
  830. // console.log(this.state.contactList[num + 1].key);
  831. }
  832. // loadData() {
  833. // $.ajax({
  834. // method: "get",
  835. // dataType: "json",
  836. // async: false,
  837. // crossDomain: false,
  838. // url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  839. // data: {
  840. // changeId: this.props.data.id
  841. // },
  842. // success: function(data) {
  843. // if (data.error.length || data.data.list == "") {
  844. // if (data.error && data.error.length) {
  845. // message.warning(data.error[0].message);
  846. // }
  847. // } else {
  848. // this.setState({
  849. // dataSource: data.data
  850. // });
  851. // }
  852. // }.bind(this)
  853. // });
  854. // }
  855. //同意拒绝按钮的有无
  856. changeButtonStatus() {
  857. this.setState({
  858. buttonStatus: !this.state.buttonStatus
  859. });
  860. }
  861. onRef(ref) {
  862. this.fun = ref;
  863. }
  864. render() {
  865. const pageData = [
  866. {
  867. labelA: "客户名称",
  868. formItemLayoutA: formItemLayout,
  869. dataA: this.props.data.userName,
  870. labelB: "合同编号",
  871. formItemLayoutB: formItemLayout,
  872. dataB: this.props.data.contractNo
  873. },
  874. {
  875. labelA: "时间",
  876. formItemLayoutA: formItemLayout,
  877. dataA: this.props.data.createTimes,
  878. labelB: "发起人",
  879. formItemLayoutB: formItemLayout,
  880. dataB: this.props.data.applicant
  881. },
  882. {
  883. labelA: "当前进度",
  884. formItemLayoutA: formItemLayout,
  885. // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
  886. dataA:
  887. this.props.data.processState == 3 || this.props.data.processState == 4
  888. ? shenghePeo(this.props.data.examineName, this.props.data.processState)
  889. : getProcessStatusNew(
  890. this.props.data.examineName,
  891. this.props.data.processState,
  892. this.props.data.status
  893. ),
  894. labelB: "变更类型",
  895. formItemLayoutB: formItemLayout,
  896. dataB: getChangeType(this.props.data.type)
  897. },
  898. {
  899. labelA: this.props.data.type == 0 ? "企业总经理姓名" : "",
  900. formItemLayoutA: formItemLayout,
  901. dataA: this.props.data.managerContacts,
  902. labelB: "企业总经理联系电话",
  903. formItemLayoutB: formItemLayout,
  904. dataB: this.props.data.managerContactMobile,
  905. },
  906. {
  907. labelA: this.props.data.type == 0 ? "企业联系人姓名" : "",
  908. formItemLayoutA: formItemLayout,
  909. dataA: this.props.data.contacts,
  910. labelB: "企业联系人联系方式",
  911. formItemLayoutB: formItemLayout,
  912. dataB: this.props.data.contactMobile,
  913. },
  914. {
  915. labelA: "合同额(万元)",
  916. formItemLayoutA: formItemLayout,
  917. dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
  918. labelB: "已收款(万元)",
  919. formItemLayoutB: formItemLayout,
  920. dataB: changeColor(this.props.data.settlementAmount)
  921. },
  922. {
  923. labelA: "欠款(万元)",
  924. formItemLayoutA: formItemLayout,
  925. dataA: changeColor(this.props.data.arrears),
  926. labelB: "申请退款(万元)",
  927. formItemLayoutB: formItemLayout,
  928. dataB: changeColor(this.props.data.changeAmount)
  929. },
  930. {
  931. labelA: "首付款(万元)",
  932. formItemLayoutA: formItemLayout,
  933. dataA: changeColor(this.props.data.firstAmount),
  934. },
  935. {
  936. labelA: "变更原因",
  937. formItemLayoutA: formItemLayout,
  938. dataA: this.props.data.remarks
  939. }
  940. ];
  941. const planData = [
  942. {
  943. labelA: "项目进度",
  944. formItemLayoutA: formItemLayout,
  945. dataA: this.props.data.projectState,
  946. onChangeA: value => {
  947. this.setState({
  948. projectState: value
  949. });
  950. },
  951. labelB: "发生成本费用(万元)",
  952. formItemLayoutB: formItemLayout,
  953. dataB: this.props.data.zxsCost,
  954. onChangeB: value => {
  955. this.setState({
  956. zxsCost: value
  957. });
  958. }
  959. },
  960. {
  961. labelA: "备注",
  962. formItemLayoutA: formItemLayout,
  963. dataA: this.props.data.zxsRemarks,
  964. onChangeA: value => {
  965. this.setState({
  966. zxsRemarks: value
  967. });
  968. }
  969. }
  970. ];
  971. const financeData = [
  972. {
  973. labelA: "发生直接成本(万元)",
  974. formItemLayoutA: formItemLayout,
  975. dataA: this.props.data.cwCost ? this.props.data.cwCost : "0",
  976. onChangeA: value => {
  977. this.setState({
  978. cwCost: value
  979. });
  980. },
  981. labelB: "发生间接成本(万元)",
  982. formItemLayoutB: formItemLayout,
  983. dataB: this.props.data.cwIndirectCost ? this.props.data.cwIndirectCost : "0",
  984. onChangeB: value => {
  985. this.setState({
  986. cwIndirectCost: value
  987. });
  988. },
  989. mark: true
  990. },
  991. {
  992. labelA: "应退金额(万元)",
  993. formItemLayoutA: formItemLayout,
  994. dataA: this.props.data.refundableAmount ? this.props.data.refundableAmount : "0",
  995. onChangeA: value => {
  996. this.setState({
  997. refundableAmount: value
  998. });
  999. },
  1000. mark: true
  1001. },
  1002. // {
  1003. // labelA: "备注",
  1004. // formItemLayoutA: formItemLayout,
  1005. // dataA: this.props.data.cwRemarks,
  1006. // onChangeA: value => {
  1007. // this.setState({
  1008. // reason: value
  1009. // });
  1010. // },
  1011. // mark: false
  1012. // }
  1013. ];
  1014. const buttonData = [
  1015. {
  1016. name: "同意",
  1017. title: "理由",
  1018. placeholder: "请输入理由",
  1019. type: "primary",
  1020. status: 2,
  1021. onChange: value => {
  1022. this.setState({
  1023. remarks: value
  1024. });
  1025. }
  1026. },
  1027. {
  1028. name: "拒绝",
  1029. title: "理由",
  1030. placeholder: "请输入理由",
  1031. type: "danger",
  1032. status: 3,
  1033. onChange: value => {
  1034. this.setState({
  1035. remarks: value
  1036. });
  1037. }
  1038. }
  1039. ];
  1040. const orgCodeUrl = this.props.pictureUrl;
  1041. const attachment = this.props.attachment
  1042. return (
  1043. <div className="clearfix changeDetail">
  1044. <div
  1045. className="clearfix"
  1046. ref={(e) => {
  1047. this.refs = e;
  1048. }}
  1049. >
  1050. <div
  1051. style={{
  1052. borderRadius: "50%",
  1053. width: 300,
  1054. height: 300,
  1055. position: "absolute",
  1056. top: 230,
  1057. left: 525,
  1058. transform: "rotate(-5deg)",
  1059. zIndex: 1,
  1060. display:
  1061. this.props.data.status == 4
  1062. ? "block"
  1063. : "none",
  1064. }}
  1065. >
  1066. <img src={tongguo} style={{ width: "100%" }} />
  1067. </div>
  1068. <div
  1069. style={{
  1070. borderRadius: "50%",
  1071. width: 300,
  1072. height: 300,
  1073. position: "absolute",
  1074. top: 284,
  1075. left: 586,
  1076. transform: "rotate(-5deg)",
  1077. zIndex: 1,
  1078. display: this.props.data.status == 5 ? "block" : "none",
  1079. }}
  1080. >
  1081. <img src={quxiao} style={{ width: "63%" }} />
  1082. </div>
  1083. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  1084. 合同变更记录
  1085. </h2>
  1086. {pageData.map((item, index) => {
  1087. return !!item.labelA && <Itemlist key={index} pageData={item} id={this.props.id} />;
  1088. })}
  1089. <Form.Item
  1090. label="变更凭证"
  1091. labelCol={{ span: 4 }}
  1092. wrapperCol={{ span: 18 }}
  1093. >
  1094. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1095. <ImgList domId={this.props.domId ? this.props.domId : 'changeDetailCwjlqq'} fileList={orgCodeUrl} ItemWidth={'96px'} />
  1096. </div>
  1097. <Rizhi changeId={this.props.id} />
  1098. </Form.Item>
  1099. {
  1100. this.props.contractPictureUrl && this.props.contractPictureUrl.length != 0 &&
  1101. <div className="clearfix">
  1102. <Form.Item
  1103. labelCol={{ span: 4 }}
  1104. wrapperCol={{ span: 18 }}
  1105. label="最新合同"
  1106. >
  1107. <div style={{ paddingTop: 10 }}>
  1108. <ImgList
  1109. domId={"zxht"}
  1110. fileList={
  1111. this.props.contractPictureUrl
  1112. }
  1113. ItemWidth={"96px"}
  1114. />
  1115. </div>
  1116. </Form.Item>
  1117. </div>
  1118. }
  1119. <ul
  1120. style={{
  1121. width: "868px",
  1122. overflow: "hidden",
  1123. paddingLeft: "90px",
  1124. paddingTop: "10px",
  1125. position: "relative",
  1126. bottom: "20px",
  1127. fontSize: "12px",
  1128. color: "rgba(0, 0, 0, 0.65)",
  1129. }}
  1130. >
  1131. {/* <span>操作人:</span> */}
  1132. {this.props.dataSource.map((item, index) => {
  1133. if (item.status == 0) {
  1134. item.status = "发起";
  1135. } else if (item.status == 1) {
  1136. item.status = "审核中";
  1137. } else if (item.status == 2) {
  1138. item.status = "通过";
  1139. } else if (item.status == 3) {
  1140. item.status = "驳回";
  1141. } else if (item.status == 4) {
  1142. item.status = "完成";
  1143. } else if (item.status == 5) {
  1144. item.status = "撤销";
  1145. }
  1146. return (
  1147. <li
  1148. key={index}
  1149. style={{
  1150. width: "100%",
  1151. height: "auto",
  1152. wordBreak: "break-all",
  1153. marginBottom: "10px",
  1154. }}
  1155. >
  1156. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  1157. </li>
  1158. );
  1159. })}
  1160. </ul>
  1161. <ProAndCuiList id={this.props.id} />
  1162. {/* 收款情况 */}
  1163. <div className="clearfix">
  1164. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1165. 收款情况
  1166. </h3>
  1167. <div style={{ marginLeft: "90px" }}>
  1168. <ul style={{ fontSize: "12px", color: "rgba(0, 0, 0, 0.65)" }}>
  1169. {(this.props.proceedsData.bill || []).map((item, index) => (
  1170. <li key={index}>
  1171. {item.payTime +
  1172. " " +
  1173. item.aName +
  1174. " 收款:" +
  1175. item.transactionAmount +
  1176. "万元"}
  1177. </li>
  1178. ))}
  1179. </ul>
  1180. <div>收款总计:{this.props.proceedsTotal}万元</div>
  1181. </div>
  1182. <br />
  1183. <div style={{ marginLeft: "90px" }}>
  1184. <ul style={{ fontSize: "12px", color: "rgba(0, 0, 0, 0.65)" }}>
  1185. {(this.props.proceedsData.invoice || []).map((item, index) => (
  1186. <li key={index}>
  1187. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  1188. </li>
  1189. ))}
  1190. </ul>
  1191. <div>开票总计:{this.props.invoiceTotal}万元</div>
  1192. </div>
  1193. <p style={{ marginLeft: "90px", color: "red" }}>
  1194. 系统预估 产生成本(万元):
  1195. {this.props.data.estimateCost
  1196. ? this.props.data.estimateCost
  1197. : "0"}{" "}
  1198. &nbsp;应退金额(万元):
  1199. {this.props.data.estimateRefundable
  1200. ? this.props.data.estimateRefundable
  1201. : "0"}
  1202. </p>
  1203. </div>
  1204. {/* {this.props.data.type === 0 ? (
  1205. <div>
  1206. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1207. 当前项目进度(咨询师经理填写)
  1208. </h3>
  1209. {planData.map((item, index) => {
  1210. return <Itemlist key={index} pageData={item} />;
  1211. })}
  1212. </div>
  1213. ) : (
  1214. ""
  1215. )} */}
  1216. {/* 当前财务状态 */}
  1217. {(this.props.data.processState > 6 &&
  1218. this.props.data.processState <= 8) ||
  1219. (this.props.data.processState === 9 &&
  1220. this.props.data.status === 4) ||
  1221. (1 == 1) ? (
  1222. <div>
  1223. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1224. 当前财务状态(财务填写)
  1225. </h3>
  1226. {/* <div className="clearfix">
  1227. <Form.Item
  1228. className="half-item"
  1229. label="收款时间"
  1230. labelCol={{ span: 8 }}
  1231. wrapperCol={{ span: 14 }}
  1232. >
  1233. <span>{this.props.data.paymentTimes}</span>
  1234. </Form.Item>
  1235. <Form.Item
  1236. className="half-item"
  1237. label="收款金额(万元)"
  1238. labelCol={{ span: 8 }}
  1239. wrapperCol={{ span: 14 }}
  1240. >
  1241. <span>{this.props.data.paymentAmount}</span>
  1242. </Form.Item>
  1243. </div>
  1244. <div className="clearfix">
  1245. <Form.Item
  1246. className="half-item"
  1247. label="开票时间"
  1248. labelCol={{ span: 8 }}
  1249. wrapperCol={{ span: 14 }}
  1250. >
  1251. <span>{this.props.data.invoiceTimes}</span>
  1252. </Form.Item>
  1253. <Form.Item
  1254. className="half-item"
  1255. label="开票金额(万元)"
  1256. labelCol={{ span: 8 }}
  1257. wrapperCol={{ span: 14 }}
  1258. >
  1259. <span>{this.props.data.invoiceAmount}</span>
  1260. </Form.Item>
  1261. </div> */}
  1262. {financeData.map((item, index) => {
  1263. return <Itemlist key={index} pageData={item} />;
  1264. })}
  1265. </div>
  1266. ) : (
  1267. <div style={{ marginBottom: 10 }}>
  1268. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1269. 当前财务状态(财务填写)
  1270. </h3>
  1271. <div className="clearfix">
  1272. {/* <Form.Item
  1273. className="half-item"
  1274. label="收款时间"
  1275. labelCol={{ span: 8 }}
  1276. wrapperCol={{ span: 14 }}
  1277. >
  1278. <DatePicker
  1279. style={{ width: 160 }}
  1280. value={
  1281. this.state.paymentTimes
  1282. ? moment(this.state.paymentTimes)
  1283. : null
  1284. }
  1285. onChange={(_data, dataString) => {
  1286. this.setState({
  1287. paymentTimes: dataString
  1288. });
  1289. }}
  1290. />
  1291. </Form.Item>
  1292. <Form.Item
  1293. className="half-item"
  1294. label="收款金额(万元)"
  1295. labelCol={{ span: 8 }}
  1296. wrapperCol={{ span: 14 }}
  1297. >
  1298. <Input
  1299. style={{ width: 160 }}
  1300. value={this.state.paymentAmount}
  1301. placeholder="请输入收款金额"
  1302. onChange={e => {
  1303. this.setState({
  1304. paymentAmount: e.target.value
  1305. });
  1306. }}
  1307. />
  1308. </Form.Item>
  1309. </div>
  1310. <div className="clearfix">
  1311. <Form.Item
  1312. className="half-item"
  1313. label="开票时间"
  1314. labelCol={{ span: 8 }}
  1315. wrapperCol={{ span: 14 }}
  1316. >
  1317. <DatePicker
  1318. style={{ width: 160 }}
  1319. value={
  1320. this.state.invoiceTimes
  1321. ? moment(this.state.invoiceTimes)
  1322. : null
  1323. }
  1324. onChange={(_data, dataString) => {
  1325. this.setState({
  1326. invoiceTimes: dataString
  1327. });
  1328. }}
  1329. />
  1330. </Form.Item>
  1331. <Form.Item
  1332. className="half-item"
  1333. label="开票金额(万元)"
  1334. labelCol={{ span: 8 }}
  1335. wrapperCol={{ span: 14 }}
  1336. >
  1337. <Input
  1338. style={{ width: 160 }}
  1339. value={this.state.invoiceAmount}
  1340. placeholder="请输入开票金额"
  1341. onChange={e => {
  1342. this.setState({
  1343. invoiceAmount: e.target.value
  1344. });
  1345. }}
  1346. />
  1347. </Form.Item> */}
  1348. <Form.Item
  1349. className="half-item"
  1350. label="发生成本(万元)"
  1351. labelCol={{ span: 8 }}
  1352. wrapperCol={{ span: 14 }}
  1353. >
  1354. <Input
  1355. style={{ width: 160 }}
  1356. value={this.state.cwCost}
  1357. placeholder="请输入发生成本"
  1358. onChange={(e) => {
  1359. this.setState({
  1360. cwCost: e.target.value,
  1361. });
  1362. }}
  1363. />
  1364. </Form.Item>
  1365. <Form.Item
  1366. className="half-item"
  1367. label="应退金额(万元)"
  1368. labelCol={{ span: 8 }}
  1369. wrapperCol={{ span: 14 }}
  1370. >
  1371. <Input
  1372. style={{ width: 160 }}
  1373. value={this.state.refundableAmount}
  1374. placeholder="请输入应退金额"
  1375. onChange={(e) => {
  1376. this.setState({
  1377. refundableAmount: e.target.value,
  1378. });
  1379. }}
  1380. />
  1381. </Form.Item>
  1382. </div>
  1383. {/* <div
  1384. style={{
  1385. marginTop: "10px",
  1386. display:
  1387. this.props.data.processState == 5 &&
  1388. this.props.data.status == 2
  1389. ? "none"
  1390. : "block"
  1391. }}
  1392. >
  1393. <Form.Item
  1394. label="备注"
  1395. labelCol={{ span: 4 }}
  1396. wrapperCol={{ span: 14 }}
  1397. >
  1398. <Input.TextArea
  1399. rows={4}
  1400. value={this.state.reason}
  1401. placeholder="请输入补充资料/备注"
  1402. onChange={e => {
  1403. this.setState({
  1404. reason: e.target.value
  1405. });
  1406. }}
  1407. />
  1408. </Form.Item>
  1409. </div> */}
  1410. </div>
  1411. )}
  1412. {/* 回收退票3 */}
  1413. <div
  1414. style={{
  1415. display:
  1416. (this.props.data.processState == 9 ||
  1417. this.props.data.processState == 8 ||
  1418. this.props.data.processState == 10) &&
  1419. (this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6)
  1420. ? "block"
  1421. : "none",
  1422. marginTop: '10px'
  1423. }}
  1424. >
  1425. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1426. 回收退票
  1427. </h3>
  1428. <Table
  1429. size="middle"
  1430. pagination={false}
  1431. bordered
  1432. columns={this.state.ContactsLists}
  1433. dataSource={this.state.contactList}
  1434. />
  1435. </div>
  1436. <ul
  1437. style={{
  1438. margin: "10px 0 0 20px",
  1439. color: "red",
  1440. display:
  1441. (this.props.data.processState == 8 ||
  1442. this.props.data.processState == 9 ||
  1443. this.props.data.processState == 10) &&
  1444. (this.props.data.status == 4 || this.props.data.status == 2 || this.props.data.status == 3 || this.props.data.status == 6)
  1445. ? "inline-block"
  1446. : "none",
  1447. }}
  1448. >
  1449. <li>
  1450. {"本次应收退票(万元):" +
  1451. (this.props.data.refundableAmount == null
  1452. ? 0
  1453. : this.props.data.refundableAmount)}
  1454. </li>
  1455. <li>
  1456. {"累计已回收退票(万元):" +
  1457. (this.state.refundInvoice == null
  1458. ? 0
  1459. : this.state.refundInvoice)}
  1460. </li>
  1461. </ul>
  1462. {/* 完成审核,上传附件 */}
  1463. <div style={{
  1464. position: "relative",
  1465. display:
  1466. (this.props.data.processState == 8 ||
  1467. this.props.data.processState == 9) &&
  1468. this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6
  1469. ? "block"
  1470. : "none",
  1471. marginTop: 10,
  1472. }}
  1473. >
  1474. <hr
  1475. style={{
  1476. marginTop: 12,
  1477. marginBottom: 10,
  1478. backgroundColor: "black",
  1479. height: 1,
  1480. border: "none",
  1481. }}
  1482. />
  1483. <h3
  1484. style={{
  1485. marginLeft: 20,
  1486. fontWeight: 800,
  1487. marginBottom: 10,
  1488. display: "inline-block",
  1489. }}
  1490. >
  1491. 完成审核,上传附件{" "}
  1492. <span
  1493. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  1494. >
  1495. (注:由营销员上传变更后附件,全变更流程完成。)
  1496. </span>
  1497. </h3>
  1498. <div>
  1499. <Form.Item
  1500. label="变更附件"
  1501. labelCol={{ span: 4 }}
  1502. wrapperCol={{ span: 18 }}
  1503. >
  1504. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1505. {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'changeDetailCwjlqq1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
  1506. </div>
  1507. {/* <Rizhi changeId={this.props.id} /> */}
  1508. </Form.Item>
  1509. </div>
  1510. </div>
  1511. <div
  1512. style={{
  1513. display:
  1514. (this.props.data.processState == 8 ||
  1515. this.props.data.processState == 9 ||
  1516. this.props.data.processState == 10) &&
  1517. this.props.data.status == 4 &&
  1518. this.props.data.refundStatus
  1519. ? "block"
  1520. : "none",
  1521. }}
  1522. >
  1523. <Refund
  1524. data={this.props.data}
  1525. id={this.props.id}
  1526. dataSource={this.state.refundDataSource}
  1527. />
  1528. </div>
  1529. </div>
  1530. <ReactToPrint
  1531. trigger={() => (
  1532. <Button
  1533. type="primary"
  1534. style={{
  1535. float: "right",
  1536. marginTop: 10,
  1537. position: "absolute",
  1538. top: 0,
  1539. right: 30,
  1540. display:
  1541. (this.props.data.processState == 8 ||
  1542. this.props.data.processState == 9 ||
  1543. this.props.data.processState == 10) &&
  1544. this.props.data.status == 4
  1545. ? "block"
  1546. : "block",
  1547. }}
  1548. >
  1549. 打印
  1550. </Button>
  1551. )}
  1552. content={() => this.refs}
  1553. />
  1554. <Modal
  1555. maskClosable={false}
  1556. visible={this.state.addRefundVisible}
  1557. onOk={this.refundCancel}
  1558. onCancel={this.refundCancel}
  1559. width="700px"
  1560. title="添加执行退款"
  1561. footer=""
  1562. className="admin-desc-content"
  1563. >
  1564. <Form
  1565. layout="horizontal"
  1566. onSubmit={this.nextSubmit}
  1567. // id="demand-form"
  1568. >
  1569. <Spin spinning={this.state.loading}>
  1570. <div className="clearfix">
  1571. <FormItem
  1572. className="half-item"
  1573. {...formItemLayoutRefund}
  1574. label="退款金额"
  1575. >
  1576. <Input
  1577. style={{ width: "155px" }}
  1578. placeholder="请输入退款金额"
  1579. value={this.state.refundMoney}
  1580. onChange={(e) => {
  1581. this.setState({
  1582. refundMoney: e.target.value,
  1583. });
  1584. }}
  1585. />
  1586. </FormItem>
  1587. <FormItem
  1588. className="half-item"
  1589. {...formItemLayoutRefund}
  1590. label="退款时间"
  1591. >
  1592. <DatePicker
  1593. value={
  1594. this.state.refundDate
  1595. ? moment(this.state.refundDate)
  1596. : null
  1597. }
  1598. onChange={(date, dateString) => {
  1599. this.setState({
  1600. refundDate: dateString,
  1601. });
  1602. }}
  1603. />
  1604. </FormItem>
  1605. <FormItem
  1606. style={{ height: "auto" }}
  1607. labelCol={{ span: 3 }}
  1608. wrapperCol={{ span: 19 }}
  1609. label="备注"
  1610. >
  1611. <TextArea
  1612. rows={4}
  1613. placeholder="请输入备注信息"
  1614. style={{ width: "95%" }}
  1615. value={this.state.refundRemarks}
  1616. onChange={(e) => {
  1617. this.setState({
  1618. refundRemarks: e.target.value,
  1619. });
  1620. }}
  1621. />
  1622. </FormItem>
  1623. <FormItem
  1624. wrapperCol={{ span: 12, offset: 6 }}
  1625. className="half-middle"
  1626. style={{ marginTop: 10 }}
  1627. >
  1628. <Button
  1629. className="submitSave"
  1630. type="primary"
  1631. onClick={this.sumitRefund}
  1632. >
  1633. 保存
  1634. </Button>
  1635. <Button
  1636. className="submitSave"
  1637. type="ghost"
  1638. style={{ marginLeft: 10 }}
  1639. onClick={this.refundCancel}
  1640. >
  1641. 取消
  1642. </Button>
  1643. </FormItem>
  1644. </div>
  1645. </Spin>
  1646. </Form>
  1647. </Modal>
  1648. </div>
  1649. );
  1650. }
  1651. }
  1652. export { ChangeDetail };