chargeback.jsx 56 KB

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