inquiry.jsx 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287
  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="patent-table">
  1094. <Spin spinning={this.state.loading}>
  1095. <Table
  1096. columns={this.state.columnsX}
  1097. dataSource={this.state.dataSourceX}
  1098. pagination={this.state.paginations}
  1099. onRowClick={this.tableRowClickX}
  1100. bordered
  1101. size="small"
  1102. />
  1103. </Spin>
  1104. </div>
  1105. <div>
  1106. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1107. 催款节点
  1108. </span>
  1109. </div>
  1110. <div className="clearfix">
  1111. <Spin spinning={this.state.loading}>
  1112. <Form layout="horizontal" id="demand-form">
  1113. <Table
  1114. pagination={false}
  1115. bordered
  1116. size="small"
  1117. columns={
  1118. cuiDataList.length
  1119. ? this.state.ContactsLists
  1120. : this.state.ContactsListsNew
  1121. }
  1122. dataSource={
  1123. cuiDataList.length
  1124. ? this.state.contactList
  1125. : this.state.contactListNew
  1126. }
  1127. />
  1128. <Col
  1129. span={24}
  1130. offset={9}
  1131. style={{ marginTop: "15px" }}
  1132. ></Col>
  1133. </Form>
  1134. </Spin>
  1135. </div>
  1136. </div>
  1137. </Spin>
  1138. </Form>
  1139. </Modal>
  1140. <Modal
  1141. maskClosable={false}
  1142. visible={this.state.addnextVisible}
  1143. onOk={this.nextCancel}
  1144. onCancel={this.nextCancel}
  1145. width="800px"
  1146. title={"项目任务详情"}
  1147. footer=""
  1148. className="admin-desc-content"
  1149. >
  1150. <Form layout="horizontal" id="demand-form">
  1151. <Spin spinning={this.state.loading}>
  1152. <div className="clearfix">
  1153. <FormItem
  1154. className="half-item"
  1155. {...formItemLayout}
  1156. label="项目名称"
  1157. >
  1158. <span>{this.state.commodityName}</span>
  1159. </FormItem>
  1160. <FormItem
  1161. className="half-item"
  1162. {...formItemLayout}
  1163. label="项目数量"
  1164. >
  1165. <span>{this.state.commodityQuantity}</span>
  1166. </FormItem>
  1167. <FormItem
  1168. className="half-item"
  1169. {...formItemLayout}
  1170. label="金额(万元)"
  1171. >
  1172. <span>{this.state.commodityPrice}</span>
  1173. </FormItem>
  1174. <FormItem
  1175. className="half-item"
  1176. {...formItemLayout}
  1177. label="主要项目"
  1178. >
  1179. <span>{getboutique(this.state.main)}</span>
  1180. </FormItem>
  1181. <div className="clearfix">
  1182. <FormItem
  1183. labelCol={{ span: 4 }}
  1184. wrapperCol={{ span: 16 }}
  1185. label="服务说明"
  1186. >
  1187. <span>{this.state.taskComment}</span>
  1188. </FormItem>
  1189. </div>
  1190. </div>
  1191. </Spin>
  1192. </Form>
  1193. </Modal>
  1194. <Modal
  1195. maskClosable={false}
  1196. visible={this.state.noVisible}
  1197. onOk={this.noCancel}
  1198. onCancel={this.noCancel}
  1199. width="400px"
  1200. title={"拒绝理由"}
  1201. footer=""
  1202. className="admin-desc-content"
  1203. >
  1204. <Form layout="horizontal" id="demand-form">
  1205. <Spin spinning={this.state.loading}>
  1206. <div className="clearfix">
  1207. <FormItem
  1208. labelCol={{ span: 4 }}
  1209. wrapperCol={{ span: 16 }}
  1210. label="拒绝理由"
  1211. >
  1212. <Input
  1213. type="textarea"
  1214. placeholder="请输入拒绝理由"
  1215. rows={4}
  1216. value={this.state.reason}
  1217. onChange={e => {
  1218. this.setState({ reason: e.target.value });
  1219. }}
  1220. />
  1221. </FormItem>
  1222. </div>
  1223. <div className="clearfix">
  1224. <Button
  1225. className="cancel"
  1226. type="primary"
  1227. onClick={this.examOks}
  1228. style={{ marginLeft: "50px" }}
  1229. htmlType="submit"
  1230. >
  1231. 确定
  1232. </Button>
  1233. <Button
  1234. className="cancel"
  1235. type="ghost"
  1236. onClick={this.noCancel}
  1237. style={{ marginLeft: "50px" }}
  1238. >
  1239. 取消
  1240. </Button>
  1241. </div>
  1242. </Spin>
  1243. </Form>
  1244. </Modal>
  1245. {/* <Modal
  1246. visible={this.state.rizhivisible}
  1247. className="admin-desc-content"
  1248. width="800px"
  1249. maskClosable={false}
  1250. title="订单日志"
  1251. footer={null}
  1252. onCancel={this.closeOrderLog}
  1253. >
  1254. <div className="patent-table">
  1255. <Spin spinning={this.state.loading}>
  1256. <Table
  1257. columns={this.state.columnsrizhi}
  1258. dataSource={this.state.dataSourcerizhi}
  1259. pagination={false}
  1260. />
  1261. </Spin>
  1262. </div>
  1263. </Modal> */}
  1264. <OrderRiZi
  1265. dataSourcerizhi={this.state.dataSourcerizhi}
  1266. closeOrderLog={this.closeOrderLog}
  1267. visible={this.state.rizhivisible}
  1268. loading={this.state.loading}
  1269. />
  1270. </div>
  1271. </div>
  1272. );
  1273. }
  1274. })
  1275. );
  1276. export default IntentionCustomer;