chargeback.jsx 56 KB

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