chargeback.jsx 57 KB

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