changeDetailCwjl.js 58 KB

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