chargeback.jsx 57 KB

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