changeDetailCwjl.js 48 KB

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