inquiry.jsx 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283
  1. import React from 'react';
  2. import { Button, Input, Spin, Table, message,DatePicker, Upload, Form ,Modal,Col} from 'antd';
  3. import $ from 'jquery/src/ajax';
  4. import moment from 'moment';
  5. import {
  6. getLiquidationStatus,
  7. getApprovedState,
  8. getProcessStatus,
  9. splitUrl,
  10. getjiedian,
  11. getboutique,
  12. getCuikuan,
  13. getProjectStatus,
  14. ShowModal
  15. } from "@/tools.js";
  16. import './customer.less';
  17. import OrderRiZi from "@/orderRiZi.jsx";
  18. import ShowModalDiv from "@/showModal.jsx";
  19. const IntentionCustomer = Form.create()(
  20. React.createClass({
  21. loadData(pageNo) {
  22. this.setState({
  23. visitModul: false,
  24. loading: true,
  25. ispage: pageNo,
  26. modalVisible: false
  27. });
  28. $.ajax({
  29. method: "get",
  30. dataType: "json",
  31. crossDomain: false,
  32. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  33. data: {
  34. pageNo: pageNo || 1,
  35. pageSize: this.state.pagination.pageSize,
  36. specially: 5, //部门列表
  37. name: this.state.customerName, //名称
  38. orderNo: this.state.orderNo, //订单编号
  39. starTime: this.state.releaseDate[0], //开始时间
  40. endTime: this.state.releaseDate[1] //结束时间
  41. },
  42. success: function(data) {
  43. ShowModal(this);
  44. let theArr = [];
  45. if (data.error.length || data.data.list == "") {
  46. if (data.error && data.error.length) {
  47. message.warning(data.error[0].message);
  48. }
  49. } else {
  50. for (let i = 0; i < data.data.list.length; i++) {
  51. let thisdata = data.data.list[i];
  52. theArr.push({
  53. key: i,
  54. id: thisdata.id, //用户ID
  55. orderNo: thisdata.orderNo, //订单编号
  56. totalAmount: thisdata.totalAmount, //签单金额
  57. processStatus: thisdata.processStatus, //流程状态
  58. liquidationStatus: thisdata.liquidationStatus, //结算状态
  59. approval: thisdata.approval, //特批状态
  60. signDate: thisdata.signDate, //签单时间
  61. userName: thisdata.userName, //客户名称
  62. salesmanName: thisdata.salesmanName, //营销员名称
  63. financeName: thisdata.financeName, //财务名称
  64. createDate: thisdata.createDate //下单时间
  65. });
  66. }
  67. this.state.pagination.total = data.data.totalCount;
  68. }
  69. if (data.data && data.data.list && !data.data.list.length) {
  70. this.state.pagination.total = 0;
  71. }
  72. this.setState({
  73. dataSource: theArr,
  74. pageNo: pageNo,
  75. pagination: this.state.pagination,
  76. selectedRowKeys: []
  77. });
  78. }.bind(this)
  79. }).always(
  80. function() {
  81. this.setState({
  82. loading: false
  83. });
  84. }.bind(this)
  85. );
  86. },
  87. getInitialState() {
  88. return {
  89. page: 1,
  90. releaseDate: [],
  91. selectedRowKeys: [],
  92. orgCodeUrl: [],
  93. paginations: false,
  94. pagination: {
  95. defaultCurrent: 1,
  96. defaultPageSize: 10,
  97. showQuickJumper: true,
  98. pageSize: 10,
  99. onChange: function(page) {
  100. this.loadData(page);
  101. }.bind(this),
  102. showTotal: function(total) {
  103. return "共" + total + "条数据";
  104. }
  105. },
  106. columns: [
  107. {
  108. title: "订单编号",
  109. dataIndex: "orderNo",
  110. key: "orderNo"
  111. },
  112. {
  113. title: "下单时间",
  114. dataIndex: "createDate",
  115. key: "createTime"
  116. },
  117. {
  118. title: "合同签订时间",
  119. dataIndex: "signDate",
  120. key: "signDate"
  121. },
  122. {
  123. title: "客户名称",
  124. dataIndex: "userName",
  125. key: "userName",
  126. render: text => {
  127. return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
  128. }
  129. },
  130. {
  131. title: "流程状态",
  132. dataIndex: "processStatus",
  133. key: "processStatus",
  134. render: text => {
  135. return getProcessStatus(text);
  136. }
  137. },
  138. {
  139. title: "签单金额(万元)",
  140. dataIndex: "totalAmount",
  141. key: "totalAmount"
  142. },
  143. {
  144. title: "结算状态",
  145. dataIndex: "liquidationStatus",
  146. key: "liquidationStatus",
  147. render: text => {
  148. return getLiquidationStatus(text);
  149. }
  150. },
  151. {
  152. title: "是否特批",
  153. dataIndex: "approval",
  154. key: "approval",
  155. render: text => {
  156. return getApprovedState(text);
  157. }
  158. },
  159. {
  160. title: "订单负责人",
  161. dataIndex: "salesmanName",
  162. key: "salesmanName"
  163. },
  164. {
  165. title: "财务负责人",
  166. dataIndex: "financeName",
  167. key: "financeName"
  168. }
  169. ],
  170. data: [],
  171. dataSource: [],
  172. columnsX: [
  173. {
  174. title: "业务项目名称",
  175. dataIndex: "commodityName",
  176. key: "commodityName"
  177. },
  178. {
  179. title: "项目类别",
  180. dataIndex: "cname",
  181. key: "cname"
  182. },
  183. {
  184. title: "项目数量",
  185. dataIndex: "commodityQuantity",
  186. key: "commodityQuantity"
  187. },
  188. {
  189. title: "金额(万元)",
  190. dataIndex: "commodityPrice",
  191. key: "commodityPrice"
  192. },
  193. {
  194. title: "负责人",
  195. dataIndex: "contacts",
  196. key: "contacts"
  197. },
  198. {
  199. title: "负责人电话",
  200. dataIndex: "contactsMobile",
  201. key: "contactsMobile"
  202. },
  203. {
  204. title: "项目状态",
  205. dataIndex: "projectStatus",
  206. key: "projectStatus",
  207. render: text => {
  208. return getProjectStatus(text);
  209. }
  210. },
  211. {
  212. title: "主要项目",
  213. dataIndex: "main",
  214. key: "main",
  215. render: text => {
  216. return text ? "是" : "否";
  217. }
  218. },
  219. {
  220. title: "项目说明",
  221. dataIndex: "taskComment",
  222. key: "taskComment",
  223. render: text => {
  224. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  225. }
  226. }
  227. ],
  228. columnsrizhi: [
  229. {
  230. title: "流程",
  231. dataIndex: "processName",
  232. key: "processName"
  233. },
  234. {
  235. title: "操作人",
  236. dataIndex: "adminName",
  237. key: "adminName"
  238. },
  239. {
  240. title: "时间",
  241. dataIndex: "createDate",
  242. key: "createDate"
  243. }
  244. ],
  245. dataSourceX: [],
  246. ContactsListsNew: [
  247. {
  248. title: "项目名称",
  249. dataIndex: "commodityName",
  250. key: "commodityName",
  251. render: text => {
  252. return <span>{text}</span>;
  253. }
  254. },
  255. {
  256. title: "项目分类",
  257. dataIndex: "projectType",
  258. key: "projectType",
  259. render: text => {
  260. let arr = this.state.dataSourceX || [];
  261. let str = "";
  262. for (let i = 0; i < arr.length; i++) {
  263. if (this.state.dataSourceX[i].sort == text) {
  264. str = this.state.dataSourceX[i].cname;
  265. return <span>{str}</span>;
  266. }
  267. }
  268. }
  269. },
  270. {
  271. title: "催款科目",
  272. dataIndex: "dunTypeName",
  273. key: "dunTypeName",
  274. render: text => {
  275. return <span>{text}</span>;
  276. }
  277. },
  278. {
  279. title: "时间",
  280. dataIndex: "waitDay",
  281. key: "waitDay",
  282. render: (text, record) => {
  283. if (record.dunTypeName) {
  284. return <span>{text}</span>;
  285. }
  286. }
  287. },
  288. {
  289. title: "金额(万)",
  290. dataIndex: "money",
  291. key: "money",
  292. render: (text, record) => {
  293. if (record.dunTypeName) {
  294. return <span>{text}</span>;
  295. }
  296. }
  297. },
  298. {
  299. title: "服务年限",
  300. dataIndex: "startDate",
  301. key: "startDate",
  302. render: (text, record) => {
  303. if (record.dunTypeName) {
  304. return <span>{text}</span>;
  305. }
  306. }
  307. },
  308. {
  309. title: "催款状态",
  310. dataIndex: "status",
  311. key: "status",
  312. render: text => {
  313. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  314. }
  315. }
  316. ],
  317. ContactsLists: [
  318. {
  319. title: "催款科目",
  320. dataIndex: "dunSubject",
  321. key: "dunSubject",
  322. render: text => {
  323. return getjiedian(text);
  324. }
  325. },
  326. {
  327. title: "金额(万)",
  328. dataIndex: "money",
  329. key: "money"
  330. },
  331. {
  332. title: "催款状态",
  333. dataIndex: "dunStatus",
  334. key: "dunStatus",
  335. render: text => {
  336. return getCuikuan(text);
  337. }
  338. }
  339. ]
  340. };
  341. },
  342. //页面加载函数
  343. componentWillMount() {
  344. this.loadData();
  345. },
  346. //整行点击
  347. tableRowClick(record) {
  348. this.setState({
  349. visible: true
  350. });
  351. this.xiangqing(record.orderNo);
  352. this.xiangmu(record.orderNo);
  353. this.jiedian(record.orderNo);
  354. this.jiedianNew(record.orderNo);
  355. },
  356. //点击打卡项目详情
  357. tableRowClickX(record) {
  358. this.setState({
  359. jid: record.id, //项目ID
  360. kid: record.commodityId, //商品ID
  361. commodityName: record.commodityName, //金额
  362. commodityPrice: record.commodityPrice, //金额
  363. commodityQuantity: record.commodityQuantity, //数量
  364. taskComment: record.taskComment, //备注
  365. main: record.main.toString(), //是否为主要
  366. addnextVisible: true,
  367. addState: 0
  368. });
  369. },
  370. //项目详情关闭
  371. nextCancel() {
  372. this.setState({
  373. addnextVisible: false
  374. });
  375. },
  376. //订单详情
  377. xiangqing(orderNos) {
  378. $.ajax({
  379. method: "get",
  380. dataType: "json",
  381. crossDomain: false,
  382. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  383. data: {
  384. orderNo: orderNos
  385. },
  386. success: function(data) {
  387. if (data.error.length || data.data.list == "") {
  388. if (data.error && data.error.length) {
  389. message.warning(data.error[0].message);
  390. }
  391. } else {
  392. let thisdata = data.data;
  393. this.setState({
  394. orderNo: thisdata.orderNo, //订单编号
  395. contractNo: thisdata.contractNo, //合同编号
  396. userName: thisdata.userName, //客户名称
  397. signDate: thisdata.signDate, //签单时间
  398. processStatus: thisdata.processStatus, //流程状态
  399. liquidationStatus: thisdata.liquidationStatus, //结算状态
  400. contacts: thisdata.contacts, //企业联系人
  401. contactMobile: thisdata.contactMobile, //联系人电话
  402. legalPerson: thisdata.legalPerson, //法人
  403. legalPersonTel: thisdata.legalPersonTel, //法人电话
  404. firstAmount: thisdata.firstAmount, //签单金额
  405. totalAmount: thisdata.totalAmount, //首付金额
  406. approval: thisdata.approval, //特批状态
  407. settlementAmount: thisdata.settlementAmount, //已收款项
  408. orderRemarks: thisdata.orderRemarks, //订单留言
  409. orgCodeUrl: thisdata.contractPictureUrl
  410. ? splitUrl(
  411. thisdata.contractPictureUrl,
  412. ",",
  413. globalConfig.avatarHost + "/upload"
  414. )
  415. : [], //图片地址
  416. salesmanName: thisdata.salesmanName, //营销员名称
  417. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  418. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  419. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  420. financeName: thisdata.financeName, //财务名称
  421. financeMobile: thisdata.financeMobile, //财务电话
  422. nowFinance: thisdata.nowFinance, //财务名称
  423. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  424. depName: thisdata.depName,
  425. outsource: thisdata.outsource == 0 ? "否" : "是"
  426. });
  427. }
  428. }.bind(this)
  429. }).always(
  430. function() {
  431. this.setState({
  432. loading: false
  433. });
  434. }.bind(this)
  435. );
  436. },
  437. //项目列表
  438. xiangmu(orderNos) {
  439. $.ajax({
  440. method: "get",
  441. dataType: "json",
  442. crossDomain: false,
  443. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  444. data: {
  445. orderNo: orderNos
  446. },
  447. success: function(data) {
  448. let theArr = [];
  449. if (data.error.length || data.data.list == "") {
  450. if (data.error && data.error.length) {
  451. message.warning(data.error[0].message);
  452. }
  453. } else {
  454. for (let i = 0; i < data.data.length; i++) {
  455. let thisdata = data.data[i];
  456. theArr.push({
  457. key: i,
  458. id: thisdata.id,
  459. orderNo: thisdata.orderNo, //订单编号
  460. commodityId: thisdata.commodityId, //项目ID
  461. commodityName: thisdata.commodityName, //项目名称
  462. cname: thisdata.cname, //项目类别
  463. commodityPrice: thisdata.commodityPrice, //项目价格
  464. commodityQuantity: thisdata.commodityQuantity, //项目数量
  465. main: thisdata.main, //是否为主要任务
  466. taskComment: thisdata.taskComment, //任务说明
  467. contacts: thisdata.contacts, //联系人
  468. contactsMobile: thisdata.contactsMobile, //联系人电话
  469. projectStatus: thisdata.projectStatus, //项目状态
  470. sort: thisdata.cSort
  471. });
  472. }
  473. }
  474. this.setState({
  475. dataSourceX: theArr
  476. });
  477. }.bind(this)
  478. }).always(
  479. function() {
  480. this.setState({
  481. loading: false
  482. });
  483. }.bind(this)
  484. );
  485. },
  486. //节点列表
  487. jiedian(orderNos) {
  488. $.ajax({
  489. method: "get",
  490. dataType: "json",
  491. crossDomain: false,
  492. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  493. data: {
  494. orderNo: orderNos
  495. },
  496. success: function(data) {
  497. let theArr = [];
  498. let thisData = [];
  499. if (data.error.length || data.data.list == "") {
  500. if (data.error && data.error.length) {
  501. message.warning(data.error[0].message);
  502. }
  503. } else {
  504. for (let i = 0; i < data.data.length; i++) {
  505. thisData = data.data[i];
  506. theArr.push({
  507. key: i,
  508. dunSubject: thisData.dunSubject
  509. ? thisData.dunSubject.toString()
  510. : "", //催款科目
  511. id: thisData.id, //节点Id
  512. money: thisData.money, //催款金额
  513. dunStatus: thisData.dunStatus //催款状态
  514. });
  515. }
  516. this.setState({
  517. contactList: theArr
  518. });
  519. }
  520. }.bind(this)
  521. }).always(
  522. function() {
  523. this.setState({
  524. loading: false
  525. });
  526. }.bind(this)
  527. );
  528. },
  529. //查看催款节点
  530. jiedianNew(orderNos) {
  531. $.ajax({
  532. method: "get",
  533. dataType: "json",
  534. crossDomain: false,
  535. url:
  536. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  537. data: {
  538. orderNo: orderNos
  539. },
  540. success: function(data) {
  541. let theArr = [];
  542. let thisData = [];
  543. if (!thisData) {
  544. if (data.error && data.error.length) {
  545. message.warning(data.error[0].message);
  546. }
  547. thisData = {};
  548. } else {
  549. for (let i = 0; i < data.data.length; i++) {
  550. thisData = data.data[i];
  551. theArr.push({
  552. key: i,
  553. dunSubject: thisData.dunSubject
  554. ? thisData.dunSubject.toString()
  555. : "", //催款科目
  556. id: thisData.id, //节点Id
  557. money: thisData.money, //催款金额
  558. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  559. commodityName: thisData.commodityName,
  560. projectType: thisData.projectType,
  561. dunTypeName: thisData.dunTypeName,
  562. status: thisData.status,
  563. waitDay: thisData.waitDay,
  564. effectiveCount: thisData.effectiveCount,
  565. startDate: thisData.startDate
  566. });
  567. }
  568. this.setState({
  569. contactListNew: theArr
  570. });
  571. }
  572. }.bind(this)
  573. }).always(
  574. function() {
  575. this.setState({
  576. loading: false
  577. });
  578. }.bind(this)
  579. );
  580. },
  581. //审核通过
  582. examOk() {
  583. $.ajax({
  584. method: "post",
  585. dataType: "json",
  586. crossDomain: false,
  587. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  588. data: {
  589. orderNo: this.state.orderNo,
  590. orderStatus: 2
  591. },
  592. success: function(data) {
  593. if (data.error.length || data.data.list == "") {
  594. if (data.error && data.error.length) {
  595. message.warning(data.error[0].message);
  596. }
  597. } else {
  598. message.success("该订单已通过审核~");
  599. this.setState({
  600. visible: false
  601. });
  602. this.reset();
  603. }
  604. }.bind(this)
  605. }).always(
  606. function() {
  607. this.setState({
  608. loading: false
  609. });
  610. }.bind(this)
  611. );
  612. },
  613. //审核不通过
  614. examOks() {
  615. $.ajax({
  616. method: "post",
  617. dataType: "json",
  618. crossDomain: false,
  619. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  620. data: {
  621. orderNo: this.state.orderNo,
  622. orderStatus: 3,
  623. reason: this.state.reason
  624. },
  625. success: function(data) {
  626. if (data.error.length || data.data.list == "") {
  627. if (data.error && data.error.length) {
  628. message.warning(data.error[0].message);
  629. }
  630. } else {
  631. message.success("该订单已被拒绝~");
  632. this.setState({
  633. visible: false,
  634. noVisible: false
  635. });
  636. this.reset();
  637. }
  638. }.bind(this)
  639. }).always(
  640. function() {
  641. this.setState({
  642. loading: false
  643. });
  644. }.bind(this)
  645. );
  646. },
  647. //点击拒绝
  648. examNo() {
  649. this.setState({
  650. noVisible: true
  651. });
  652. },
  653. //关闭输入理由框
  654. noCancel() {
  655. this.setState({
  656. noVisible: false
  657. });
  658. },
  659. rizhi() {
  660. console.log(this.state.orderNo);
  661. this.setState({
  662. loading: true
  663. });
  664. $.ajax({
  665. method: "get",
  666. dataType: "json",
  667. crossDomain: false,
  668. url: "/api/admin/newOrder/selectOrderLog",
  669. data: {
  670. orderNo: this.state.orderNo
  671. },
  672. success: function(data) {
  673. let theArr = [];
  674. let thisData = data.data;
  675. if (!thisData.length) {
  676. if (data.error && data.error.length) {
  677. message.warning(data.error[0].message);
  678. }
  679. thisData = {};
  680. } else {
  681. for (let i = 0; i < data.data.length; i++) {
  682. let thisdata = data.data[i];
  683. theArr.push({
  684. processName: thisdata.processName,
  685. adminName: thisdata.adminName,
  686. createDate: thisdata.createDate
  687. });
  688. }
  689. }
  690. this.setState({
  691. dataSourcerizhi: theArr
  692. });
  693. }.bind(this)
  694. }).always(
  695. function() {
  696. this.setState({
  697. loading: false
  698. });
  699. }.bind(this)
  700. );
  701. },
  702. //查看订单日志
  703. getOrderLog() {
  704. this.setState({
  705. rizhivisible: true
  706. });
  707. this.rizhi();
  708. },
  709. closeOrderLog() {
  710. this.setState({
  711. rizhivisible: false
  712. });
  713. },
  714. //搜索
  715. search() {
  716. this.setState({
  717. //signBillVisible:false
  718. });
  719. this.loadData();
  720. },
  721. //重置
  722. reset() {
  723. this.setState({
  724. signBillVisible: false
  725. });
  726. this.state.orderNo = "";
  727. this.state.customerName = "";
  728. this.state.releaseDate[0] = undefined;
  729. this.state.releaseDate[1] = undefined;
  730. this.state.approval = undefined;
  731. this.loadData();
  732. },
  733. resets() {
  734. this.state.orderNo = "";
  735. this.state.customerName = "";
  736. this.state.releaseDate[0] = undefined;
  737. this.state.releaseDate[1] = undefined;
  738. },
  739. getOrgCodeUrl(e) {
  740. this.setState({ orgCodeUrl: e });
  741. },
  742. //关闭详情
  743. visitCancel() {
  744. this.setState({
  745. visible: false
  746. });
  747. this.resets();
  748. },
  749. visitOk() {
  750. this.setState({
  751. visible: false
  752. });
  753. this.resets();
  754. },
  755. render() {
  756. const formItemLayout = {
  757. labelCol: { span: 8 },
  758. wrapperCol: { span: 14 }
  759. };
  760. const FormItem = Form.Item;
  761. const { RangePicker } = DatePicker;
  762. const cuiDataList = this.state.contactList || [];
  763. const rowSelection = {
  764. selectedRowKeys: this.state.selectedRowKeys,
  765. onChange: (selectedRowKeys, selectedRows) => {
  766. this.setState({
  767. modalVisible: false,
  768. selectedRows: selectedRows.slice(-1),
  769. selectedRowKeys: selectedRowKeys.slice(-1)
  770. });
  771. },
  772. onSelect: recordt => {
  773. this.setState({
  774. modalVisible: false,
  775. recordt: recordt.id
  776. });
  777. }
  778. };
  779. return (
  780. <div className="user-content">
  781. <ShowModalDiv ShowModal={this.state.showModal} />
  782. <div className="content-title">
  783. <span>部门订单</span>
  784. </div>
  785. <div className="user-search">
  786. <Input
  787. placeholder="客户名称"
  788. style={{ width: "150px", marginBottom: "10px" }}
  789. value={this.state.customerName}
  790. onChange={e => {
  791. this.setState({ customerName: e.target.value });
  792. }}
  793. />
  794. <Input
  795. placeholder="订单编号"
  796. style={{ width: "150px" }}
  797. value={this.state.orderNo}
  798. onChange={e => {
  799. this.setState({ orderNo: e.target.value });
  800. }}
  801. />
  802. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  803. <RangePicker
  804. value={[
  805. this.state.releaseDate[0]
  806. ? moment(this.state.releaseDate[0])
  807. : null,
  808. this.state.releaseDate[1]
  809. ? moment(this.state.releaseDate[1])
  810. : null
  811. ]}
  812. onChange={(data, dataString) => {
  813. this.setState({ releaseDate: dataString });
  814. }}
  815. />
  816. <Button
  817. type="primary"
  818. onClick={this.search}
  819. style={{ marginLeft: "10px" }}
  820. >
  821. 搜索
  822. </Button>
  823. <Button onClick={this.reset}>重置</Button>
  824. <div className="patent-table">
  825. <Spin spinning={this.state.loading}>
  826. <Table
  827. columns={this.state.columns}
  828. dataSource={this.state.dataSource}
  829. rowSelection={rowSelection}
  830. pagination={this.state.pagination}
  831. onRowClick={this.tableRowClick}
  832. bordered
  833. size="small"
  834. />
  835. </Spin>
  836. </div>
  837. <Modal
  838. className="customeDetails"
  839. footer=""
  840. title="订单详情"
  841. width="900px"
  842. visible={this.state.visible}
  843. onOk={this.visitOk}
  844. onCancel={this.visitCancel}
  845. >
  846. <Form
  847. layout="horizontal"
  848. onSubmit={this.handleSubmit}
  849. id="demand-form"
  850. style={{ paddingBottom: "40px" }}
  851. >
  852. <Spin spinning={this.state.loading}>
  853. <div className="clearfix">
  854. <FormItem
  855. className="half-item"
  856. {...formItemLayout}
  857. label="订单编号"
  858. >
  859. <span>{this.state.orderNo}</span>
  860. </FormItem>
  861. <FormItem
  862. className="half-item"
  863. {...formItemLayout}
  864. label="合同编号"
  865. >
  866. <span>{this.state.contractNo}</span>
  867. </FormItem>
  868. <FormItem
  869. className="half-item"
  870. {...formItemLayout}
  871. label="客户名称"
  872. >
  873. <span>{this.state.userName}</span>
  874. </FormItem>
  875. <FormItem
  876. className="half-item"
  877. {...formItemLayout}
  878. label="合同签订时间"
  879. >
  880. <span>{this.state.signDate}</span>
  881. </FormItem>
  882. <FormItem
  883. className="half-item"
  884. {...formItemLayout}
  885. label="流程状态"
  886. >
  887. <span>{getProcessStatus(this.state.processStatus)}</span>
  888. </FormItem>
  889. <FormItem
  890. className="half-item"
  891. {...formItemLayout}
  892. label="结算状态"
  893. >
  894. <span>
  895. {getLiquidationStatus(this.state.liquidationStatus)}
  896. </span>
  897. </FormItem>
  898. <FormItem
  899. className="half-item"
  900. {...formItemLayout}
  901. label="企业联系人"
  902. >
  903. <span>{this.state.contacts}</span>
  904. </FormItem>
  905. <FormItem
  906. className="half-item"
  907. {...formItemLayout}
  908. label="联系人电话"
  909. >
  910. <span>{this.state.contactMobile}</span>
  911. </FormItem>
  912. <FormItem
  913. className="half-item"
  914. {...formItemLayout}
  915. label="企业法人"
  916. >
  917. <span>{this.state.legalPerson}</span>
  918. </FormItem>
  919. <FormItem
  920. className="half-item"
  921. {...formItemLayout}
  922. label="法人电话"
  923. >
  924. <span>{this.state.legalPersonTel}</span>
  925. </FormItem>
  926. <FormItem
  927. className="half-item"
  928. {...formItemLayout}
  929. label="签单金额(万元)"
  930. >
  931. <span>{this.state.totalAmount}</span>
  932. </FormItem>
  933. <FormItem
  934. className="half-item"
  935. {...formItemLayout}
  936. label="首付金额(万元)"
  937. >
  938. <span>{this.state.firstAmount}</span>
  939. </FormItem>
  940. <FormItem
  941. className="half-item"
  942. {...formItemLayout}
  943. label="特批立项"
  944. >
  945. <span>{getApprovedState(this.state.approval)}</span>
  946. </FormItem>
  947. <FormItem
  948. className="half-item"
  949. {...formItemLayout}
  950. label="已收款项(万元)"
  951. >
  952. <span>{this.state.settlementAmount}</span>
  953. </FormItem>
  954. <FormItem
  955. className="half-item"
  956. {...formItemLayout}
  957. label="订单部门"
  958. >
  959. <span>{this.state.depName}</span>
  960. </FormItem>
  961. <FormItem
  962. className="half-item"
  963. {...formItemLayout}
  964. label="是否外包"
  965. >
  966. {this.state.outsource}
  967. </FormItem>
  968. <div className="clearfix">
  969. <FormItem
  970. labelCol={{ span: 4 }}
  971. wrapperCol={{ span: 16 }}
  972. label="订单留言"
  973. >
  974. <span>{this.state.orderRemarks}</span>
  975. </FormItem>
  976. </div>
  977. <div className="clearfix">
  978. <FormItem
  979. labelCol={{ span: 4 }}
  980. wrapperCol={{ span: 18 }}
  981. label="合同扫描件"
  982. >
  983. <Upload
  984. className="demandDetailShow-upload"
  985. listType="picture-card"
  986. fileList={this.state.orgCodeUrl}
  987. onPreview={file => {
  988. this.setState({
  989. previewImage: file.url || file.thumbUrl,
  990. previewVisible: true
  991. });
  992. }}
  993. ></Upload>
  994. <Modal
  995. maskClosable={false}
  996. footer={null}
  997. visible={this.state.previewVisible}
  998. onCancel={() => {
  999. this.setState({ previewVisible: false });
  1000. }}
  1001. >
  1002. <img
  1003. alt=""
  1004. style={{ width: "100%" }}
  1005. src={this.state.previewImage || ""}
  1006. />
  1007. </Modal>
  1008. <Button
  1009. style={{
  1010. float: "right",
  1011. marginRight: "140px",
  1012. marginTop: "20px"
  1013. }}
  1014. onClick={this.getOrderLog}
  1015. >
  1016. 查看订单 日志
  1017. </Button>
  1018. </FormItem>
  1019. </div>
  1020. <div className="clearfix">
  1021. <FormItem
  1022. className="half-item"
  1023. {...formItemLayout}
  1024. label="订单负责人"
  1025. >
  1026. <span>{this.state.salesmanName}</span>
  1027. </FormItem>
  1028. <FormItem
  1029. className="half-item"
  1030. {...formItemLayout}
  1031. label="订单负责人电话"
  1032. >
  1033. <span>{this.state.salesmanMobile}</span>
  1034. </FormItem>
  1035. </div>
  1036. <div className="clearfix">
  1037. <FormItem
  1038. className="half-item"
  1039. {...formItemLayout}
  1040. label="当前财务负责人"
  1041. >
  1042. <span>{this.state.nowFinance}</span>
  1043. </FormItem>
  1044. <FormItem
  1045. className="half-item"
  1046. {...formItemLayout}
  1047. label="当前财务负责人电话"
  1048. >
  1049. <span>{this.state.nowFinanceMobile}</span>
  1050. </FormItem>
  1051. </div>
  1052. <div className="clearfix">
  1053. <FormItem
  1054. className="half-item"
  1055. {...formItemLayout}
  1056. style={{ opacity: ".5" }}
  1057. label="原订单负责人"
  1058. >
  1059. <span>{this.state.oldSalesmanName}</span>
  1060. </FormItem>
  1061. <FormItem
  1062. className="half-item"
  1063. {...formItemLayout}
  1064. style={{ opacity: ".5" }}
  1065. label="原订单负责人电话"
  1066. >
  1067. <span>{this.state.oldSalesmanMobile}</span>
  1068. </FormItem>
  1069. </div>
  1070. <div className="clearfix">
  1071. <FormItem
  1072. className="half-item"
  1073. style={{ opacity: ".5" }}
  1074. {...formItemLayout}
  1075. label="实际财务操作人"
  1076. >
  1077. <span>{this.state.financeName}</span>
  1078. </FormItem>
  1079. <FormItem
  1080. className="half-item"
  1081. {...formItemLayout}
  1082. style={{ opacity: ".5" }}
  1083. label="实际财务操作人电话"
  1084. >
  1085. <span>{this.state.financeMobile}</span>
  1086. </FormItem>
  1087. </div>
  1088. <div>
  1089. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1090. 催款节点
  1091. </span>
  1092. </div>
  1093. <div className="clearfix">
  1094. <Spin spinning={this.state.loading}>
  1095. <Form layout="horizontal" id="demand-form">
  1096. <Table
  1097. pagination={false}
  1098. columns={
  1099. cuiDataList.length
  1100. ? this.state.ContactsLists
  1101. : this.state.ContactsListsNew
  1102. }
  1103. dataSource={
  1104. cuiDataList.length
  1105. ? this.state.contactList
  1106. : this.state.contactListNew
  1107. }
  1108. />
  1109. <Col
  1110. span={24}
  1111. offset={9}
  1112. style={{ marginTop: "15px" }}
  1113. ></Col>
  1114. </Form>
  1115. </Spin>
  1116. </div>
  1117. <div>
  1118. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1119. 项目业务
  1120. </span>
  1121. </div>
  1122. <div className="patent-table">
  1123. <Spin spinning={this.state.loading}>
  1124. <Table
  1125. columns={this.state.columnsX}
  1126. dataSource={this.state.dataSourceX}
  1127. pagination={this.state.paginations}
  1128. onRowClick={this.tableRowClickX}
  1129. />
  1130. </Spin>
  1131. </div>
  1132. </div>
  1133. </Spin>
  1134. </Form>
  1135. </Modal>
  1136. <Modal
  1137. maskClosable={false}
  1138. visible={this.state.addnextVisible}
  1139. onOk={this.nextCancel}
  1140. onCancel={this.nextCancel}
  1141. width="800px"
  1142. title={"项目任务详情"}
  1143. footer=""
  1144. className="admin-desc-content"
  1145. >
  1146. <Form layout="horizontal" id="demand-form">
  1147. <Spin spinning={this.state.loading}>
  1148. <div className="clearfix">
  1149. <FormItem
  1150. className="half-item"
  1151. {...formItemLayout}
  1152. label="项目名称"
  1153. >
  1154. <span>{this.state.commodityName}</span>
  1155. </FormItem>
  1156. <FormItem
  1157. className="half-item"
  1158. {...formItemLayout}
  1159. label="项目数量"
  1160. >
  1161. <span>{this.state.commodityQuantity}</span>
  1162. </FormItem>
  1163. <FormItem
  1164. className="half-item"
  1165. {...formItemLayout}
  1166. label="金额(万元)"
  1167. >
  1168. <span>{this.state.commodityPrice}</span>
  1169. </FormItem>
  1170. <FormItem
  1171. className="half-item"
  1172. {...formItemLayout}
  1173. label="主要项目"
  1174. >
  1175. <span>{getboutique(this.state.main)}</span>
  1176. </FormItem>
  1177. <div className="clearfix">
  1178. <FormItem
  1179. labelCol={{ span: 4 }}
  1180. wrapperCol={{ span: 16 }}
  1181. label="服务说明"
  1182. >
  1183. <span>{this.state.taskComment}</span>
  1184. </FormItem>
  1185. </div>
  1186. </div>
  1187. </Spin>
  1188. </Form>
  1189. </Modal>
  1190. <Modal
  1191. maskClosable={false}
  1192. visible={this.state.noVisible}
  1193. onOk={this.noCancel}
  1194. onCancel={this.noCancel}
  1195. width="400px"
  1196. title={"拒绝理由"}
  1197. footer=""
  1198. className="admin-desc-content"
  1199. >
  1200. <Form layout="horizontal" id="demand-form">
  1201. <Spin spinning={this.state.loading}>
  1202. <div className="clearfix">
  1203. <FormItem
  1204. labelCol={{ span: 4 }}
  1205. wrapperCol={{ span: 16 }}
  1206. label="拒绝理由"
  1207. >
  1208. <Input
  1209. type="textarea"
  1210. placeholder="请输入拒绝理由"
  1211. rows={4}
  1212. value={this.state.reason}
  1213. onChange={e => {
  1214. this.setState({ reason: e.target.value });
  1215. }}
  1216. />
  1217. </FormItem>
  1218. </div>
  1219. <div className="clearfix">
  1220. <Button
  1221. className="cancel"
  1222. type="primary"
  1223. onClick={this.examOks}
  1224. style={{ marginLeft: "50px" }}
  1225. htmlType="submit"
  1226. >
  1227. 确定
  1228. </Button>
  1229. <Button
  1230. className="cancel"
  1231. type="ghost"
  1232. onClick={this.noCancel}
  1233. style={{ marginLeft: "50px" }}
  1234. >
  1235. 取消
  1236. </Button>
  1237. </div>
  1238. </Spin>
  1239. </Form>
  1240. </Modal>
  1241. {/* <Modal
  1242. visible={this.state.rizhivisible}
  1243. className="admin-desc-content"
  1244. width="800px"
  1245. maskClosable={false}
  1246. title="订单日志"
  1247. footer={null}
  1248. onCancel={this.closeOrderLog}
  1249. >
  1250. <div className="patent-table">
  1251. <Spin spinning={this.state.loading}>
  1252. <Table
  1253. columns={this.state.columnsrizhi}
  1254. dataSource={this.state.dataSourcerizhi}
  1255. pagination={false}
  1256. />
  1257. </Spin>
  1258. </div>
  1259. </Modal> */}
  1260. <OrderRiZi
  1261. dataSourcerizhi={this.state.dataSourcerizhi}
  1262. closeOrderLog={this.closeOrderLog}
  1263. visible={this.state.rizhivisible}
  1264. loading={this.state.loading}
  1265. />
  1266. </div>
  1267. </div>
  1268. );
  1269. }
  1270. })
  1271. );
  1272. export default IntentionCustomer;