projectQuery.jsx 39 KB

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