changeDetailCwjl.js 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676
  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: "合同额(万元)",
  900. formItemLayoutA: formItemLayout,
  901. dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
  902. labelB: "已收款(万元)",
  903. formItemLayoutB: formItemLayout,
  904. dataB: changeColor(this.props.data.settlementAmount)
  905. },
  906. {
  907. labelA: "欠款(万元)",
  908. formItemLayoutA: formItemLayout,
  909. dataA: changeColor(this.props.data.arrears),
  910. labelB: "申请退款(万元)",
  911. formItemLayoutB: formItemLayout,
  912. dataB: changeColor(this.props.data.changeAmount)
  913. },
  914. {
  915. labelA: "首付款(万元)",
  916. formItemLayoutA: formItemLayout,
  917. dataA: changeColor(this.props.data.firstAmount),
  918. },
  919. {
  920. labelA: "变更原因",
  921. formItemLayoutA: formItemLayout,
  922. dataA: this.props.data.remarks
  923. }
  924. ];
  925. const planData = [
  926. {
  927. labelA: "项目进度",
  928. formItemLayoutA: formItemLayout,
  929. dataA: this.props.data.projectState,
  930. onChangeA: value => {
  931. this.setState({
  932. projectState: value
  933. });
  934. },
  935. labelB: "发生成本费用(万元)",
  936. formItemLayoutB: formItemLayout,
  937. dataB: this.props.data.zxsCost,
  938. onChangeB: value => {
  939. this.setState({
  940. zxsCost: value
  941. });
  942. }
  943. },
  944. {
  945. labelA: "备注",
  946. formItemLayoutA: formItemLayout,
  947. dataA: this.props.data.zxsRemarks,
  948. onChangeA: value => {
  949. this.setState({
  950. zxsRemarks: value
  951. });
  952. }
  953. }
  954. ];
  955. const financeData = [
  956. {
  957. labelA: "发生成本(万元)",
  958. formItemLayoutA: formItemLayout,
  959. dataA: this.props.data.cwCost ? this.props.data.cwCost : "0",
  960. onChangeA: value => {
  961. this.setState({
  962. cwCost: value
  963. });
  964. },
  965. labelB: "应退金额(万元)",
  966. formItemLayoutB: formItemLayout,
  967. dataB: this.props.data.refundableAmount
  968. ? this.props.data.refundableAmount
  969. : "0",
  970. onChangeB: value => {
  971. this.setState({
  972. refundableAmount: value
  973. });
  974. },
  975. mark: true
  976. }
  977. // {
  978. // labelA: "备注",
  979. // formItemLayoutA: formItemLayout,
  980. // dataA: this.props.data.cwRemarks,
  981. // onChangeA: value => {
  982. // this.setState({
  983. // reason: value
  984. // });
  985. // },
  986. // mark: false
  987. // }
  988. ];
  989. const buttonData = [
  990. {
  991. name: "同意",
  992. title: "理由",
  993. placeholder: "请输入理由",
  994. type: "primary",
  995. status: 2,
  996. onChange: value => {
  997. this.setState({
  998. remarks: value
  999. });
  1000. }
  1001. },
  1002. {
  1003. name: "拒绝",
  1004. title: "理由",
  1005. placeholder: "请输入理由",
  1006. type: "danger",
  1007. status: 3,
  1008. onChange: value => {
  1009. this.setState({
  1010. remarks: value
  1011. });
  1012. }
  1013. }
  1014. ];
  1015. const orgCodeUrl = this.props.pictureUrl;
  1016. const attachment = this.props.attachment
  1017. return (
  1018. <div className="clearfix changeDetail">
  1019. <div
  1020. className="clearfix"
  1021. ref={(e) => {
  1022. this.refs = e;
  1023. }}
  1024. >
  1025. <div
  1026. style={{
  1027. borderRadius: "50%",
  1028. width: 300,
  1029. height: 300,
  1030. position: "absolute",
  1031. top: 230,
  1032. left: 525,
  1033. transform: "rotate(-5deg)",
  1034. zIndex: 1,
  1035. display:
  1036. this.props.data.status == 4
  1037. ? "block"
  1038. : "none",
  1039. }}
  1040. >
  1041. <img src={tongguo} style={{ width: "100%" }} />
  1042. </div>
  1043. <div
  1044. style={{
  1045. borderRadius: "50%",
  1046. width: 300,
  1047. height: 300,
  1048. position: "absolute",
  1049. top: 284,
  1050. left: 586,
  1051. transform: "rotate(-5deg)",
  1052. zIndex: 1,
  1053. display: this.props.data.status == 5 ? "block" : "none",
  1054. }}
  1055. >
  1056. <img src={quxiao} style={{ width: "63%" }} />
  1057. </div>
  1058. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  1059. 合同变更记录
  1060. </h2>
  1061. {pageData.map((item, index) => {
  1062. return <Itemlist key={index} pageData={item} id={this.props.id} />;
  1063. })}
  1064. <Form.Item
  1065. label="变更凭证"
  1066. labelCol={{ span: 4 }}
  1067. wrapperCol={{ span: 18 }}
  1068. >
  1069. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1070. <ImgList domId={this.props.domId ? this.props.domId : 'changeDetailCwjlqq'} fileList={orgCodeUrl} ItemWidth={'96px'} />
  1071. </div>
  1072. <Rizhi changeId={this.props.id} />
  1073. </Form.Item>
  1074. {
  1075. this.props.contractPictureUrl && this.props.contractPictureUrl.length != 0 &&
  1076. <div className="clearfix">
  1077. <Form.Item
  1078. labelCol={{ span: 4 }}
  1079. wrapperCol={{ span: 18 }}
  1080. label="最新合同"
  1081. >
  1082. <div style={{ paddingTop: 10 }}>
  1083. <ImgList
  1084. domId={"zxht"}
  1085. fileList={
  1086. this.props.contractPictureUrl
  1087. }
  1088. ItemWidth={"96px"}
  1089. />
  1090. </div>
  1091. </Form.Item>
  1092. </div>
  1093. }
  1094. <ul
  1095. style={{
  1096. width: "868px",
  1097. overflow: "hidden",
  1098. paddingLeft: "90px",
  1099. paddingTop: "10px",
  1100. position: "relative",
  1101. bottom: "20px",
  1102. fontSize: "12px",
  1103. color: "rgba(0, 0, 0, 0.65)",
  1104. }}
  1105. >
  1106. {/* <span>操作人:</span> */}
  1107. {this.props.dataSource.map((item, index) => {
  1108. if (item.status == 0) {
  1109. item.status = "发起";
  1110. } else if (item.status == 1) {
  1111. item.status = "审核中";
  1112. } else if (item.status == 2) {
  1113. item.status = "通过";
  1114. } else if (item.status == 3) {
  1115. item.status = "驳回";
  1116. } else if (item.status == 4) {
  1117. item.status = "完成";
  1118. } else if (item.status == 5) {
  1119. item.status = "撤销";
  1120. }
  1121. return (
  1122. <li
  1123. key={index}
  1124. style={{
  1125. width: "100%",
  1126. height: "auto",
  1127. wordBreak: "break-all",
  1128. marginBottom: "10px",
  1129. }}
  1130. >
  1131. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  1132. </li>
  1133. );
  1134. })}
  1135. </ul>
  1136. <ProAndCuiList id={this.props.id} />
  1137. {/* 收款情况 */}
  1138. <div className="clearfix">
  1139. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1140. 收款情况
  1141. </h3>
  1142. <div style={{ marginLeft: "90px" }}>
  1143. <ul style={{ fontSize: "12px", color: "rgba(0, 0, 0, 0.65)" }}>
  1144. {(this.props.proceedsData.bill || []).map((item, index) => (
  1145. <li key={index}>
  1146. {item.payTime +
  1147. " " +
  1148. item.aName +
  1149. " 收款:" +
  1150. item.transactionAmount +
  1151. "万元"}
  1152. </li>
  1153. ))}
  1154. </ul>
  1155. <div>收款总计:{this.props.proceedsTotal}万元</div>
  1156. </div>
  1157. <br />
  1158. <div style={{ marginLeft: "90px" }}>
  1159. <ul style={{ fontSize: "12px", color: "rgba(0, 0, 0, 0.65)" }}>
  1160. {(this.props.proceedsData.invoice || []).map((item, index) => (
  1161. <li key={index}>
  1162. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  1163. </li>
  1164. ))}
  1165. </ul>
  1166. <div>开票总计:{this.props.invoiceTotal}万元</div>
  1167. </div>
  1168. <p style={{ marginLeft: "90px", color: "red" }}>
  1169. 系统预估 产生成本(万元):
  1170. {this.props.data.estimateCost
  1171. ? this.props.data.estimateCost
  1172. : "0"}{" "}
  1173. &nbsp;应退金额(万元):
  1174. {this.props.data.estimateRefundable
  1175. ? this.props.data.estimateRefundable
  1176. : "0"}
  1177. </p>
  1178. </div>
  1179. {/* {this.props.data.type === 0 ? (
  1180. <div>
  1181. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1182. 当前项目进度(咨询师经理填写)
  1183. </h3>
  1184. {planData.map((item, index) => {
  1185. return <Itemlist key={index} pageData={item} />;
  1186. })}
  1187. </div>
  1188. ) : (
  1189. ""
  1190. )} */}
  1191. {/* 当前财务状态 */}
  1192. {(this.props.data.processState > 6 &&
  1193. this.props.data.processState <= 8) ||
  1194. (this.props.data.processState === 9 &&
  1195. this.props.data.status === 4) ||
  1196. (1 == 1) ? (
  1197. <div>
  1198. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1199. 当前财务状态(财务填写)
  1200. </h3>
  1201. {/* <div className="clearfix">
  1202. <Form.Item
  1203. className="half-item"
  1204. label="收款时间"
  1205. labelCol={{ span: 8 }}
  1206. wrapperCol={{ span: 14 }}
  1207. >
  1208. <span>{this.props.data.paymentTimes}</span>
  1209. </Form.Item>
  1210. <Form.Item
  1211. className="half-item"
  1212. label="收款金额(万元)"
  1213. labelCol={{ span: 8 }}
  1214. wrapperCol={{ span: 14 }}
  1215. >
  1216. <span>{this.props.data.paymentAmount}</span>
  1217. </Form.Item>
  1218. </div>
  1219. <div className="clearfix">
  1220. <Form.Item
  1221. className="half-item"
  1222. label="开票时间"
  1223. labelCol={{ span: 8 }}
  1224. wrapperCol={{ span: 14 }}
  1225. >
  1226. <span>{this.props.data.invoiceTimes}</span>
  1227. </Form.Item>
  1228. <Form.Item
  1229. className="half-item"
  1230. label="开票金额(万元)"
  1231. labelCol={{ span: 8 }}
  1232. wrapperCol={{ span: 14 }}
  1233. >
  1234. <span>{this.props.data.invoiceAmount}</span>
  1235. </Form.Item>
  1236. </div> */}
  1237. {financeData.map((item, index) => {
  1238. return <Itemlist key={index} pageData={item} />;
  1239. })}
  1240. </div>
  1241. ) : (
  1242. <div style={{ marginBottom: 10 }}>
  1243. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1244. 当前财务状态(财务填写)
  1245. </h3>
  1246. <div className="clearfix">
  1247. {/* <Form.Item
  1248. className="half-item"
  1249. label="收款时间"
  1250. labelCol={{ span: 8 }}
  1251. wrapperCol={{ span: 14 }}
  1252. >
  1253. <DatePicker
  1254. style={{ width: 160 }}
  1255. value={
  1256. this.state.paymentTimes
  1257. ? moment(this.state.paymentTimes)
  1258. : null
  1259. }
  1260. onChange={(_data, dataString) => {
  1261. this.setState({
  1262. paymentTimes: dataString
  1263. });
  1264. }}
  1265. />
  1266. </Form.Item>
  1267. <Form.Item
  1268. className="half-item"
  1269. label="收款金额(万元)"
  1270. labelCol={{ span: 8 }}
  1271. wrapperCol={{ span: 14 }}
  1272. >
  1273. <Input
  1274. style={{ width: 160 }}
  1275. value={this.state.paymentAmount}
  1276. placeholder="请输入收款金额"
  1277. onChange={e => {
  1278. this.setState({
  1279. paymentAmount: e.target.value
  1280. });
  1281. }}
  1282. />
  1283. </Form.Item>
  1284. </div>
  1285. <div className="clearfix">
  1286. <Form.Item
  1287. className="half-item"
  1288. label="开票时间"
  1289. labelCol={{ span: 8 }}
  1290. wrapperCol={{ span: 14 }}
  1291. >
  1292. <DatePicker
  1293. style={{ width: 160 }}
  1294. value={
  1295. this.state.invoiceTimes
  1296. ? moment(this.state.invoiceTimes)
  1297. : null
  1298. }
  1299. onChange={(_data, dataString) => {
  1300. this.setState({
  1301. invoiceTimes: dataString
  1302. });
  1303. }}
  1304. />
  1305. </Form.Item>
  1306. <Form.Item
  1307. className="half-item"
  1308. label="开票金额(万元)"
  1309. labelCol={{ span: 8 }}
  1310. wrapperCol={{ span: 14 }}
  1311. >
  1312. <Input
  1313. style={{ width: 160 }}
  1314. value={this.state.invoiceAmount}
  1315. placeholder="请输入开票金额"
  1316. onChange={e => {
  1317. this.setState({
  1318. invoiceAmount: e.target.value
  1319. });
  1320. }}
  1321. />
  1322. </Form.Item> */}
  1323. <Form.Item
  1324. className="half-item"
  1325. label="发生成本(万元)"
  1326. labelCol={{ span: 8 }}
  1327. wrapperCol={{ span: 14 }}
  1328. >
  1329. <Input
  1330. style={{ width: 160 }}
  1331. value={this.state.cwCost}
  1332. placeholder="请输入发生成本"
  1333. onChange={(e) => {
  1334. this.setState({
  1335. cwCost: e.target.value,
  1336. });
  1337. }}
  1338. />
  1339. </Form.Item>
  1340. <Form.Item
  1341. className="half-item"
  1342. label="应退金额(万元)"
  1343. labelCol={{ span: 8 }}
  1344. wrapperCol={{ span: 14 }}
  1345. >
  1346. <Input
  1347. style={{ width: 160 }}
  1348. value={this.state.refundableAmount}
  1349. placeholder="请输入应退金额"
  1350. onChange={(e) => {
  1351. this.setState({
  1352. refundableAmount: e.target.value,
  1353. });
  1354. }}
  1355. />
  1356. </Form.Item>
  1357. </div>
  1358. {/* <div
  1359. style={{
  1360. marginTop: "10px",
  1361. display:
  1362. this.props.data.processState == 5 &&
  1363. this.props.data.status == 2
  1364. ? "none"
  1365. : "block"
  1366. }}
  1367. >
  1368. <Form.Item
  1369. label="备注"
  1370. labelCol={{ span: 4 }}
  1371. wrapperCol={{ span: 14 }}
  1372. >
  1373. <Input.TextArea
  1374. rows={4}
  1375. value={this.state.reason}
  1376. placeholder="请输入补充资料/备注"
  1377. onChange={e => {
  1378. this.setState({
  1379. reason: e.target.value
  1380. });
  1381. }}
  1382. />
  1383. </Form.Item>
  1384. </div> */}
  1385. </div>
  1386. )}
  1387. {/* 回收退票3 */}
  1388. <div
  1389. style={{
  1390. display:
  1391. (this.props.data.processState == 9 ||
  1392. this.props.data.processState == 8 ||
  1393. this.props.data.processState == 10) &&
  1394. (this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6)
  1395. ? "block"
  1396. : "none",
  1397. marginTop: '10px'
  1398. }}
  1399. >
  1400. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1401. 回收退票
  1402. </h3>
  1403. <Table
  1404. size="middle"
  1405. pagination={false}
  1406. bordered
  1407. columns={this.state.ContactsLists}
  1408. dataSource={this.state.contactList}
  1409. />
  1410. </div>
  1411. <ul
  1412. style={{
  1413. margin: "10px 0 0 20px",
  1414. color: "red",
  1415. display:
  1416. (this.props.data.processState == 8 ||
  1417. this.props.data.processState == 9 ||
  1418. this.props.data.processState == 10) &&
  1419. (this.props.data.status == 4 || this.props.data.status == 2 || this.props.data.status == 3 || this.props.data.status == 6)
  1420. ? "inline-block"
  1421. : "none",
  1422. }}
  1423. >
  1424. <li>
  1425. {"本次应收退票(万元):" +
  1426. (this.props.data.refundableAmount == null
  1427. ? 0
  1428. : this.props.data.refundableAmount)}
  1429. </li>
  1430. <li>
  1431. {"累计已回收退票(万元):" +
  1432. (this.state.refundInvoice == null
  1433. ? 0
  1434. : this.state.refundInvoice)}
  1435. </li>
  1436. </ul>
  1437. {/* 完成审核,上传附件 */}
  1438. <div style={{
  1439. position: "relative",
  1440. display:
  1441. (this.props.data.processState == 8 ||
  1442. this.props.data.processState == 9) &&
  1443. this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6
  1444. ? "block"
  1445. : "none",
  1446. marginTop: 10,
  1447. }}
  1448. >
  1449. <hr
  1450. style={{
  1451. marginTop: 12,
  1452. marginBottom: 10,
  1453. backgroundColor: "black",
  1454. height: 1,
  1455. border: "none",
  1456. }}
  1457. />
  1458. <h3
  1459. style={{
  1460. marginLeft: 20,
  1461. fontWeight: 800,
  1462. marginBottom: 10,
  1463. display: "inline-block",
  1464. }}
  1465. >
  1466. 完成审核,上传附件{" "}
  1467. <span
  1468. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  1469. >
  1470. (注:由营销员上传变更后附件,全变更流程完成。)
  1471. </span>
  1472. </h3>
  1473. <div>
  1474. <Form.Item
  1475. label="变更附件"
  1476. labelCol={{ span: 4 }}
  1477. wrapperCol={{ span: 18 }}
  1478. >
  1479. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1480. {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'changeDetailCwjlqq1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
  1481. </div>
  1482. {/* <Rizhi changeId={this.props.id} /> */}
  1483. </Form.Item>
  1484. </div>
  1485. </div>
  1486. <div
  1487. style={{
  1488. display:
  1489. (this.props.data.processState == 8 ||
  1490. this.props.data.processState == 9 ||
  1491. this.props.data.processState == 10) &&
  1492. this.props.data.status == 4 &&
  1493. this.props.data.refundStatus
  1494. ? "block"
  1495. : "none",
  1496. }}
  1497. >
  1498. <Refund
  1499. data={this.props.data}
  1500. id={this.props.id}
  1501. dataSource={this.state.refundDataSource}
  1502. />
  1503. </div>
  1504. </div>
  1505. <ReactToPrint
  1506. trigger={() => (
  1507. <Button
  1508. type="primary"
  1509. style={{
  1510. float: "right",
  1511. marginTop: 10,
  1512. position: "absolute",
  1513. top: 0,
  1514. right: 30,
  1515. display:
  1516. (this.props.data.processState == 8 ||
  1517. this.props.data.processState == 9 ||
  1518. this.props.data.processState == 10) &&
  1519. this.props.data.status == 4
  1520. ? "block"
  1521. : "block",
  1522. }}
  1523. >
  1524. 打印
  1525. </Button>
  1526. )}
  1527. content={() => this.refs}
  1528. />
  1529. <Modal
  1530. maskClosable={false}
  1531. visible={this.state.addRefundVisible}
  1532. onOk={this.refundCancel}
  1533. onCancel={this.refundCancel}
  1534. width="700px"
  1535. title="添加执行退款"
  1536. footer=""
  1537. className="admin-desc-content"
  1538. >
  1539. <Form
  1540. layout="horizontal"
  1541. onSubmit={this.nextSubmit}
  1542. // id="demand-form"
  1543. >
  1544. <Spin spinning={this.state.loading}>
  1545. <div className="clearfix">
  1546. <FormItem
  1547. className="half-item"
  1548. {...formItemLayoutRefund}
  1549. label="退款金额"
  1550. >
  1551. <Input
  1552. style={{ width: "155px" }}
  1553. placeholder="请输入退款金额"
  1554. value={this.state.refundMoney}
  1555. onChange={(e) => {
  1556. this.setState({
  1557. refundMoney: e.target.value,
  1558. });
  1559. }}
  1560. />
  1561. </FormItem>
  1562. <FormItem
  1563. className="half-item"
  1564. {...formItemLayoutRefund}
  1565. label="退款时间"
  1566. >
  1567. <DatePicker
  1568. value={
  1569. this.state.refundDate
  1570. ? moment(this.state.refundDate)
  1571. : null
  1572. }
  1573. onChange={(date, dateString) => {
  1574. this.setState({
  1575. refundDate: dateString,
  1576. });
  1577. }}
  1578. />
  1579. </FormItem>
  1580. <FormItem
  1581. style={{ height: "auto" }}
  1582. labelCol={{ span: 3 }}
  1583. wrapperCol={{ span: 19 }}
  1584. label="备注"
  1585. >
  1586. <TextArea
  1587. rows={4}
  1588. placeholder="请输入备注信息"
  1589. style={{ width: "95%" }}
  1590. value={this.state.refundRemarks}
  1591. onChange={(e) => {
  1592. this.setState({
  1593. refundRemarks: e.target.value,
  1594. });
  1595. }}
  1596. />
  1597. </FormItem>
  1598. <FormItem
  1599. wrapperCol={{ span: 12, offset: 6 }}
  1600. className="half-middle"
  1601. style={{ marginTop: 10 }}
  1602. >
  1603. <Button
  1604. className="submitSave"
  1605. type="primary"
  1606. onClick={this.sumitRefund}
  1607. >
  1608. 保存
  1609. </Button>
  1610. <Button
  1611. className="submitSave"
  1612. type="ghost"
  1613. style={{ marginLeft: 10 }}
  1614. onClick={this.refundCancel}
  1615. >
  1616. 取消
  1617. </Button>
  1618. </FormItem>
  1619. </div>
  1620. </Spin>
  1621. </Form>
  1622. </Modal>
  1623. </div>
  1624. );
  1625. }
  1626. }
  1627. export { ChangeDetail };