chargeback.jsx 59 KB

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