changeDetailCwzy.js 57 KB

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