inquiry.jsx 42 KB

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