chargeback.jsx 57 KB

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