changeDetailCwjl.js 49 KB

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