chargeback.jsx 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697
  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. maskClosable={false}
  1073. className="customeDetails"
  1074. footer=""
  1075. title="订单详情"
  1076. width="900px"
  1077. visible={this.state.visible}
  1078. onOk={this.visitOk}
  1079. onCancel={this.visitCancel}
  1080. >
  1081. <Form
  1082. layout="horizontal"
  1083. onSubmit={this.handleSubmit}
  1084. id="demand-form"
  1085. style={{ paddingBottom: "40px" }}
  1086. >
  1087. <Spin spinning={this.state.loading}>
  1088. <div className="clearfix">
  1089. <FormItem
  1090. className="half-item"
  1091. {...formItemLayout}
  1092. label="订单编号"
  1093. >
  1094. <span>{this.state.orderNo}</span>
  1095. </FormItem>
  1096. <FormItem
  1097. className="half-item"
  1098. {...formItemLayout}
  1099. label="合同编号"
  1100. >
  1101. <span>{this.state.contractNo}</span>
  1102. </FormItem>
  1103. <FormItem
  1104. className="half-item"
  1105. {...formItemLayout}
  1106. label="客户名称"
  1107. >
  1108. <span>{this.state.userName}</span>
  1109. </FormItem>
  1110. <FormItem
  1111. className="half-item"
  1112. {...formItemLayout}
  1113. label="合同签订时间"
  1114. >
  1115. <span>{this.state.signDate}</span>
  1116. </FormItem>
  1117. <FormItem
  1118. className="half-item"
  1119. {...formItemLayout}
  1120. label="流程状态"
  1121. >
  1122. <span>{getProcessStatus(this.state.processStatus)}</span>
  1123. </FormItem>
  1124. <FormItem
  1125. className="half-item"
  1126. {...formItemLayout}
  1127. label="结算状态"
  1128. >
  1129. <span>
  1130. {getLiquidationStatus(this.state.liquidationStatus)}
  1131. </span>
  1132. </FormItem>
  1133. <FormItem
  1134. className="half-item"
  1135. {...formItemLayout}
  1136. label="企业联系人"
  1137. >
  1138. <span>{this.state.contacts}</span>
  1139. </FormItem>
  1140. <FormItem
  1141. className="half-item"
  1142. {...formItemLayout}
  1143. label="联系人电话"
  1144. >
  1145. <span>{this.state.contactMobile}</span>
  1146. </FormItem>
  1147. <FormItem
  1148. className="half-item"
  1149. {...formItemLayout}
  1150. label="企业法人"
  1151. >
  1152. <span>{this.state.legalPerson}</span>
  1153. </FormItem>
  1154. <FormItem
  1155. className="half-item"
  1156. {...formItemLayout}
  1157. label="法人电话"
  1158. >
  1159. <span>{this.state.legalPersonTel}</span>
  1160. </FormItem>
  1161. <FormItem
  1162. className="half-item"
  1163. {...formItemLayout}
  1164. label="签单金额(万元)"
  1165. >
  1166. <span>{this.state.firstAmount}</span>
  1167. </FormItem>
  1168. <FormItem
  1169. className="half-item"
  1170. {...formItemLayout}
  1171. label="首付金额(万元)"
  1172. >
  1173. <span>{this.state.totalAmount}</span>
  1174. </FormItem>
  1175. <FormItem
  1176. className="half-item"
  1177. {...formItemLayout}
  1178. label="特批立项"
  1179. >
  1180. <span>{getApprovedState(this.state.approval)}</span>
  1181. </FormItem>
  1182. <FormItem
  1183. className="half-item"
  1184. {...formItemLayout}
  1185. label="已收款项(万元)"
  1186. >
  1187. <span>{this.state.settlementAmount}</span>
  1188. </FormItem>
  1189. <div className="clearfix">
  1190. <FormItem
  1191. labelCol={{ span: 4 }}
  1192. wrapperCol={{ span: 16 }}
  1193. label="订单留言"
  1194. >
  1195. <span>{this.state.orderRemarks}</span>
  1196. </FormItem>
  1197. </div>
  1198. <div className="clearfix">
  1199. <FormItem
  1200. labelCol={{ span: 4 }}
  1201. wrapperCol={{ span: 18 }}
  1202. label="合同扫描件"
  1203. >
  1204. {/*<Upload*/}
  1205. {/* className="demandDetailShow-upload"*/}
  1206. {/* listType="picture-card"*/}
  1207. {/* fileList={this.state.orgCodeUrl}*/}
  1208. {/* onPreview={(file) => {*/}
  1209. {/* this.setState({*/}
  1210. {/* previewImage: file.url || file.thumbUrl,*/}
  1211. {/* previewVisible: true,*/}
  1212. {/* });*/}
  1213. {/* }}*/}
  1214. {/*/>*/}
  1215. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1216. {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  1217. </div>
  1218. <Modal
  1219. maskClosable={false}
  1220. footer={null}
  1221. width={"50%"}
  1222. visible={this.state.previewVisible}
  1223. onCancel={() => {
  1224. this.setState({
  1225. previewVisible: false,
  1226. rotateDeg: 0,
  1227. });
  1228. }}
  1229. >
  1230. <img
  1231. alt=""
  1232. style={{
  1233. width: "100%",
  1234. transform: `rotate(${this.state.rotateDeg}deg)`,
  1235. }}
  1236. src={this.state.previewImage || ""}
  1237. />
  1238. <Button
  1239. onClick={this.rotate}
  1240. style={{
  1241. position: "relative",
  1242. left: "50%",
  1243. transform: "translateX(-50%)",
  1244. }}
  1245. >
  1246. 旋转
  1247. </Button>
  1248. <Button
  1249. onClick={this.upImg}
  1250. style={{
  1251. position: "absolute",
  1252. left: -81,
  1253. top: "50%",
  1254. transform: "translateY(-50%)",
  1255. }}
  1256. >
  1257. 上一张
  1258. </Button>
  1259. <Button
  1260. onClick={this.downImg}
  1261. style={{
  1262. position: "absolute",
  1263. right: -81,
  1264. top: "50%",
  1265. transform: "translateY(-50%)",
  1266. }}
  1267. >
  1268. 下一张
  1269. </Button>
  1270. </Modal>
  1271. <Button
  1272. style={{
  1273. float: "right",
  1274. marginRight: "140px",
  1275. marginTop: "20px",
  1276. }}
  1277. onClick={this.getOrderLog}
  1278. >
  1279. 查看订单 日志
  1280. </Button>
  1281. </FormItem>
  1282. <FormItem
  1283. labelCol={{ span: 4 }}
  1284. wrapperCol={{ span: 18 }}
  1285. label="补充协议"
  1286. >
  1287. {/*<Upload*/}
  1288. {/* className="demandDetailShow-upload"*/}
  1289. {/* listType="picture-card"*/}
  1290. {/* fileList={this.state.replenishUrl}*/}
  1291. {/* onPreview={(file) => {*/}
  1292. {/* this.setState({*/}
  1293. {/* previewImage: file.url || file.thumbUrl,*/}
  1294. {/* previewVisibles: true,*/}
  1295. {/* });*/}
  1296. {/* }}*/}
  1297. {/*/>*/}
  1298. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1299. {this.state.visible && this.state.replenishUrl ? <ImgList domId={'chargeback1'} fileList={this.state.replenishUrl}/> : <div/>}
  1300. </div>
  1301. <Modal
  1302. maskClosable={false}
  1303. footer={null}
  1304. width={"50%"}
  1305. visible={this.state.previewVisibles}
  1306. onCancel={() => {
  1307. this.setState({ previewVisibles: false, rotateDeg: 0, });
  1308. }}
  1309. >
  1310. <img
  1311. alt=""
  1312. style={{
  1313. width: "100%",
  1314. transform: `rotate(${this.state.rotateDeg}deg)`,
  1315. }}
  1316. src={this.state.previewImage || ""}
  1317. />
  1318. <Button
  1319. onClick={this.rotates}
  1320. style={{
  1321. position: "relative",
  1322. left: "50%",
  1323. transform: "translateX(-50%)",
  1324. }}
  1325. >
  1326. 旋转
  1327. </Button>
  1328. <Button
  1329. onClick={this.upImgs}
  1330. style={{
  1331. position: "absolute",
  1332. left: -81,
  1333. top: "50%",
  1334. transform: "translateY(-50%)",
  1335. }}
  1336. >
  1337. 上一张
  1338. </Button>
  1339. <Button
  1340. onClick={this.downImgs}
  1341. style={{
  1342. position: "absolute",
  1343. right: -81,
  1344. top: "50%",
  1345. transform: "translateY(-50%)",
  1346. }}
  1347. >
  1348. 下一张
  1349. </Button>
  1350. </Modal>
  1351. </FormItem>
  1352. </div>
  1353. <div className="clearfix">
  1354. <FormItem
  1355. className="half-item"
  1356. {...formItemLayout}
  1357. label="订单负责人"
  1358. >
  1359. <span>{this.state.salesmanName}</span>
  1360. </FormItem>
  1361. <FormItem
  1362. className="half-item"
  1363. {...formItemLayout}
  1364. label="订单负责人电话"
  1365. >
  1366. <span>{this.state.salesmanMobile}</span>
  1367. </FormItem>
  1368. </div>
  1369. <div className="clearfix">
  1370. <FormItem
  1371. className="half-item"
  1372. {...formItemLayout}
  1373. label="当前财务负责人"
  1374. >
  1375. <span>{this.state.nowFinance}</span>
  1376. </FormItem>
  1377. <FormItem
  1378. className="half-item"
  1379. {...formItemLayout}
  1380. label="当前财务负责人电话"
  1381. >
  1382. <span>{this.state.nowFinanceMobile}</span>
  1383. </FormItem>
  1384. </div>
  1385. <div className="clearfix">
  1386. <FormItem
  1387. className="half-item"
  1388. {...formItemLayout}
  1389. style={{ opacity: ".5" }}
  1390. label="原订单负责人"
  1391. >
  1392. <span>{this.state.oldSalesmanName}</span>
  1393. </FormItem>
  1394. <FormItem
  1395. className="half-item"
  1396. {...formItemLayout}
  1397. style={{ opacity: ".5" }}
  1398. label="原订单负责人电话"
  1399. >
  1400. <span>{this.state.oldSalesmanMobile}</span>
  1401. </FormItem>
  1402. </div>
  1403. <div className="clearfix">
  1404. <FormItem
  1405. className="half-item"
  1406. style={{ opacity: ".5" }}
  1407. {...formItemLayout}
  1408. label="实际财务操作人"
  1409. >
  1410. <span>{this.state.financeName}</span>
  1411. </FormItem>
  1412. <FormItem
  1413. className="half-item"
  1414. {...formItemLayout}
  1415. style={{ opacity: ".5" }}
  1416. label="实际财务操作人电话"
  1417. >
  1418. <span>{this.state.financeMobile}</span>
  1419. </FormItem>
  1420. </div>
  1421. <div>
  1422. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1423. 项目业务
  1424. </span>
  1425. </div>
  1426. <div className="patent-table">
  1427. <Spin spinning={this.state.loading}>
  1428. <Table
  1429. columns={this.state.columnsX}
  1430. dataSource={this.state.dataSourceX}
  1431. pagination={this.state.paginations}
  1432. bordered
  1433. size="small"
  1434. />
  1435. </Spin>
  1436. </div>
  1437. <div>
  1438. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1439. 催款节点
  1440. </span>
  1441. <span
  1442. style={{
  1443. display: cuiDataList.length ? "none" : "inline-block",
  1444. marginLeft: 10,
  1445. color: "red",
  1446. }}
  1447. >
  1448. 金额总计(万元): {this.state.totalCui}
  1449. </span>
  1450. </div>
  1451. <div className="clearfix">
  1452. <Spin spinning={this.state.loading}>
  1453. <Form layout="horizontal" id="demand-form">
  1454. <Table
  1455. pagination={false}
  1456. bordered
  1457. size="small"
  1458. // columns={this.state.ContactsLists}
  1459. // dataSource={this.state.contactList}
  1460. columns={
  1461. cuiDataList.length
  1462. ? this.state.ContactsLists
  1463. : this.state.ContactsListsNew
  1464. }
  1465. dataSource={
  1466. cuiDataList.length
  1467. ? this.state.contactList
  1468. : this.state.contactListNew
  1469. }
  1470. />
  1471. <Col
  1472. span={24}
  1473. offset={9}
  1474. style={{ marginTop: "15px" }}
  1475. />
  1476. </Form>
  1477. </Spin>
  1478. </div>
  1479. </div>
  1480. </Spin>
  1481. </Form>
  1482. </Modal> : <div/>}
  1483. {this.state.addnextVisible ? <Modal
  1484. maskClosable={false}
  1485. visible={this.state.addnextVisible}
  1486. onOk={this.nextCancel}
  1487. onCancel={this.nextCancel}
  1488. width="800px"
  1489. title={this.state.refundStatus == 2 ? "修改退单申请" : "退单详情"}
  1490. footer=""
  1491. className="admin-desc-content"
  1492. >
  1493. <Form layout="horizontal" id="demand-form">
  1494. <Spin spinning={this.state.loading}>
  1495. <div className="clearfix">
  1496. <FormItem
  1497. className="half-item"
  1498. {...formItemLayout}
  1499. label="退单编号"
  1500. >
  1501. <span>{this.state.id}</span>
  1502. </FormItem>
  1503. <FormItem
  1504. className="half-item"
  1505. {...formItemLayout}
  1506. label="退单日期"
  1507. >
  1508. <span>{this.state.createDate}</span>
  1509. </FormItem>
  1510. <FormItem
  1511. className="half-item"
  1512. {...formItemLayout}
  1513. label="订单编号"
  1514. >
  1515. <span>{this.state.orderNo}</span>
  1516. </FormItem>
  1517. <FormItem
  1518. className="half-item"
  1519. {...formItemLayout}
  1520. label="订单状态"
  1521. >
  1522. <span>{getNewOrderStatus(this.state.orderStatus)}</span>
  1523. </FormItem>
  1524. <FormItem
  1525. className="half-item"
  1526. {...formItemLayout}
  1527. label="退单状态"
  1528. >
  1529. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1530. </FormItem>
  1531. <FormItem
  1532. className="half-item"
  1533. {...formItemLayout}
  1534. label="退款状态"
  1535. >
  1536. <span>
  1537. {getLiquidationStatus(this.state.liquidationStatus)}
  1538. </span>
  1539. </FormItem>
  1540. <div className="clearfix">
  1541. {this.state.refundStatus == 2 ? (
  1542. <FormItem
  1543. labelCol={{ span: 4 }}
  1544. wrapperCol={{ span: 16 }}
  1545. label="终止合同"
  1546. >
  1547. <Picture
  1548. domId={'chargeback4'}
  1549. fileList={(e) => {
  1550. this.setState({ contractUrl: e });
  1551. }}
  1552. pictureUrl={this.state.contractUrl}
  1553. visible={this.props.visible}
  1554. data={{
  1555. sign: "order_refund_file",
  1556. url: "/api/admin/newOrder/uploadRefundOrderFile",
  1557. }}
  1558. />
  1559. </FormItem>
  1560. ) : (
  1561. <FormItem
  1562. labelCol={{ span: 4 }}
  1563. wrapperCol={{ span: 18 }}
  1564. label="合同扫描件"
  1565. >
  1566. {/*<Upload*/}
  1567. {/* className="demandDetailShow-upload"*/}
  1568. {/* listType="picture-card"*/}
  1569. {/* fileList={this.state.orgCodeUrl}*/}
  1570. {/* onPreview={(file) => {*/}
  1571. {/* this.setState({*/}
  1572. {/* previewImage: file.url || file.thumbUrl,*/}
  1573. {/* previewVisible: true,*/}
  1574. {/* });*/}
  1575. {/* }}*/}
  1576. {/*/>*/}
  1577. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1578. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'chargeback2'} fileList={this.state.orgCodeUrl}/> : <div/>}
  1579. </div>
  1580. <Modal
  1581. maskClosable={false}
  1582. footer={null}
  1583. visible={this.state.previewVisible}
  1584. onCancel={() => {
  1585. this.setState({ previewVisible: false });
  1586. }}
  1587. >
  1588. <img
  1589. alt=""
  1590. style={{ width: "100%" }}
  1591. src={this.state.previewImage || ""}
  1592. />
  1593. </Modal>
  1594. </FormItem>
  1595. )}
  1596. </div>
  1597. <div className="clearfix">
  1598. <FormItem
  1599. labelCol={{ span: 4 }}
  1600. wrapperCol={{ span: 16 }}
  1601. label="退单申请表"
  1602. >
  1603. {/*<Upload*/}
  1604. {/* className="demandDetailShow-upload"*/}
  1605. {/* listType="picture-card"*/}
  1606. {/* fileList={this.state.orgCodeUrl}*/}
  1607. {/* onPreview={(file) => {*/}
  1608. {/* this.setState({*/}
  1609. {/* previewImage: file.url || file.thumbUrl,*/}
  1610. {/* previewVisible: true,*/}
  1611. {/* });*/}
  1612. {/* }}*/}
  1613. {/*/>*/}
  1614. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1615. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'chargeback3'} fileList={this.state.orgCodeUrl}/> : <div/>}
  1616. </div>
  1617. </FormItem>
  1618. </div>
  1619. <div className="clearfix">
  1620. <FormItem
  1621. labelCol={{ span: 4 }}
  1622. wrapperCol={{ span: 16 }}
  1623. label="退单理由"
  1624. >
  1625. {this.state.refundStatus == 2 ? (
  1626. <Input
  1627. type="textarea"
  1628. placeholder="请输入退单理由"
  1629. rows={4}
  1630. value={this.state.reason}
  1631. onChange={(e) => {
  1632. this.setState({ reason: e.target.value });
  1633. }}
  1634. />
  1635. ) : (
  1636. <span>{this.state.reason}</span>
  1637. )}
  1638. </FormItem>
  1639. </div>
  1640. {this.state.refundStatus == 2 ? (
  1641. <FormItem
  1642. wrapperCol={{ span: 12, offset: 4 }}
  1643. className="half-middle"
  1644. >
  1645. <Button
  1646. className="submitSave"
  1647. type="primary"
  1648. onClick={this.tuidanOk}
  1649. >
  1650. 重新退单
  1651. </Button>
  1652. <Button
  1653. className="submitSave"
  1654. type="ghost"
  1655. onClick={this.nextCancel}
  1656. >
  1657. 取消
  1658. </Button>
  1659. </FormItem>
  1660. ) : (
  1661. ""
  1662. )}
  1663. </div>
  1664. </Spin>
  1665. </Form>
  1666. </Modal> : <div/>}
  1667. <OrderRiZi
  1668. dataSourcerizhi={this.state.dataSourcerizhi}
  1669. closeOrderLog={this.closeOrderLog}
  1670. visible={this.state.rizhivisible}
  1671. loading={this.state.loading}
  1672. />
  1673. </div>
  1674. </div>
  1675. );
  1676. },
  1677. })
  1678. );
  1679. export default IntentionCustomer;