chargeback.jsx 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704
  1. import React from 'react';
  2. import { Button, Input, Spin, Table, message,DatePicker, Tooltip, Form ,Modal,Col,Tabs, Tag} from 'antd';
  3. import $ from 'jquery/src/ajax';
  4. import Picture from '@/manageCenter/publicComponent/picture';
  5. import ResolutionDetail from "@/resolutionDetail";
  6. import moment from 'moment';
  7. import {
  8. getLiquidationStatus,
  9. getApprovedState,
  10. getProcessStatus,
  11. splitUrl,
  12. getjiedian,
  13. getNewOrderStatus,
  14. getRefundStatus,
  15. getCuikuan,
  16. ShowModal
  17. } from "@/tools.js";
  18. import './customer.less';
  19. import ShowModalDiv from "@/showModal.jsx";
  20. import OrderRiZi from "@/orderRiZi.jsx";
  21. import ImgList from "../../../common/imgList";
  22. import {ChooseList} from "./chooseList";
  23. import OrderItemStatus from "../../../common/orderItemStatus";
  24. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  25. const IntentionCustomer = Form.create()(
  26. React.createClass({
  27. loadData(pageNo) {
  28. this.setState({
  29. visitModul: false,
  30. loading: true,
  31. ispage: pageNo,
  32. modalVisible: false,
  33. });
  34. $.ajax({
  35. method: "get",
  36. dataType: "json",
  37. crossDomain: false,
  38. url: globalConfig.context + "/api/admin/newOrder/orderRefundList",
  39. data: {
  40. pageNo: pageNo || 1,
  41. pageSize: this.state.pagination.pageSize,
  42. name: this.state.customerName, //名称
  43. orderNo: this.state.orderNo, //订单编号
  44. starTime: this.state.releaseDate[0], //开始时间
  45. endTime: this.state.releaseDate[1], //结束时间
  46. },
  47. success: function (data) {
  48. ShowModal(this);
  49. let theArr = [];
  50. if (data.error.length || data.data.list == "") {
  51. if (data.error && data.error.length) {
  52. message.warning(data.error[0].message);
  53. }
  54. } else {
  55. for (let i = 0; i < data.data.list.length; i++) {
  56. let thisdata = data.data.list[i];
  57. theArr.push({
  58. key: i,
  59. id: thisdata.id, //用户ID
  60. orderNo: thisdata.orderNo, //订单编号
  61. userName: thisdata.userName, //客户名称
  62. orderStatus: thisdata.orderStatus, //订单状态
  63. refundStatus: thisdata.refundStatus, //退单状态
  64. reason: thisdata.reason, //退单原因
  65. createDate: thisdata.createDate, //退单时间
  66. liquidationStatus: thisdata.liquidationStatus, //结算状态
  67. });
  68. }
  69. this.state.pagination.total = data.data.totalCount;
  70. }
  71. if (data.data && data.data.list && !data.data.list.length) {
  72. this.state.pagination.total = 0;
  73. }
  74. this.setState({
  75. dataSource: theArr,
  76. pageNo: pageNo,
  77. pagination: this.state.pagination,
  78. selectedRowKeys: [],
  79. });
  80. }.bind(this),
  81. }).always(
  82. function () {
  83. this.setState({
  84. loading: false,
  85. });
  86. }.bind(this)
  87. );
  88. },
  89. getInitialState() {
  90. return {
  91. rotateDeg: 0,
  92. page: 1,
  93. resVisible: false,
  94. releaseDate: [],
  95. selectedRowKeys: [],
  96. orgCodeUrl: [],
  97. customerArr: [],
  98. applicationUrl: [],
  99. contractUrl: [],
  100. pagination: {
  101. defaultCurrent: 1,
  102. defaultPageSize: 10,
  103. showQuickJumper: true,
  104. pageSize: 10,
  105. onChange: function (page) {
  106. this.loadData(page);
  107. }.bind(this),
  108. showTotal: function (total) {
  109. return "共" + total + "条数据";
  110. },
  111. },
  112. columns: [
  113. {
  114. title: "退单编号",
  115. dataIndex: "id",
  116. key: "id",
  117. },
  118. {
  119. title: "退单日期",
  120. dataIndex: "createDate",
  121. key: "createDate",
  122. },
  123. {
  124. title: "客户名称",
  125. dataIndex: "userName",
  126. key: "userName",
  127. render: (text) => {
  128. return (
  129. <Tooltip title={text}>
  130. <div style={{
  131. maxWidth:'150px',
  132. overflow:'hidden',
  133. textOverflow: "ellipsis",
  134. whiteSpace:'nowrap',
  135. }}>{text}</div>
  136. </Tooltip>
  137. );
  138. },
  139. },
  140. {
  141. title: "订单编号",
  142. dataIndex: "orderNo",
  143. key: "orderNo",
  144. },
  145. {
  146. title: "订单状态",
  147. dataIndex: "orderStatus",
  148. key: "orderStatus",
  149. render: (text) => {
  150. return getNewOrderStatus(text);
  151. },
  152. },
  153. {
  154. title: "结算状态",
  155. dataIndex: "liquidationStatus",
  156. key: "liquidationStatus",
  157. render: (text) => {
  158. return getLiquidationStatus(text);
  159. },
  160. },
  161. {
  162. title: "退单状态",
  163. dataIndex: "refundStatus",
  164. key: "refundStatus",
  165. render: (text) => {
  166. return getRefundStatus(text);
  167. },
  168. },
  169. {
  170. title: "退单原因",
  171. dataIndex: "reason",
  172. key: "reason",
  173. render: (text) => {
  174. return text && text.length > 18
  175. ? text.substr(0, 18) + "..."
  176. : text;
  177. },
  178. },
  179. {
  180. title: "操作",
  181. dataIndex: "abc",
  182. key: "abc",
  183. render: (text, record) => {
  184. return (
  185. <div>
  186. <Button
  187. onClick={(e) => {
  188. e.stopPropagation(), this.visit(record);
  189. }}
  190. type="primary"
  191. >
  192. {this.state.refundStatus == 2
  193. ? "修改退单申请"
  194. : "查看退款申请"}
  195. </Button>
  196. </div>
  197. );
  198. },
  199. },
  200. ],
  201. data: [],
  202. dataSource: [],
  203. columnsX: [
  204. {
  205. title: "业务项目名称",
  206. dataIndex: "commodityName",
  207. key: "commodityName",
  208. render: (text, record) => {
  209. return text + "-" + record.id
  210. }
  211. },
  212. {
  213. title: "项目类别",
  214. dataIndex: "cname",
  215. key: "cname",
  216. },
  217. {
  218. title: "项目数量",
  219. dataIndex: "commodityQuantity",
  220. key: "commodityQuantity",
  221. render: (text, record) => {
  222. if (record.splitStatus == 1) {
  223. return (
  224. <span>
  225. {text}{" "}
  226. <Tag
  227. color="#108ee9"
  228. onClick={(e) => {
  229. e.stopPropagation();
  230. this.showRes(record);
  231. }}
  232. >
  233. 已拆
  234. </Tag>
  235. </span>
  236. );
  237. } else {
  238. return text;
  239. }
  240. },
  241. },
  242. {
  243. title: "金额(万元)",
  244. dataIndex: "commodityPrice",
  245. key: "commodityPrice",
  246. },
  247. {
  248. title: "负责人",
  249. dataIndex: "contacts",
  250. key: "contacts",
  251. },
  252. {
  253. title: "负责人电话",
  254. dataIndex: "contactsMobile",
  255. key: "contactsMobile",
  256. },
  257. {
  258. title: "主要项目",
  259. dataIndex: "main",
  260. key: "main",
  261. render: (text) => {
  262. return text ? "是" : "否";
  263. },
  264. },
  265. {
  266. title: "项目说明",
  267. dataIndex: "taskComment",
  268. key: "taskComment",
  269. render: (text) => {
  270. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  271. },
  272. },
  273. ],
  274. columnsrizhi: [
  275. {
  276. title: "流程",
  277. dataIndex: "processName",
  278. key: "processName",
  279. },
  280. {
  281. title: "操作人",
  282. dataIndex: "adminName",
  283. key: "adminName",
  284. },
  285. {
  286. title: "时间",
  287. dataIndex: "createDate",
  288. key: "createDate",
  289. },
  290. ],
  291. dataSourceX: [],
  292. ContactsListsNew: [
  293. {
  294. title: "项目名称",
  295. dataIndex: "commodityName",
  296. key: "commodityName",
  297. render: (text, record) => {
  298. return <span>{text + "-" + record.tid}</span>;
  299. },
  300. },
  301. {
  302. title: "项目分类",
  303. dataIndex: "projectType",
  304. key: "projectType",
  305. render: (text) => {
  306. let arr = this.state.dataSourceX || [];
  307. let str = "";
  308. for (let i = 0; i < arr.length; i++) {
  309. if (this.state.dataSourceX[i].sort == text) {
  310. str = this.state.dataSourceX[i].cname;
  311. return <span>{str}</span>;
  312. }
  313. }
  314. },
  315. },
  316. {
  317. title: "催款科目",
  318. dataIndex: "dunTypeName",
  319. key: "dunTypeName",
  320. render: (text) => {
  321. if(record.customizeName) {
  322. return text + record.customizeName;
  323. }
  324. return <span>{text}</span>;
  325. },
  326. },
  327. {
  328. title: "时间(天)",
  329. dataIndex: "waitDay",
  330. key: "waitDay",
  331. render: (text, record) => {
  332. if (record.dunTypeName) {
  333. if (record.customizeTimes) {
  334. return record.customizeTimes;
  335. }
  336. return <span>{text}</span>;
  337. }
  338. },
  339. },
  340. {
  341. title: "金额(万元)",
  342. dataIndex: "money",
  343. key: "money",
  344. render: (text, record) => {
  345. if (record.dunTypeName) {
  346. if (record.appropriationRatio && !record.money) {
  347. return <span>{record.appropriationRatio}(拨款比例)</span>;
  348. } else if (record.appropriationRatio && record.money) {
  349. return (
  350. <span>
  351. {text}(比例:{record.appropriationRatio})
  352. </span>
  353. );
  354. } else {
  355. return <span>{text}</span>;
  356. }
  357. }
  358. },
  359. },
  360. {
  361. title: "服务年限",
  362. dataIndex: "startDate",
  363. key: "startDate",
  364. render: (text, record) => {
  365. if (record.dunTypeName) {
  366. return <span>{text}</span>;
  367. }
  368. },
  369. },
  370. {
  371. title: "催款状态",
  372. dataIndex: "status",
  373. key: "status",
  374. render: (text) => {
  375. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  376. },
  377. },
  378. ],
  379. ContactsLists: [
  380. {
  381. title: "催款科目",
  382. dataIndex: "dunSubject",
  383. key: "dunSubject",
  384. render: (text) => {
  385. return getjiedian(text);
  386. },
  387. },
  388. {
  389. title: "金额(万元)",
  390. dataIndex: "money",
  391. key: "money",
  392. },
  393. {
  394. title: "催款状态",
  395. dataIndex: "dunStatus",
  396. key: "dunStatus",
  397. render: (text) => {
  398. return getCuikuan(text);
  399. },
  400. },
  401. ],
  402. };
  403. },
  404. //进入新增拜访记录
  405. visit(record) {
  406. this.setState({
  407. addnextVisible: true,
  408. });
  409. this.tuidanxiangqing(record.id);
  410. },
  411. //退单详情
  412. tuidanxiangqing(id) {
  413. this.setState({
  414. loading: true,
  415. });
  416. $.ajax({
  417. method: "get",
  418. dataType: "json",
  419. crossDomain: false,
  420. url: globalConfig.context + "/api/admin/newOrder/orderRefundDetail",
  421. data: {
  422. id: id,
  423. },
  424. }).done(
  425. function (data) {
  426. if (data.error.length || data.data.list == "") {
  427. if (data.error && data.error.length) {
  428. message.warning(data.error[0].message);
  429. }
  430. } else {
  431. let thisdata = data.data;
  432. this.setState({
  433. id: thisdata.id,
  434. createDate: thisdata.createDate, //退单时间
  435. orderNo: thisdata.orderNo, //订单编号
  436. orderStatus: thisdata.orderStatus, //订单状态
  437. refundStatus: thisdata.refundStatus, //退单状态
  438. applicationUrl: thisdata.applicationUrl
  439. ? splitUrl(
  440. thisdata.applicationUrl,
  441. ",",
  442. globalConfig.avatarHost + "/upload"
  443. )
  444. : [], //申请表附件
  445. contractUrl: thisdata.contractUrl
  446. ? splitUrl(
  447. thisdata.contractUrl,
  448. ",",
  449. globalConfig.avatarHost + "/upload"
  450. )
  451. : [], //合同附件
  452. reason: thisdata.reason, //退单原因
  453. liquidationStatus: thisdata.liquidationStatus, //结算状态
  454. });
  455. this.setState({
  456. loading: false,
  457. });
  458. }
  459. }.bind(this)
  460. );
  461. },
  462. // 拆分详细
  463. showRes(record) {
  464. this.setState({
  465. resVisible: true,
  466. resRecord: record,
  467. });
  468. },
  469. resCancel() {
  470. this.setState({
  471. resVisible: false,
  472. });
  473. },
  474. //点击确认退单
  475. tuidanOk() {
  476. let contractUrls = [];
  477. let applicationUrls = [];
  478. if (this.state.contractUrl.length) {
  479. let picArr = [];
  480. this.state.contractUrl.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. contractUrls = picArr.join(",");
  490. }
  491. if (this.state.applicationUrl.length) {
  492. let picArr = [];
  493. this.state.applicationUrl.map(function (item) {
  494. if (
  495. item.response &&
  496. item.response.data &&
  497. item.response.data.length
  498. ) {
  499. picArr.push(item.response.data);
  500. }
  501. });
  502. applicationUrls = picArr.join(",");
  503. }
  504. $.ajax({
  505. method: "POST",
  506. dataType: "json",
  507. crossDomain: false,
  508. url: globalConfig.context + "/api/admin/newOrder/updateOrderRefund",
  509. data: {
  510. id: this.state.id, //订单编号
  511. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  512. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  513. reason: this.state.reason, //退单原因
  514. },
  515. }).done(
  516. function (data) {
  517. this.setState({
  518. loading: false,
  519. });
  520. if (!data.error.length) {
  521. message.success("退单成功!");
  522. this.nextCancel();
  523. this.handleCancel();
  524. } else {
  525. message.warning(data.error[0].message);
  526. }
  527. }.bind(this)
  528. );
  529. },
  530. //页面加载函数
  531. componentWillMount() {
  532. this.loadData();
  533. },
  534. //整行点击
  535. tableRowClick(record) {
  536. this.setState({
  537. visible: true,
  538. });
  539. this.xiangqing(record.orderNo);
  540. this.xiangmu(record.orderNo);
  541. this.jiedian(record.orderNo);
  542. this.jiedianNew(record.orderNo);
  543. },
  544. rizhi() {
  545. console.log(this.state.orderNo);
  546. this.setState({
  547. loading: true,
  548. });
  549. $.ajax({
  550. method: "get",
  551. dataType: "json",
  552. crossDomain: false,
  553. url: "/api/admin/newOrder/selectOrderLog",
  554. data: {
  555. orderNo: this.state.orderNo,
  556. },
  557. success: function (data) {
  558. let theArr = [];
  559. let thisData = data.data;
  560. if (!thisData.length) {
  561. if (data.error && data.error.length) {
  562. message.warning(data.error[0].message);
  563. }
  564. thisData = {};
  565. } else {
  566. for (let i = 0; i < data.data.length; i++) {
  567. let thisdata = data.data[i];
  568. theArr.push({
  569. processName: thisdata.processName,
  570. adminName: thisdata.adminName,
  571. createDate: thisdata.createDate,
  572. remarks: thisdata.remarks,
  573. });
  574. }
  575. }
  576. this.setState({
  577. dataSourcerizhi: theArr,
  578. });
  579. }.bind(this),
  580. }).always(
  581. function () {
  582. this.setState({
  583. loading: false,
  584. });
  585. }.bind(this)
  586. );
  587. },
  588. //查看订单日志
  589. getOrderLog() {
  590. this.setState({
  591. rizhivisible: true,
  592. });
  593. this.rizhi();
  594. },
  595. closeOrderLog() {
  596. this.setState({
  597. rizhivisible: false,
  598. });
  599. },
  600. //详情关闭
  601. nextCancel() {
  602. this.setState({
  603. addnextVisible: false,
  604. });
  605. this.resets();
  606. },
  607. //订单详情
  608. xiangqing(orderNos) {
  609. $.ajax({
  610. method: "get",
  611. dataType: "json",
  612. crossDomain: false,
  613. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  614. data: {
  615. orderNo: orderNos,
  616. },
  617. success: function (data) {
  618. if (data.error.length || data.data.list == "") {
  619. if (data.error && data.error.length) {
  620. message.warning(data.error[0].message);
  621. }
  622. } else {
  623. let thisdata = data.data;
  624. this.setState({
  625. orderUid: thisdata.uid,
  626. id: thisdata.id,
  627. kehuId: thisdata.buyerId,
  628. orderNo: thisdata.orderNo, //订单编号
  629. contractNo: thisdata.contractNo, //合同编号
  630. userName: thisdata.userName, //客户名称
  631. signDate: thisdata.signDate, //签单时间
  632. processStatus: thisdata.processStatus, //流程状态
  633. liquidationStatus: thisdata.liquidationStatus, //结算状态
  634. contacts: thisdata.contacts, //企业联系人
  635. contactMobile: thisdata.contactMobile, //联系人电话
  636. legalPerson: thisdata.legalPerson, //法人
  637. legalPersonTel: thisdata.legalPersonTel, //法人电话
  638. firstAmount: thisdata.firstAmount, //签单金额
  639. totalAmount: thisdata.totalAmount, //首付金额
  640. settlementAmount: thisdata.settlementAmount, //已收款项
  641. orderRemarks: thisdata.orderRemarks, //订单留言
  642. orgCodeUrl: thisdata.contractPictureUrl
  643. ? splitUrl(
  644. thisdata.contractPictureUrl,
  645. ",",
  646. globalConfig.avatarHost + "/upload"
  647. )
  648. : [], //图片地址
  649. replenishUrl: thisdata.agreementUrl
  650. ? splitUrl(
  651. thisdata.agreementUrl,
  652. ",",
  653. globalConfig.avatarHost + "/upload"
  654. )
  655. : [],
  656. salesmanName: thisdata.salesmanName, //营销员名称
  657. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  658. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  659. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  660. financeName: thisdata.financeName, //财务名称
  661. financeMobile: thisdata.financeMobile, //财务电话
  662. nowFinance: thisdata.nowFinance, //财务名称
  663. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  664. approval: thisdata.approval.toString(), //特批状态
  665. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  666. deleteSign:thisdata.deleteSign,
  667. });
  668. }
  669. }.bind(this),
  670. }).always(
  671. function () {
  672. this.setState({
  673. loading: false,
  674. });
  675. }.bind(this)
  676. );
  677. },
  678. //项目列表
  679. xiangmu(orderNos) {
  680. $.ajax({
  681. method: "get",
  682. dataType: "json",
  683. crossDomain: false,
  684. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  685. data: {
  686. orderNo: orderNos,
  687. },
  688. success: function (data) {
  689. let theArr = [];
  690. if (data.error.length || data.data.list == "") {
  691. if (data.error && data.error.length) {
  692. message.warning(data.error[0].message);
  693. }
  694. } else {
  695. for (let i = 0; i < data.data.length; i++) {
  696. let thisdata = data.data[i];
  697. thisdata.key = i;
  698. thisdata.sort = thisdata.cSort;
  699. theArr.push(thisdata);
  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. <div style={{position:"absolute",top:'-52px',left:'81px',zIndex:10000}}>
  1090. <OrderItemStatus deleteSign={this.state.deleteSign}/>
  1091. </div>
  1092. <FormItem
  1093. className="half-item"
  1094. {...formItemLayout}
  1095. label="订单编号"
  1096. >
  1097. <span>{this.state.orderNo}</span>
  1098. </FormItem>
  1099. <FormItem
  1100. className="half-item"
  1101. {...formItemLayout}
  1102. label="合同编号"
  1103. >
  1104. <span>{this.state.contractNo}</span>
  1105. </FormItem>
  1106. <FormItem
  1107. className="half-item"
  1108. {...formItemLayout}
  1109. label="客户名称"
  1110. >
  1111. <span>{this.state.userName}</span>
  1112. <EnterpriseNameChange
  1113. type='journal'
  1114. style={{ marginLeft: 10 }}
  1115. enterpriseId={this.state.orderUid}/>
  1116. </FormItem>
  1117. <FormItem
  1118. className="half-item"
  1119. {...formItemLayout}
  1120. label="合同签订时间"
  1121. >
  1122. <span>{this.state.signDate}</span>
  1123. </FormItem>
  1124. <FormItem
  1125. className="half-item"
  1126. {...formItemLayout}
  1127. label="流程状态"
  1128. >
  1129. <span>{getProcessStatus(this.state.processStatus)}</span>
  1130. </FormItem>
  1131. <FormItem
  1132. className="half-item"
  1133. {...formItemLayout}
  1134. label="结算状态"
  1135. >
  1136. <span>
  1137. {getLiquidationStatus(this.state.liquidationStatus)}
  1138. </span>
  1139. </FormItem>
  1140. <FormItem
  1141. className="half-item"
  1142. {...formItemLayout}
  1143. label="企业联系人"
  1144. >
  1145. <span>{this.state.contacts}</span>
  1146. </FormItem>
  1147. <FormItem
  1148. className="half-item"
  1149. {...formItemLayout}
  1150. label="联系人电话"
  1151. >
  1152. <span>{this.state.contactMobile}</span>
  1153. </FormItem>
  1154. <FormItem
  1155. className="half-item"
  1156. {...formItemLayout}
  1157. label="企业法人"
  1158. >
  1159. <span>{this.state.legalPerson}</span>
  1160. </FormItem>
  1161. <FormItem
  1162. className="half-item"
  1163. {...formItemLayout}
  1164. label="法人电话"
  1165. >
  1166. <span>{this.state.legalPersonTel}</span>
  1167. </FormItem>
  1168. <FormItem
  1169. className="half-item"
  1170. {...formItemLayout}
  1171. label="签单金额(万元)"
  1172. >
  1173. <span>{this.state.firstAmount}</span>
  1174. </FormItem>
  1175. <FormItem
  1176. className="half-item"
  1177. {...formItemLayout}
  1178. label="首付金额(万元)"
  1179. >
  1180. <span>{this.state.totalAmount}</span>
  1181. </FormItem>
  1182. <FormItem
  1183. className="half-item"
  1184. {...formItemLayout}
  1185. label="特批立项"
  1186. >
  1187. <span>{getApprovedState(this.state.approval)}</span>
  1188. </FormItem>
  1189. <FormItem
  1190. className="half-item"
  1191. {...formItemLayout}
  1192. label="已收款项(万元)"
  1193. >
  1194. <span>{this.state.settlementAmount}</span>
  1195. </FormItem>
  1196. <div className="clearfix">
  1197. <FormItem
  1198. labelCol={{ span: 4 }}
  1199. wrapperCol={{ span: 16 }}
  1200. label="订单留言"
  1201. >
  1202. <span>{this.state.orderRemarks}</span>
  1203. </FormItem>
  1204. </div>
  1205. <div className="clearfix">
  1206. <FormItem
  1207. labelCol={{ span: 4 }}
  1208. wrapperCol={{ span: 18 }}
  1209. label="合同扫描件"
  1210. >
  1211. {/*<Upload*/}
  1212. {/* className="demandDetailShow-upload"*/}
  1213. {/* listType="picture-card"*/}
  1214. {/* fileList={this.state.orgCodeUrl}*/}
  1215. {/* onPreview={(file) => {*/}
  1216. {/* this.setState({*/}
  1217. {/* previewImage: file.url || file.thumbUrl,*/}
  1218. {/* previewVisible: true,*/}
  1219. {/* });*/}
  1220. {/* }}*/}
  1221. {/*/>*/}
  1222. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1223. {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  1224. </div>
  1225. <Modal
  1226. maskClosable={false}
  1227. footer={null}
  1228. width={"50%"}
  1229. visible={this.state.previewVisible}
  1230. onCancel={() => {
  1231. this.setState({
  1232. previewVisible: false,
  1233. rotateDeg: 0,
  1234. });
  1235. }}
  1236. >
  1237. <img
  1238. alt=""
  1239. style={{
  1240. width: "100%",
  1241. transform: `rotate(${this.state.rotateDeg}deg)`,
  1242. }}
  1243. src={this.state.previewImage || ""}
  1244. />
  1245. <Button
  1246. onClick={this.rotate}
  1247. style={{
  1248. position: "relative",
  1249. left: "50%",
  1250. transform: "translateX(-50%)",
  1251. }}
  1252. >
  1253. 旋转
  1254. </Button>
  1255. <Button
  1256. onClick={this.upImg}
  1257. style={{
  1258. position: "absolute",
  1259. left: -81,
  1260. top: "50%",
  1261. transform: "translateY(-50%)",
  1262. }}
  1263. >
  1264. 上一张
  1265. </Button>
  1266. <Button
  1267. onClick={this.downImg}
  1268. style={{
  1269. position: "absolute",
  1270. right: -81,
  1271. top: "50%",
  1272. transform: "translateY(-50%)",
  1273. }}
  1274. >
  1275. 下一张
  1276. </Button>
  1277. </Modal>
  1278. <Button
  1279. style={{
  1280. float: "right",
  1281. marginRight: "140px",
  1282. marginTop: "20px",
  1283. }}
  1284. onClick={this.getOrderLog}
  1285. >
  1286. 查看订单 日志
  1287. </Button>
  1288. </FormItem>
  1289. <FormItem
  1290. labelCol={{ span: 4 }}
  1291. wrapperCol={{ span: 18 }}
  1292. label="补充协议"
  1293. >
  1294. {/*<Upload*/}
  1295. {/* className="demandDetailShow-upload"*/}
  1296. {/* listType="picture-card"*/}
  1297. {/* fileList={this.state.replenishUrl}*/}
  1298. {/* onPreview={(file) => {*/}
  1299. {/* this.setState({*/}
  1300. {/* previewImage: file.url || file.thumbUrl,*/}
  1301. {/* previewVisibles: true,*/}
  1302. {/* });*/}
  1303. {/* }}*/}
  1304. {/*/>*/}
  1305. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1306. {this.state.visible && this.state.replenishUrl ? <ImgList domId={'chargeback1'} fileList={this.state.replenishUrl}/> : <div/>}
  1307. </div>
  1308. <Modal
  1309. maskClosable={false}
  1310. footer={null}
  1311. width={"50%"}
  1312. visible={this.state.previewVisibles}
  1313. onCancel={() => {
  1314. this.setState({ previewVisibles: false, rotateDeg: 0, });
  1315. }}
  1316. >
  1317. <img
  1318. alt=""
  1319. style={{
  1320. width: "100%",
  1321. transform: `rotate(${this.state.rotateDeg}deg)`,
  1322. }}
  1323. src={this.state.previewImage || ""}
  1324. />
  1325. <Button
  1326. onClick={this.rotates}
  1327. style={{
  1328. position: "relative",
  1329. left: "50%",
  1330. transform: "translateX(-50%)",
  1331. }}
  1332. >
  1333. 旋转
  1334. </Button>
  1335. <Button
  1336. onClick={this.upImgs}
  1337. style={{
  1338. position: "absolute",
  1339. left: -81,
  1340. top: "50%",
  1341. transform: "translateY(-50%)",
  1342. }}
  1343. >
  1344. 上一张
  1345. </Button>
  1346. <Button
  1347. onClick={this.downImgs}
  1348. style={{
  1349. position: "absolute",
  1350. right: -81,
  1351. top: "50%",
  1352. transform: "translateY(-50%)",
  1353. }}
  1354. >
  1355. 下一张
  1356. </Button>
  1357. </Modal>
  1358. </FormItem>
  1359. </div>
  1360. <div className="clearfix">
  1361. <FormItem
  1362. className="half-item"
  1363. {...formItemLayout}
  1364. label="订单负责人"
  1365. >
  1366. <span>{this.state.salesmanName}</span>
  1367. </FormItem>
  1368. <FormItem
  1369. className="half-item"
  1370. {...formItemLayout}
  1371. label="订单负责人电话"
  1372. >
  1373. <span>{this.state.salesmanMobile}</span>
  1374. </FormItem>
  1375. </div>
  1376. <div className="clearfix">
  1377. <FormItem
  1378. className="half-item"
  1379. {...formItemLayout}
  1380. label="当前财务负责人"
  1381. >
  1382. <span>{this.state.nowFinance}</span>
  1383. </FormItem>
  1384. <FormItem
  1385. className="half-item"
  1386. {...formItemLayout}
  1387. label="当前财务负责人电话"
  1388. >
  1389. <span>{this.state.nowFinanceMobile}</span>
  1390. </FormItem>
  1391. </div>
  1392. <div className="clearfix">
  1393. <FormItem
  1394. className="half-item"
  1395. {...formItemLayout}
  1396. style={{ opacity: ".5" }}
  1397. label="原订单负责人"
  1398. >
  1399. <span>{this.state.oldSalesmanName}</span>
  1400. </FormItem>
  1401. <FormItem
  1402. className="half-item"
  1403. {...formItemLayout}
  1404. style={{ opacity: ".5" }}
  1405. label="原订单负责人电话"
  1406. >
  1407. <span>{this.state.oldSalesmanMobile}</span>
  1408. </FormItem>
  1409. </div>
  1410. <div className="clearfix">
  1411. <FormItem
  1412. className="half-item"
  1413. style={{ opacity: ".5" }}
  1414. {...formItemLayout}
  1415. label="实际财务操作人"
  1416. >
  1417. <span>{this.state.financeName}</span>
  1418. </FormItem>
  1419. <FormItem
  1420. className="half-item"
  1421. {...formItemLayout}
  1422. style={{ opacity: ".5" }}
  1423. label="实际财务操作人电话"
  1424. >
  1425. <span>{this.state.financeMobile}</span>
  1426. </FormItem>
  1427. </div>
  1428. <div>
  1429. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1430. 项目业务
  1431. </span>
  1432. </div>
  1433. <div className="patent-table">
  1434. <Spin spinning={this.state.loading}>
  1435. <Table
  1436. columns={this.state.columnsX}
  1437. dataSource={this.state.dataSourceX}
  1438. pagination={this.state.paginations}
  1439. bordered
  1440. size="small"
  1441. />
  1442. </Spin>
  1443. </div>
  1444. <div>
  1445. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1446. 催款节点
  1447. </span>
  1448. <span
  1449. style={{
  1450. display: cuiDataList.length ? "none" : "inline-block",
  1451. marginLeft: 10,
  1452. color: "red",
  1453. }}
  1454. >
  1455. 金额总计(万元): {this.state.totalCui}
  1456. </span>
  1457. </div>
  1458. <div className="clearfix">
  1459. <Spin spinning={this.state.loading}>
  1460. <Form layout="horizontal" id="demand-form">
  1461. <Table
  1462. pagination={false}
  1463. bordered
  1464. size="small"
  1465. // columns={this.state.ContactsLists}
  1466. // dataSource={this.state.contactList}
  1467. columns={
  1468. cuiDataList.length
  1469. ? this.state.ContactsLists
  1470. : this.state.ContactsListsNew
  1471. }
  1472. dataSource={
  1473. cuiDataList.length
  1474. ? this.state.contactList
  1475. : this.state.contactListNew
  1476. }
  1477. />
  1478. <Col
  1479. span={24}
  1480. offset={9}
  1481. style={{ marginTop: "15px" }}
  1482. />
  1483. </Form>
  1484. </Spin>
  1485. </div>
  1486. </div>
  1487. </Spin>
  1488. </Form>
  1489. </Modal> : <div/>}
  1490. {this.state.addnextVisible ? <Modal
  1491. maskClosable={false}
  1492. visible={this.state.addnextVisible}
  1493. onOk={this.nextCancel}
  1494. onCancel={this.nextCancel}
  1495. width="800px"
  1496. title={this.state.refundStatus == 2 ? "修改退单申请" : "退单详情"}
  1497. footer=""
  1498. className="admin-desc-content"
  1499. >
  1500. <Form layout="horizontal" id="demand-form">
  1501. <Spin spinning={this.state.loading}>
  1502. <div className="clearfix">
  1503. <FormItem
  1504. className="half-item"
  1505. {...formItemLayout}
  1506. label="退单编号"
  1507. >
  1508. <span>{this.state.id}</span>
  1509. </FormItem>
  1510. <FormItem
  1511. className="half-item"
  1512. {...formItemLayout}
  1513. label="退单日期"
  1514. >
  1515. <span>{this.state.createDate}</span>
  1516. </FormItem>
  1517. <FormItem
  1518. className="half-item"
  1519. {...formItemLayout}
  1520. label="订单编号"
  1521. >
  1522. <span>{this.state.orderNo}</span>
  1523. </FormItem>
  1524. <FormItem
  1525. className="half-item"
  1526. {...formItemLayout}
  1527. label="订单状态"
  1528. >
  1529. <span>{getNewOrderStatus(this.state.orderStatus)}</span>
  1530. </FormItem>
  1531. <FormItem
  1532. className="half-item"
  1533. {...formItemLayout}
  1534. label="退单状态"
  1535. >
  1536. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1537. </FormItem>
  1538. <FormItem
  1539. className="half-item"
  1540. {...formItemLayout}
  1541. label="退款状态"
  1542. >
  1543. <span>
  1544. {getLiquidationStatus(this.state.liquidationStatus)}
  1545. </span>
  1546. </FormItem>
  1547. <div className="clearfix">
  1548. {this.state.refundStatus == 2 ? (
  1549. <FormItem
  1550. labelCol={{ span: 4 }}
  1551. wrapperCol={{ span: 16 }}
  1552. label="终止合同"
  1553. >
  1554. <Picture
  1555. domId={'chargeback4'}
  1556. fileList={(e) => {
  1557. this.setState({ contractUrl: e });
  1558. }}
  1559. pictureUrl={this.state.contractUrl}
  1560. visible={this.props.visible}
  1561. data={{
  1562. sign: "order_refund_file",
  1563. url: "/api/admin/newOrder/uploadRefundOrderFile",
  1564. }}
  1565. />
  1566. </FormItem>
  1567. ) : (
  1568. <FormItem
  1569. labelCol={{ span: 4 }}
  1570. wrapperCol={{ span: 18 }}
  1571. label="合同扫描件"
  1572. >
  1573. {/*<Upload*/}
  1574. {/* className="demandDetailShow-upload"*/}
  1575. {/* listType="picture-card"*/}
  1576. {/* fileList={this.state.orgCodeUrl}*/}
  1577. {/* onPreview={(file) => {*/}
  1578. {/* this.setState({*/}
  1579. {/* previewImage: file.url || file.thumbUrl,*/}
  1580. {/* previewVisible: true,*/}
  1581. {/* });*/}
  1582. {/* }}*/}
  1583. {/*/>*/}
  1584. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1585. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'chargeback2'} fileList={this.state.orgCodeUrl}/> : <div/>}
  1586. </div>
  1587. <Modal
  1588. maskClosable={false}
  1589. footer={null}
  1590. visible={this.state.previewVisible}
  1591. onCancel={() => {
  1592. this.setState({ previewVisible: false });
  1593. }}
  1594. >
  1595. <img
  1596. alt=""
  1597. style={{ width: "100%" }}
  1598. src={this.state.previewImage || ""}
  1599. />
  1600. </Modal>
  1601. </FormItem>
  1602. )}
  1603. </div>
  1604. <div className="clearfix">
  1605. <FormItem
  1606. labelCol={{ span: 4 }}
  1607. wrapperCol={{ span: 16 }}
  1608. label="退单申请表"
  1609. >
  1610. {/*<Upload*/}
  1611. {/* className="demandDetailShow-upload"*/}
  1612. {/* listType="picture-card"*/}
  1613. {/* fileList={this.state.orgCodeUrl}*/}
  1614. {/* onPreview={(file) => {*/}
  1615. {/* this.setState({*/}
  1616. {/* previewImage: file.url || file.thumbUrl,*/}
  1617. {/* previewVisible: true,*/}
  1618. {/* });*/}
  1619. {/* }}*/}
  1620. {/*/>*/}
  1621. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1622. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'chargeback3'} fileList={this.state.orgCodeUrl}/> : <div/>}
  1623. </div>
  1624. </FormItem>
  1625. </div>
  1626. <div className="clearfix">
  1627. <FormItem
  1628. labelCol={{ span: 4 }}
  1629. wrapperCol={{ span: 16 }}
  1630. label="退单理由"
  1631. >
  1632. {this.state.refundStatus == 2 ? (
  1633. <Input
  1634. type="textarea"
  1635. placeholder="请输入退单理由"
  1636. rows={4}
  1637. value={this.state.reason}
  1638. onChange={(e) => {
  1639. this.setState({ reason: e.target.value });
  1640. }}
  1641. />
  1642. ) : (
  1643. <span>{this.state.reason}</span>
  1644. )}
  1645. </FormItem>
  1646. </div>
  1647. {this.state.refundStatus == 2 ? (
  1648. <FormItem
  1649. wrapperCol={{ span: 12, offset: 4 }}
  1650. className="half-middle"
  1651. >
  1652. <Button
  1653. className="submitSave"
  1654. type="primary"
  1655. onClick={this.tuidanOk}
  1656. >
  1657. 重新退单
  1658. </Button>
  1659. <Button
  1660. className="submitSave"
  1661. type="ghost"
  1662. onClick={this.nextCancel}
  1663. >
  1664. 取消
  1665. </Button>
  1666. </FormItem>
  1667. ) : (
  1668. ""
  1669. )}
  1670. </div>
  1671. </Spin>
  1672. </Form>
  1673. </Modal> : <div/>}
  1674. <OrderRiZi
  1675. dataSourcerizhi={this.state.dataSourcerizhi}
  1676. closeOrderLog={this.closeOrderLog}
  1677. visible={this.state.rizhivisible}
  1678. loading={this.state.loading}
  1679. />
  1680. </div>
  1681. </div>
  1682. );
  1683. },
  1684. })
  1685. );
  1686. export default IntentionCustomer;