chargeback.jsx 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705
  1. import React from 'react';
  2. import { Button, Input, Spin, Table, message,DatePicker, Tooltip, Form ,Modal,Col,Tabs, Tag} from 'antd';
  3. import $ from 'jquery/src/ajax';
  4. import Picture from '@/manageCenter/publicComponent/picture';
  5. import ResolutionDetail from "@/resolutionDetail";
  6. import moment from 'moment';
  7. import {
  8. getLiquidationStatus,
  9. getApprovedState,
  10. getProcessStatus,
  11. splitUrl,
  12. getjiedian,
  13. getNewOrderStatus,
  14. getRefundStatus,
  15. getCuikuan,
  16. ShowModal
  17. } from "@/tools.js";
  18. import './customer.less';
  19. import ShowModalDiv from "@/showModal.jsx";
  20. import OrderRiZi from "@/orderRiZi.jsx";
  21. import ImgList from "../../../common/imgList";
  22. import {ChooseList} from "./chooseList";
  23. import OrderItemStatus from "../../../common/orderItemStatus";
  24. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  25. const IntentionCustomer = Form.create()(
  26. React.createClass({
  27. loadData(pageNo) {
  28. this.setState({
  29. visitModul: false,
  30. loading: true,
  31. ispage: pageNo,
  32. modalVisible: false,
  33. });
  34. $.ajax({
  35. method: "get",
  36. dataType: "json",
  37. crossDomain: false,
  38. url: globalConfig.context + "/api/admin/newOrder/orderRefundList",
  39. data: {
  40. pageNo: pageNo || 1,
  41. pageSize: this.state.pagination.pageSize,
  42. name: this.state.customerName, //名称
  43. orderNo: this.state.orderNo, //订单编号
  44. starTime: this.state.releaseDate[0], //开始时间
  45. endTime: this.state.releaseDate[1], //结束时间
  46. },
  47. success: function (data) {
  48. ShowModal(this);
  49. let theArr = [];
  50. if (data.error.length || data.data.list == "") {
  51. if (data.error && data.error.length) {
  52. message.warning(data.error[0].message);
  53. }
  54. } else {
  55. for (let i = 0; i < data.data.list.length; i++) {
  56. let thisdata = data.data.list[i];
  57. theArr.push({
  58. key: i,
  59. id: thisdata.id, //用户ID
  60. orderNo: thisdata.orderNo, //订单编号
  61. userName: thisdata.userName, //客户名称
  62. orderStatus: thisdata.orderStatus, //订单状态
  63. refundStatus: thisdata.refundStatus, //退单状态
  64. reason: thisdata.reason, //退单原因
  65. createDate: thisdata.createDate, //退单时间
  66. liquidationStatus: thisdata.liquidationStatus, //结算状态
  67. });
  68. }
  69. this.state.pagination.total = data.data.totalCount;
  70. }
  71. if (data.data && data.data.list && !data.data.list.length) {
  72. this.state.pagination.total = 0;
  73. }
  74. this.setState({
  75. dataSource: theArr,
  76. pageNo: pageNo,
  77. pagination: this.state.pagination,
  78. selectedRowKeys: [],
  79. });
  80. }.bind(this),
  81. }).always(
  82. function () {
  83. this.setState({
  84. loading: false,
  85. });
  86. }.bind(this)
  87. );
  88. },
  89. getInitialState() {
  90. return {
  91. rotateDeg: 0,
  92. page: 1,
  93. resVisible: false,
  94. releaseDate: [],
  95. selectedRowKeys: [],
  96. orgCodeUrl: [],
  97. customerArr: [],
  98. applicationUrl: [],
  99. contractUrl: [],
  100. pagination: {
  101. defaultCurrent: 1,
  102. defaultPageSize: 10,
  103. showQuickJumper: true,
  104. pageSize: 10,
  105. onChange: function (page) {
  106. this.loadData(page);
  107. }.bind(this),
  108. showTotal: function (total) {
  109. return "共" + total + "条数据";
  110. },
  111. },
  112. columns: [
  113. {
  114. title: "退单编号",
  115. dataIndex: "id",
  116. key: "id",
  117. },
  118. {
  119. title: "退单日期",
  120. dataIndex: "createDate",
  121. key: "createDate",
  122. },
  123. {
  124. title: "客户名称",
  125. dataIndex: "userName",
  126. key: "userName",
  127. width:100,
  128. render: (text) => {
  129. return (
  130. <Tooltip title={text}>
  131. <div style={{
  132. maxWidth:'100px',
  133. overflow:'hidden',
  134. textOverflow: "ellipsis",
  135. whiteSpace:'nowrap',
  136. }}>{text}</div>
  137. </Tooltip>
  138. );
  139. },
  140. },
  141. {
  142. title: "订单编号",
  143. dataIndex: "orderNo",
  144. key: "orderNo",
  145. },
  146. {
  147. title: "订单状态",
  148. dataIndex: "orderStatus",
  149. key: "orderStatus",
  150. render: (text) => {
  151. return getNewOrderStatus(text);
  152. },
  153. },
  154. {
  155. title: "结算状态",
  156. dataIndex: "liquidationStatus",
  157. key: "liquidationStatus",
  158. render: (text) => {
  159. return getLiquidationStatus(text);
  160. },
  161. },
  162. {
  163. title: "退单状态",
  164. dataIndex: "refundStatus",
  165. key: "refundStatus",
  166. render: (text) => {
  167. return getRefundStatus(text);
  168. },
  169. },
  170. {
  171. title: "退单原因",
  172. dataIndex: "reason",
  173. key: "reason",
  174. render: (text) => {
  175. return text && text.length > 18
  176. ? text.substr(0, 18) + "..."
  177. : text;
  178. },
  179. },
  180. {
  181. title: "操作",
  182. dataIndex: "abc",
  183. key: "abc",
  184. render: (text, record) => {
  185. return (
  186. <div>
  187. <Button
  188. onClick={(e) => {
  189. e.stopPropagation(), this.visit(record);
  190. }}
  191. type="primary"
  192. >
  193. {this.state.refundStatus == 2
  194. ? "修改退单申请"
  195. : "查看退款申请"}
  196. </Button>
  197. </div>
  198. );
  199. },
  200. },
  201. ],
  202. data: [],
  203. dataSource: [],
  204. columnsX: [
  205. {
  206. title: "业务项目名称",
  207. dataIndex: "commodityName",
  208. key: "commodityName",
  209. render: (text, record) => {
  210. return text + "-" + record.id
  211. }
  212. },
  213. {
  214. title: "项目类别",
  215. dataIndex: "cname",
  216. key: "cname",
  217. },
  218. {
  219. title: "项目数量",
  220. dataIndex: "commodityQuantity",
  221. key: "commodityQuantity",
  222. render: (text, record) => {
  223. if (record.splitStatus == 1) {
  224. return (
  225. <span>
  226. {text}{" "}
  227. <Tag
  228. color="#108ee9"
  229. onClick={(e) => {
  230. e.stopPropagation();
  231. this.showRes(record);
  232. }}
  233. >
  234. 已拆
  235. </Tag>
  236. </span>
  237. );
  238. } else {
  239. return text;
  240. }
  241. },
  242. },
  243. {
  244. title: "金额(万元)",
  245. dataIndex: "commodityPrice",
  246. key: "commodityPrice",
  247. },
  248. {
  249. title: "负责人",
  250. dataIndex: "contacts",
  251. key: "contacts",
  252. },
  253. {
  254. title: "负责人电话",
  255. dataIndex: "contactsMobile",
  256. key: "contactsMobile",
  257. },
  258. {
  259. title: "主要项目",
  260. dataIndex: "main",
  261. key: "main",
  262. render: (text) => {
  263. return text ? "是" : "否";
  264. },
  265. },
  266. {
  267. title: "项目说明",
  268. dataIndex: "taskComment",
  269. key: "taskComment",
  270. render: (text) => {
  271. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  272. },
  273. },
  274. ],
  275. columnsrizhi: [
  276. {
  277. title: "流程",
  278. dataIndex: "processName",
  279. key: "processName",
  280. },
  281. {
  282. title: "操作人",
  283. dataIndex: "adminName",
  284. key: "adminName",
  285. },
  286. {
  287. title: "时间",
  288. dataIndex: "createDate",
  289. key: "createDate",
  290. },
  291. ],
  292. dataSourceX: [],
  293. ContactsListsNew: [
  294. {
  295. title: "项目名称",
  296. dataIndex: "commodityName",
  297. key: "commodityName",
  298. render: (text, record) => {
  299. return <span>{text + "-" + record.tid}</span>;
  300. },
  301. },
  302. {
  303. title: "项目分类",
  304. dataIndex: "projectType",
  305. key: "projectType",
  306. render: (text) => {
  307. let arr = this.state.dataSourceX || [];
  308. let str = "";
  309. for (let i = 0; i < arr.length; i++) {
  310. if (this.state.dataSourceX[i].sort == text) {
  311. str = this.state.dataSourceX[i].cname;
  312. return <span>{str}</span>;
  313. }
  314. }
  315. },
  316. },
  317. {
  318. title: "催款科目",
  319. dataIndex: "dunTypeName",
  320. key: "dunTypeName",
  321. render: (text) => {
  322. if(record.customizeName) {
  323. return text + record.customizeName;
  324. }
  325. return <span>{text}</span>;
  326. },
  327. },
  328. {
  329. title: "时间(天)",
  330. dataIndex: "waitDay",
  331. key: "waitDay",
  332. render: (text, record) => {
  333. if (record.dunTypeName) {
  334. if (record.customizeTimes) {
  335. return record.customizeTimes;
  336. }
  337. return <span>{text}</span>;
  338. }
  339. },
  340. },
  341. {
  342. title: "金额(万元)",
  343. dataIndex: "money",
  344. key: "money",
  345. render: (text, record) => {
  346. if (record.dunTypeName) {
  347. if (record.appropriationRatio && !record.money) {
  348. return <span>{record.appropriationRatio}(拨款比例)</span>;
  349. } else if (record.appropriationRatio && record.money) {
  350. return (
  351. <span>
  352. {text}(比例:{record.appropriationRatio})
  353. </span>
  354. );
  355. } else {
  356. return <span>{text}</span>;
  357. }
  358. }
  359. },
  360. },
  361. {
  362. title: "服务年限",
  363. dataIndex: "startDate",
  364. key: "startDate",
  365. render: (text, record) => {
  366. if (record.dunTypeName) {
  367. return <span>{text}</span>;
  368. }
  369. },
  370. },
  371. {
  372. title: "催款状态",
  373. dataIndex: "status",
  374. key: "status",
  375. render: (text) => {
  376. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  377. },
  378. },
  379. ],
  380. ContactsLists: [
  381. {
  382. title: "催款科目",
  383. dataIndex: "dunSubject",
  384. key: "dunSubject",
  385. render: (text) => {
  386. return getjiedian(text);
  387. },
  388. },
  389. {
  390. title: "金额(万元)",
  391. dataIndex: "money",
  392. key: "money",
  393. },
  394. {
  395. title: "催款状态",
  396. dataIndex: "dunStatus",
  397. key: "dunStatus",
  398. render: (text) => {
  399. return getCuikuan(text);
  400. },
  401. },
  402. ],
  403. };
  404. },
  405. //进入新增拜访记录
  406. visit(record) {
  407. this.setState({
  408. addnextVisible: true,
  409. });
  410. this.tuidanxiangqing(record.id);
  411. },
  412. //退单详情
  413. tuidanxiangqing(id) {
  414. this.setState({
  415. loading: true,
  416. });
  417. $.ajax({
  418. method: "get",
  419. dataType: "json",
  420. crossDomain: false,
  421. url: globalConfig.context + "/api/admin/newOrder/orderRefundDetail",
  422. data: {
  423. id: id,
  424. },
  425. }).done(
  426. function (data) {
  427. if (data.error.length || data.data.list == "") {
  428. if (data.error && data.error.length) {
  429. message.warning(data.error[0].message);
  430. }
  431. } else {
  432. let thisdata = data.data;
  433. this.setState({
  434. id: thisdata.id,
  435. createDate: thisdata.createDate, //退单时间
  436. orderNo: thisdata.orderNo, //订单编号
  437. orderStatus: thisdata.orderStatus, //订单状态
  438. refundStatus: thisdata.refundStatus, //退单状态
  439. applicationUrl: thisdata.applicationUrl
  440. ? splitUrl(
  441. thisdata.applicationUrl,
  442. ",",
  443. globalConfig.avatarHost + "/upload"
  444. )
  445. : [], //申请表附件
  446. contractUrl: thisdata.contractUrl
  447. ? splitUrl(
  448. thisdata.contractUrl,
  449. ",",
  450. globalConfig.avatarHost + "/upload"
  451. )
  452. : [], //合同附件
  453. reason: thisdata.reason, //退单原因
  454. liquidationStatus: thisdata.liquidationStatus, //结算状态
  455. });
  456. this.setState({
  457. loading: false,
  458. });
  459. }
  460. }.bind(this)
  461. );
  462. },
  463. // 拆分详细
  464. showRes(record) {
  465. this.setState({
  466. resVisible: true,
  467. resRecord: record,
  468. });
  469. },
  470. resCancel() {
  471. this.setState({
  472. resVisible: false,
  473. });
  474. },
  475. //点击确认退单
  476. tuidanOk() {
  477. let contractUrls = [];
  478. let applicationUrls = [];
  479. if (this.state.contractUrl.length) {
  480. let picArr = [];
  481. this.state.contractUrl.map(function (item) {
  482. if (
  483. item.response &&
  484. item.response.data &&
  485. item.response.data.length
  486. ) {
  487. picArr.push(item.response.data);
  488. }
  489. });
  490. contractUrls = picArr.join(",");
  491. }
  492. if (this.state.applicationUrl.length) {
  493. let picArr = [];
  494. this.state.applicationUrl.map(function (item) {
  495. if (
  496. item.response &&
  497. item.response.data &&
  498. item.response.data.length
  499. ) {
  500. picArr.push(item.response.data);
  501. }
  502. });
  503. applicationUrls = picArr.join(",");
  504. }
  505. $.ajax({
  506. method: "POST",
  507. dataType: "json",
  508. crossDomain: false,
  509. url: globalConfig.context + "/api/admin/newOrder/updateOrderRefund",
  510. data: {
  511. id: this.state.id, //订单编号
  512. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  513. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  514. reason: this.state.reason, //退单原因
  515. },
  516. }).done(
  517. function (data) {
  518. this.setState({
  519. loading: false,
  520. });
  521. if (!data.error.length) {
  522. message.success("退单成功!");
  523. this.nextCancel();
  524. this.handleCancel();
  525. } else {
  526. message.warning(data.error[0].message);
  527. }
  528. }.bind(this)
  529. );
  530. },
  531. //页面加载函数
  532. componentWillMount() {
  533. this.loadData();
  534. },
  535. //整行点击
  536. tableRowClick(record) {
  537. this.setState({
  538. visible: true,
  539. });
  540. this.xiangqing(record.orderNo);
  541. this.xiangmu(record.orderNo);
  542. this.jiedian(record.orderNo);
  543. this.jiedianNew(record.orderNo);
  544. },
  545. rizhi() {
  546. console.log(this.state.orderNo);
  547. this.setState({
  548. loading: true,
  549. });
  550. $.ajax({
  551. method: "get",
  552. dataType: "json",
  553. crossDomain: false,
  554. url: "/api/admin/newOrder/selectOrderLog",
  555. data: {
  556. orderNo: this.state.orderNo,
  557. },
  558. success: function (data) {
  559. let theArr = [];
  560. let thisData = data.data;
  561. if (!thisData.length) {
  562. if (data.error && data.error.length) {
  563. message.warning(data.error[0].message);
  564. }
  565. thisData = {};
  566. } else {
  567. for (let i = 0; i < data.data.length; i++) {
  568. let thisdata = data.data[i];
  569. theArr.push({
  570. processName: thisdata.processName,
  571. adminName: thisdata.adminName,
  572. createDate: thisdata.createDate,
  573. remarks: thisdata.remarks,
  574. });
  575. }
  576. }
  577. this.setState({
  578. dataSourcerizhi: theArr,
  579. });
  580. }.bind(this),
  581. }).always(
  582. function () {
  583. this.setState({
  584. loading: false,
  585. });
  586. }.bind(this)
  587. );
  588. },
  589. //查看订单日志
  590. getOrderLog() {
  591. this.setState({
  592. rizhivisible: true,
  593. });
  594. this.rizhi();
  595. },
  596. closeOrderLog() {
  597. this.setState({
  598. rizhivisible: false,
  599. });
  600. },
  601. //详情关闭
  602. nextCancel() {
  603. this.setState({
  604. addnextVisible: false,
  605. });
  606. this.resets();
  607. },
  608. //订单详情
  609. xiangqing(orderNos) {
  610. $.ajax({
  611. method: "get",
  612. dataType: "json",
  613. crossDomain: false,
  614. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  615. data: {
  616. orderNo: orderNos,
  617. },
  618. success: function (data) {
  619. if (data.error.length || data.data.list == "") {
  620. if (data.error && data.error.length) {
  621. message.warning(data.error[0].message);
  622. }
  623. } else {
  624. let thisdata = data.data;
  625. this.setState({
  626. orderUid: thisdata.uid,
  627. id: thisdata.id,
  628. kehuId: thisdata.buyerId,
  629. orderNo: thisdata.orderNo, //订单编号
  630. contractNo: thisdata.contractNo, //合同编号
  631. userName: thisdata.userName, //客户名称
  632. signDate: thisdata.signDate, //签单时间
  633. processStatus: thisdata.processStatus, //流程状态
  634. liquidationStatus: thisdata.liquidationStatus, //结算状态
  635. contacts: thisdata.contacts, //企业联系人
  636. contactMobile: thisdata.contactMobile, //联系人电话
  637. legalPerson: thisdata.legalPerson, //法人
  638. legalPersonTel: thisdata.legalPersonTel, //法人电话
  639. firstAmount: thisdata.firstAmount, //签单金额
  640. totalAmount: thisdata.totalAmount, //首付金额
  641. settlementAmount: thisdata.settlementAmount, //已收款项
  642. orderRemarks: thisdata.orderRemarks, //订单留言
  643. orgCodeUrl: thisdata.contractPictureUrl
  644. ? splitUrl(
  645. thisdata.contractPictureUrl,
  646. ",",
  647. globalConfig.avatarHost + "/upload"
  648. )
  649. : [], //图片地址
  650. replenishUrl: thisdata.agreementUrl
  651. ? splitUrl(
  652. thisdata.agreementUrl,
  653. ",",
  654. globalConfig.avatarHost + "/upload"
  655. )
  656. : [],
  657. salesmanName: thisdata.salesmanName, //营销员名称
  658. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  659. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  660. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  661. financeName: thisdata.financeName, //财务名称
  662. financeMobile: thisdata.financeMobile, //财务电话
  663. nowFinance: thisdata.nowFinance, //财务名称
  664. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  665. approval: thisdata.approval.toString(), //特批状态
  666. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  667. deleteSign:thisdata.deleteSign,
  668. });
  669. }
  670. }.bind(this),
  671. }).always(
  672. function () {
  673. this.setState({
  674. loading: false,
  675. });
  676. }.bind(this)
  677. );
  678. },
  679. //项目列表
  680. xiangmu(orderNos) {
  681. $.ajax({
  682. method: "get",
  683. dataType: "json",
  684. crossDomain: false,
  685. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  686. data: {
  687. orderNo: orderNos,
  688. },
  689. success: function (data) {
  690. let theArr = [];
  691. if (data.error.length || data.data.list == "") {
  692. if (data.error && data.error.length) {
  693. message.warning(data.error[0].message);
  694. }
  695. } else {
  696. for (let i = 0; i < data.data.length; i++) {
  697. let thisdata = data.data[i];
  698. thisdata.key = i;
  699. thisdata.sort = thisdata.cSort;
  700. theArr.push(thisdata);
  701. }
  702. }
  703. this.setState({
  704. dataSourceX: theArr,
  705. paginations: false,
  706. });
  707. }.bind(this),
  708. }).always(
  709. function () {
  710. this.setState({
  711. loading: false,
  712. });
  713. }.bind(this)
  714. );
  715. },
  716. //节点列表
  717. jiedian(orderNos) {
  718. $.ajax({
  719. method: "get",
  720. dataType: "json",
  721. crossDomain: false,
  722. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  723. data: {
  724. orderNo: orderNos,
  725. },
  726. success: function (data) {
  727. let theArr = [];
  728. let thisData = [];
  729. if (data.error.length || data.data.list == "") {
  730. if (data.error && data.error.length) {
  731. message.warning(data.error[0].message);
  732. }
  733. } else {
  734. for (let i = 0; i < data.data.length; i++) {
  735. thisData = data.data[i];
  736. theArr.push({
  737. key: i,
  738. dunSubject: thisData.dunSubject
  739. ? thisData.dunSubject.toString()
  740. : "", //催款科目
  741. id: thisData.id, //节点Id
  742. money: thisData.money, //催款金额
  743. dunStatus: thisData.dunStatus, //催款状态
  744. orderNo: thisData.orderNo,
  745. });
  746. }
  747. this.setState({
  748. contactList: theArr,
  749. });
  750. }
  751. }.bind(this),
  752. }).always(
  753. function () {
  754. this.setState({
  755. loading: false,
  756. });
  757. }.bind(this)
  758. );
  759. },
  760. //查看催款节点
  761. jiedianNew(orderNos) {
  762. $.ajax({
  763. method: "get",
  764. dataType: "json",
  765. crossDomain: false,
  766. url:
  767. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  768. data: {
  769. orderNo: orderNos,
  770. },
  771. success: function (data) {
  772. if (data.error && data.error.length) {
  773. message.warning(data.error[0].message);
  774. } else {
  775. let theArr = [];
  776. let thisData = [];
  777. let arr = data.data || [];
  778. let totalCui = 0;
  779. for (let i = 0; i < arr.length; i++) {
  780. thisData = arr[i];
  781. totalCui += +thisData.money;
  782. theArr.push({
  783. key: i,
  784. dunSubject: thisData.dunSubject
  785. ? thisData.dunSubject.toString()
  786. : "", //催款科目
  787. id: thisData.id, //节点Id
  788. money: thisData.money, //催款金额
  789. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  790. commodityName: thisData.commodityName,
  791. projectType: thisData.projectType,
  792. dunTypeName: thisData.dunTypeName,
  793. status: thisData.status,
  794. waitDay: thisData.waitDay,
  795. effectiveCount: thisData.effectiveCount,
  796. startDate: thisData.startDate,
  797. dunType: thisData.dunType,
  798. appropriationRatio: thisData.appropriationRatio,
  799. customizeTimes: thisData.customizeTimes,
  800. customizeName: thisData.customizeName,
  801. tid: thisData.tid,
  802. });
  803. }
  804. if (!totalCui) {
  805. totalCui = 0;
  806. }
  807. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  808. this.setState({
  809. contactListNew: theArr,
  810. totalCui,
  811. });
  812. }
  813. }.bind(this),
  814. }).always(
  815. function () {
  816. this.setState({
  817. loading: false,
  818. });
  819. }.bind(this)
  820. );
  821. },
  822. downImg() {
  823. let num = 0;
  824. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  825. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  826. num = i;
  827. }
  828. }
  829. if (num == this.state.orgCodeUrl.length - 1) {
  830. return message.warning("已经是最后一张了哦");
  831. }
  832. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  833. this.setState({
  834. previewImage: this.state.previewImage,
  835. rotateDeg: 0,
  836. });
  837. },
  838. upImg() {
  839. let num = 0;
  840. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  841. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  842. num = i;
  843. }
  844. }
  845. if (num == 0) {
  846. return message.warning("已经是第一张了哦");
  847. }
  848. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  849. this.setState({
  850. previewImage: this.state.previewImage,
  851. rotateDeg: 0,
  852. });
  853. },
  854. rotate() {
  855. let rotateDeg = this.state.rotateDeg + 90;
  856. this.setState({
  857. rotateDeg,
  858. });
  859. },
  860. downImgs() {
  861. let num = 0;
  862. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  863. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  864. num = i;
  865. }
  866. }
  867. if (num == this.state.replenishUrl.length - 1) {
  868. return message.warning("已经是最后一张了哦");
  869. }
  870. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  871. this.setState({
  872. previewImage: this.state.previewImage,
  873. rotateDeg: 0,
  874. });
  875. },
  876. upImgs() {
  877. let num = 0;
  878. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  879. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  880. num = i;
  881. }
  882. }
  883. if (num == 0) {
  884. return message.warning("已经是第一张了哦");
  885. }
  886. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  887. this.setState({
  888. previewImage: this.state.previewImage,
  889. rotateDeg: 0,
  890. });
  891. },
  892. rotates() {
  893. let rotateDeg = this.state.rotateDeg + 90;
  894. this.setState({
  895. rotateDeg,
  896. });
  897. },
  898. resets() {
  899. this.state.orderNo = "";
  900. this.state.customerName = "";
  901. this.state.releaseDate[0] = undefined;
  902. this.state.releaseDate[1] = undefined;
  903. },
  904. reset() {
  905. this.state.orderNo = "";
  906. this.state.customerName = "";
  907. this.state.releaseDate[0] = undefined;
  908. this.state.releaseDate[1] = undefined;
  909. this.loadData();
  910. },
  911. //搜索
  912. search() {
  913. this.setState({
  914. //signBillVisible:false
  915. });
  916. this.loadData();
  917. },
  918. getOrgCodeUrl(e) {
  919. this.setState({ orgCodeUrl: e });
  920. },
  921. getReplenishUrl(e) {
  922. this.setState({ replenishUrl: e });
  923. },
  924. //关闭详情
  925. visitCancel() {
  926. this.setState({
  927. visible: false,
  928. });
  929. this.resets();
  930. },
  931. visitOk() {
  932. this.setState({
  933. visible: false,
  934. });
  935. this.resets();
  936. },
  937. changeList(arr) {
  938. const newArr = [];
  939. this.state.columns.forEach(item => {
  940. arr.forEach(val => {
  941. if (val === item.title) {
  942. newArr.push(item);
  943. }
  944. });
  945. });
  946. this.setState({
  947. changeList: newArr
  948. });
  949. },
  950. render() {
  951. const formItemLayout = {
  952. labelCol: { span: 8 },
  953. wrapperCol: { span: 14 },
  954. };
  955. const FormItem = Form.Item;
  956. const { RangePicker } = DatePicker;
  957. const cuiDataList = this.state.contactList || [];
  958. const rowSelection = {
  959. selectedRowKeys: this.state.selectedRowKeys,
  960. onChange: (selectedRowKeys, selectedRows) => {
  961. this.setState({
  962. modalVisible: false,
  963. selectedRows: selectedRows.slice(-1),
  964. selectedRowKeys: selectedRowKeys.slice(-1),
  965. });
  966. },
  967. onSelect: (recordt) => {
  968. this.setState({
  969. modalVisible: false,
  970. recordt: recordt.id,
  971. });
  972. },
  973. };
  974. const { TabPane } = Tabs;
  975. return (
  976. <div className="user-content">
  977. {this.state.resVisible ? (
  978. <ResolutionDetail
  979. cancel={this.resCancel}
  980. detail={this.state.resRecord}
  981. visible={this.state.resVisible}
  982. id={this.state.resRecord.orderNo}
  983. />
  984. ) : (
  985. ""
  986. )}
  987. <ShowModalDiv ShowModal={this.state.showModal} />
  988. <div className="content-title">
  989. <span>退单管理</span>
  990. </div>
  991. <div className="user-search">
  992. <Tabs
  993. defaultActiveKey="1"
  994. onChange={this.callback}
  995. className="test"
  996. >
  997. <TabPane tab="搜索" key="1">
  998. <Input
  999. placeholder="客户名称"
  1000. style={{
  1001. width: "150px",
  1002. marginBottom: "10px",
  1003. marginTop: 10,
  1004. marginRight: 10,
  1005. marginLeft: 10,
  1006. }}
  1007. value={this.state.customerName}
  1008. onChange={(e) => {
  1009. this.setState({ customerName: e.target.value });
  1010. }}
  1011. />
  1012. <Input
  1013. placeholder="订单编号"
  1014. style={{ width: "150px", marginRight: 10 }}
  1015. value={this.state.orderNo}
  1016. onChange={(e) => {
  1017. this.setState({ orderNo: e.target.value });
  1018. }}
  1019. />
  1020. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1021. <RangePicker
  1022. value={[
  1023. this.state.releaseDate[0]
  1024. ? moment(this.state.releaseDate[0])
  1025. : null,
  1026. this.state.releaseDate[1]
  1027. ? moment(this.state.releaseDate[1])
  1028. : null,
  1029. ]}
  1030. onChange={(data, dataString) => {
  1031. this.setState({ releaseDate: dataString });
  1032. }}
  1033. />
  1034. <Button
  1035. type="primary"
  1036. onClick={this.search}
  1037. style={{ marginLeft: "10px", marginRight: 10 }}
  1038. >
  1039. 搜索
  1040. </Button>
  1041. <Button onClick={this.reset}>重置</Button>
  1042. </TabPane>
  1043. <TabPane tab="更改表格显示数据" key="2">
  1044. <div style={{ marginLeft: 10 }}>
  1045. <ChooseList
  1046. columns={this.state.columns}
  1047. changeFn={this.changeList}
  1048. changeList={this.state.changeList}
  1049. top={55}
  1050. margin={11}
  1051. />
  1052. </div>
  1053. </TabPane>
  1054. </Tabs>
  1055. <div className="patent-table">
  1056. <Spin spinning={this.state.loading}>
  1057. <Table
  1058. columns={
  1059. this.state.changeList
  1060. ? this.state.changeList
  1061. : this.state.columns
  1062. }
  1063. dataSource={this.state.dataSource}
  1064. // rowSelection={rowSelection}
  1065. pagination={this.state.pagination}
  1066. onRowClick={this.tableRowClick}
  1067. bordered
  1068. size="small"
  1069. />
  1070. </Spin>
  1071. </div>
  1072. {this.state.visible ? <Modal
  1073. maskClosable={false}
  1074. className="customeDetails"
  1075. footer=""
  1076. title="订单详情"
  1077. width="900px"
  1078. visible={this.state.visible}
  1079. onOk={this.visitOk}
  1080. onCancel={this.visitCancel}
  1081. >
  1082. <Form
  1083. layout="horizontal"
  1084. onSubmit={this.handleSubmit}
  1085. id="demand-form"
  1086. style={{ paddingBottom: "40px" }}
  1087. >
  1088. <Spin spinning={this.state.loading}>
  1089. <div className="clearfix">
  1090. <div style={{position:"absolute",top:'-52px',left:'81px',zIndex:10000}}>
  1091. <OrderItemStatus deleteSign={this.state.deleteSign}/>
  1092. </div>
  1093. <FormItem
  1094. className="half-item"
  1095. {...formItemLayout}
  1096. label="订单编号"
  1097. >
  1098. <span>{this.state.orderNo}</span>
  1099. </FormItem>
  1100. <FormItem
  1101. className="half-item"
  1102. {...formItemLayout}
  1103. label="合同编号"
  1104. >
  1105. <span>{this.state.contractNo}</span>
  1106. </FormItem>
  1107. <FormItem
  1108. className="half-item"
  1109. {...formItemLayout}
  1110. label="客户名称"
  1111. >
  1112. <span>{this.state.userName}</span>
  1113. <EnterpriseNameChange
  1114. type='journal'
  1115. style={{ marginLeft: 10 }}
  1116. enterpriseId={this.state.orderUid}/>
  1117. </FormItem>
  1118. <FormItem
  1119. className="half-item"
  1120. {...formItemLayout}
  1121. label="合同签订时间"
  1122. >
  1123. <span>{this.state.signDate}</span>
  1124. </FormItem>
  1125. <FormItem
  1126. className="half-item"
  1127. {...formItemLayout}
  1128. label="流程状态"
  1129. >
  1130. <span>{getProcessStatus(this.state.processStatus)}</span>
  1131. </FormItem>
  1132. <FormItem
  1133. className="half-item"
  1134. {...formItemLayout}
  1135. label="结算状态"
  1136. >
  1137. <span>
  1138. {getLiquidationStatus(this.state.liquidationStatus)}
  1139. </span>
  1140. </FormItem>
  1141. <FormItem
  1142. className="half-item"
  1143. {...formItemLayout}
  1144. label="企业联系人"
  1145. >
  1146. <span>{this.state.contacts}</span>
  1147. </FormItem>
  1148. <FormItem
  1149. className="half-item"
  1150. {...formItemLayout}
  1151. label="联系人电话"
  1152. >
  1153. <span>{this.state.contactMobile}</span>
  1154. </FormItem>
  1155. <FormItem
  1156. className="half-item"
  1157. {...formItemLayout}
  1158. label="企业法人"
  1159. >
  1160. <span>{this.state.legalPerson}</span>
  1161. </FormItem>
  1162. <FormItem
  1163. className="half-item"
  1164. {...formItemLayout}
  1165. label="法人电话"
  1166. >
  1167. <span>{this.state.legalPersonTel}</span>
  1168. </FormItem>
  1169. <FormItem
  1170. className="half-item"
  1171. {...formItemLayout}
  1172. label="签单金额(万元)"
  1173. >
  1174. <span>{this.state.firstAmount}</span>
  1175. </FormItem>
  1176. <FormItem
  1177. className="half-item"
  1178. {...formItemLayout}
  1179. label="首付金额(万元)"
  1180. >
  1181. <span>{this.state.totalAmount}</span>
  1182. </FormItem>
  1183. <FormItem
  1184. className="half-item"
  1185. {...formItemLayout}
  1186. label="特批立项"
  1187. >
  1188. <span>{getApprovedState(this.state.approval)}</span>
  1189. </FormItem>
  1190. <FormItem
  1191. className="half-item"
  1192. {...formItemLayout}
  1193. label="已收款项(万元)"
  1194. >
  1195. <span>{this.state.settlementAmount}</span>
  1196. </FormItem>
  1197. <div className="clearfix">
  1198. <FormItem
  1199. labelCol={{ span: 4 }}
  1200. wrapperCol={{ span: 16 }}
  1201. label="订单留言"
  1202. >
  1203. <span>{this.state.orderRemarks}</span>
  1204. </FormItem>
  1205. </div>
  1206. <div className="clearfix">
  1207. <FormItem
  1208. labelCol={{ span: 4 }}
  1209. wrapperCol={{ span: 18 }}
  1210. label="合同扫描件"
  1211. >
  1212. {/*<Upload*/}
  1213. {/* className="demandDetailShow-upload"*/}
  1214. {/* listType="picture-card"*/}
  1215. {/* fileList={this.state.orgCodeUrl}*/}
  1216. {/* onPreview={(file) => {*/}
  1217. {/* this.setState({*/}
  1218. {/* previewImage: file.url || file.thumbUrl,*/}
  1219. {/* previewVisible: true,*/}
  1220. {/* });*/}
  1221. {/* }}*/}
  1222. {/*/>*/}
  1223. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1224. {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  1225. </div>
  1226. <Modal
  1227. maskClosable={false}
  1228. footer={null}
  1229. width={"50%"}
  1230. visible={this.state.previewVisible}
  1231. onCancel={() => {
  1232. this.setState({
  1233. previewVisible: false,
  1234. rotateDeg: 0,
  1235. });
  1236. }}
  1237. >
  1238. <img
  1239. alt=""
  1240. style={{
  1241. width: "100%",
  1242. transform: `rotate(${this.state.rotateDeg}deg)`,
  1243. }}
  1244. src={this.state.previewImage || ""}
  1245. />
  1246. <Button
  1247. onClick={this.rotate}
  1248. style={{
  1249. position: "relative",
  1250. left: "50%",
  1251. transform: "translateX(-50%)",
  1252. }}
  1253. >
  1254. 旋转
  1255. </Button>
  1256. <Button
  1257. onClick={this.upImg}
  1258. style={{
  1259. position: "absolute",
  1260. left: -81,
  1261. top: "50%",
  1262. transform: "translateY(-50%)",
  1263. }}
  1264. >
  1265. 上一张
  1266. </Button>
  1267. <Button
  1268. onClick={this.downImg}
  1269. style={{
  1270. position: "absolute",
  1271. right: -81,
  1272. top: "50%",
  1273. transform: "translateY(-50%)",
  1274. }}
  1275. >
  1276. 下一张
  1277. </Button>
  1278. </Modal>
  1279. <Button
  1280. style={{
  1281. float: "right",
  1282. marginRight: "140px",
  1283. marginTop: "20px",
  1284. }}
  1285. onClick={this.getOrderLog}
  1286. >
  1287. 查看订单 日志
  1288. </Button>
  1289. </FormItem>
  1290. <FormItem
  1291. labelCol={{ span: 4 }}
  1292. wrapperCol={{ span: 18 }}
  1293. label="补充协议"
  1294. >
  1295. {/*<Upload*/}
  1296. {/* className="demandDetailShow-upload"*/}
  1297. {/* listType="picture-card"*/}
  1298. {/* fileList={this.state.replenishUrl}*/}
  1299. {/* onPreview={(file) => {*/}
  1300. {/* this.setState({*/}
  1301. {/* previewImage: file.url || file.thumbUrl,*/}
  1302. {/* previewVisibles: true,*/}
  1303. {/* });*/}
  1304. {/* }}*/}
  1305. {/*/>*/}
  1306. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1307. {this.state.visible && this.state.replenishUrl ? <ImgList domId={'chargeback1'} fileList={this.state.replenishUrl}/> : <div/>}
  1308. </div>
  1309. <Modal
  1310. maskClosable={false}
  1311. footer={null}
  1312. width={"50%"}
  1313. visible={this.state.previewVisibles}
  1314. onCancel={() => {
  1315. this.setState({ previewVisibles: false, rotateDeg: 0, });
  1316. }}
  1317. >
  1318. <img
  1319. alt=""
  1320. style={{
  1321. width: "100%",
  1322. transform: `rotate(${this.state.rotateDeg}deg)`,
  1323. }}
  1324. src={this.state.previewImage || ""}
  1325. />
  1326. <Button
  1327. onClick={this.rotates}
  1328. style={{
  1329. position: "relative",
  1330. left: "50%",
  1331. transform: "translateX(-50%)",
  1332. }}
  1333. >
  1334. 旋转
  1335. </Button>
  1336. <Button
  1337. onClick={this.upImgs}
  1338. style={{
  1339. position: "absolute",
  1340. left: -81,
  1341. top: "50%",
  1342. transform: "translateY(-50%)",
  1343. }}
  1344. >
  1345. 上一张
  1346. </Button>
  1347. <Button
  1348. onClick={this.downImgs}
  1349. style={{
  1350. position: "absolute",
  1351. right: -81,
  1352. top: "50%",
  1353. transform: "translateY(-50%)",
  1354. }}
  1355. >
  1356. 下一张
  1357. </Button>
  1358. </Modal>
  1359. </FormItem>
  1360. </div>
  1361. <div className="clearfix">
  1362. <FormItem
  1363. className="half-item"
  1364. {...formItemLayout}
  1365. label="订单负责人"
  1366. >
  1367. <span>{this.state.salesmanName}</span>
  1368. </FormItem>
  1369. <FormItem
  1370. className="half-item"
  1371. {...formItemLayout}
  1372. label="订单负责人电话"
  1373. >
  1374. <span>{this.state.salesmanMobile}</span>
  1375. </FormItem>
  1376. </div>
  1377. <div className="clearfix">
  1378. <FormItem
  1379. className="half-item"
  1380. {...formItemLayout}
  1381. label="当前财务负责人"
  1382. >
  1383. <span>{this.state.nowFinance}</span>
  1384. </FormItem>
  1385. <FormItem
  1386. className="half-item"
  1387. {...formItemLayout}
  1388. label="当前财务负责人电话"
  1389. >
  1390. <span>{this.state.nowFinanceMobile}</span>
  1391. </FormItem>
  1392. </div>
  1393. <div className="clearfix">
  1394. <FormItem
  1395. className="half-item"
  1396. {...formItemLayout}
  1397. style={{ opacity: ".5" }}
  1398. label="原订单负责人"
  1399. >
  1400. <span>{this.state.oldSalesmanName}</span>
  1401. </FormItem>
  1402. <FormItem
  1403. className="half-item"
  1404. {...formItemLayout}
  1405. style={{ opacity: ".5" }}
  1406. label="原订单负责人电话"
  1407. >
  1408. <span>{this.state.oldSalesmanMobile}</span>
  1409. </FormItem>
  1410. </div>
  1411. <div className="clearfix">
  1412. <FormItem
  1413. className="half-item"
  1414. style={{ opacity: ".5" }}
  1415. {...formItemLayout}
  1416. label="实际财务操作人"
  1417. >
  1418. <span>{this.state.financeName}</span>
  1419. </FormItem>
  1420. <FormItem
  1421. className="half-item"
  1422. {...formItemLayout}
  1423. style={{ opacity: ".5" }}
  1424. label="实际财务操作人电话"
  1425. >
  1426. <span>{this.state.financeMobile}</span>
  1427. </FormItem>
  1428. </div>
  1429. <div>
  1430. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1431. 项目业务
  1432. </span>
  1433. </div>
  1434. <div className="patent-table">
  1435. <Spin spinning={this.state.loading}>
  1436. <Table
  1437. columns={this.state.columnsX}
  1438. dataSource={this.state.dataSourceX}
  1439. pagination={this.state.paginations}
  1440. bordered
  1441. size="small"
  1442. />
  1443. </Spin>
  1444. </div>
  1445. <div>
  1446. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1447. 催款节点
  1448. </span>
  1449. <span
  1450. style={{
  1451. display: cuiDataList.length ? "none" : "inline-block",
  1452. marginLeft: 10,
  1453. color: "red",
  1454. }}
  1455. >
  1456. 金额总计(万元): {this.state.totalCui}
  1457. </span>
  1458. </div>
  1459. <div className="clearfix">
  1460. <Spin spinning={this.state.loading}>
  1461. <Form layout="horizontal" id="demand-form">
  1462. <Table
  1463. pagination={false}
  1464. bordered
  1465. size="small"
  1466. // columns={this.state.ContactsLists}
  1467. // dataSource={this.state.contactList}
  1468. columns={
  1469. cuiDataList.length
  1470. ? this.state.ContactsLists
  1471. : this.state.ContactsListsNew
  1472. }
  1473. dataSource={
  1474. cuiDataList.length
  1475. ? this.state.contactList
  1476. : this.state.contactListNew
  1477. }
  1478. />
  1479. <Col
  1480. span={24}
  1481. offset={9}
  1482. style={{ marginTop: "15px" }}
  1483. />
  1484. </Form>
  1485. </Spin>
  1486. </div>
  1487. </div>
  1488. </Spin>
  1489. </Form>
  1490. </Modal> : <div/>}
  1491. {this.state.addnextVisible ? <Modal
  1492. maskClosable={false}
  1493. visible={this.state.addnextVisible}
  1494. onOk={this.nextCancel}
  1495. onCancel={this.nextCancel}
  1496. width="800px"
  1497. title={this.state.refundStatus == 2 ? "修改退单申请" : "退单详情"}
  1498. footer=""
  1499. className="admin-desc-content"
  1500. >
  1501. <Form layout="horizontal" id="demand-form">
  1502. <Spin spinning={this.state.loading}>
  1503. <div className="clearfix">
  1504. <FormItem
  1505. className="half-item"
  1506. {...formItemLayout}
  1507. label="退单编号"
  1508. >
  1509. <span>{this.state.id}</span>
  1510. </FormItem>
  1511. <FormItem
  1512. className="half-item"
  1513. {...formItemLayout}
  1514. label="退单日期"
  1515. >
  1516. <span>{this.state.createDate}</span>
  1517. </FormItem>
  1518. <FormItem
  1519. className="half-item"
  1520. {...formItemLayout}
  1521. label="订单编号"
  1522. >
  1523. <span>{this.state.orderNo}</span>
  1524. </FormItem>
  1525. <FormItem
  1526. className="half-item"
  1527. {...formItemLayout}
  1528. label="订单状态"
  1529. >
  1530. <span>{getNewOrderStatus(this.state.orderStatus)}</span>
  1531. </FormItem>
  1532. <FormItem
  1533. className="half-item"
  1534. {...formItemLayout}
  1535. label="退单状态"
  1536. >
  1537. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1538. </FormItem>
  1539. <FormItem
  1540. className="half-item"
  1541. {...formItemLayout}
  1542. label="退款状态"
  1543. >
  1544. <span>
  1545. {getLiquidationStatus(this.state.liquidationStatus)}
  1546. </span>
  1547. </FormItem>
  1548. <div className="clearfix">
  1549. {this.state.refundStatus == 2 ? (
  1550. <FormItem
  1551. labelCol={{ span: 4 }}
  1552. wrapperCol={{ span: 16 }}
  1553. label="终止合同"
  1554. >
  1555. <Picture
  1556. domId={'chargeback4'}
  1557. fileList={(e) => {
  1558. this.setState({ contractUrl: e });
  1559. }}
  1560. pictureUrl={this.state.contractUrl}
  1561. visible={this.props.visible}
  1562. data={{
  1563. sign: "order_refund_file",
  1564. url: "/api/admin/newOrder/uploadRefundOrderFile",
  1565. }}
  1566. />
  1567. </FormItem>
  1568. ) : (
  1569. <FormItem
  1570. labelCol={{ span: 4 }}
  1571. wrapperCol={{ span: 18 }}
  1572. label="合同扫描件"
  1573. >
  1574. {/*<Upload*/}
  1575. {/* className="demandDetailShow-upload"*/}
  1576. {/* listType="picture-card"*/}
  1577. {/* fileList={this.state.orgCodeUrl}*/}
  1578. {/* onPreview={(file) => {*/}
  1579. {/* this.setState({*/}
  1580. {/* previewImage: file.url || file.thumbUrl,*/}
  1581. {/* previewVisible: true,*/}
  1582. {/* });*/}
  1583. {/* }}*/}
  1584. {/*/>*/}
  1585. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1586. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'chargeback2'} fileList={this.state.orgCodeUrl}/> : <div/>}
  1587. </div>
  1588. <Modal
  1589. maskClosable={false}
  1590. footer={null}
  1591. visible={this.state.previewVisible}
  1592. onCancel={() => {
  1593. this.setState({ previewVisible: false });
  1594. }}
  1595. >
  1596. <img
  1597. alt=""
  1598. style={{ width: "100%" }}
  1599. src={this.state.previewImage || ""}
  1600. />
  1601. </Modal>
  1602. </FormItem>
  1603. )}
  1604. </div>
  1605. <div className="clearfix">
  1606. <FormItem
  1607. labelCol={{ span: 4 }}
  1608. wrapperCol={{ span: 16 }}
  1609. label="退单申请表"
  1610. >
  1611. {/*<Upload*/}
  1612. {/* className="demandDetailShow-upload"*/}
  1613. {/* listType="picture-card"*/}
  1614. {/* fileList={this.state.orgCodeUrl}*/}
  1615. {/* onPreview={(file) => {*/}
  1616. {/* this.setState({*/}
  1617. {/* previewImage: file.url || file.thumbUrl,*/}
  1618. {/* previewVisible: true,*/}
  1619. {/* });*/}
  1620. {/* }}*/}
  1621. {/*/>*/}
  1622. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1623. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'chargeback3'} fileList={this.state.orgCodeUrl}/> : <div/>}
  1624. </div>
  1625. </FormItem>
  1626. </div>
  1627. <div className="clearfix">
  1628. <FormItem
  1629. labelCol={{ span: 4 }}
  1630. wrapperCol={{ span: 16 }}
  1631. label="退单理由"
  1632. >
  1633. {this.state.refundStatus == 2 ? (
  1634. <Input
  1635. type="textarea"
  1636. placeholder="请输入退单理由"
  1637. rows={4}
  1638. value={this.state.reason}
  1639. onChange={(e) => {
  1640. this.setState({ reason: e.target.value });
  1641. }}
  1642. />
  1643. ) : (
  1644. <span>{this.state.reason}</span>
  1645. )}
  1646. </FormItem>
  1647. </div>
  1648. {this.state.refundStatus == 2 ? (
  1649. <FormItem
  1650. wrapperCol={{ span: 12, offset: 4 }}
  1651. className="half-middle"
  1652. >
  1653. <Button
  1654. className="submitSave"
  1655. type="primary"
  1656. onClick={this.tuidanOk}
  1657. >
  1658. 重新退单
  1659. </Button>
  1660. <Button
  1661. className="submitSave"
  1662. type="ghost"
  1663. onClick={this.nextCancel}
  1664. >
  1665. 取消
  1666. </Button>
  1667. </FormItem>
  1668. ) : (
  1669. ""
  1670. )}
  1671. </div>
  1672. </Spin>
  1673. </Form>
  1674. </Modal> : <div/>}
  1675. <OrderRiZi
  1676. dataSourcerizhi={this.state.dataSourcerizhi}
  1677. closeOrderLog={this.closeOrderLog}
  1678. visible={this.state.rizhivisible}
  1679. loading={this.state.loading}
  1680. />
  1681. </div>
  1682. </div>
  1683. );
  1684. },
  1685. })
  1686. );
  1687. export default IntentionCustomer;