projecDataStatistics.jsx 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589
  1. import React from 'react';
  2. import {
  3. DatePicker,
  4. Tooltip,
  5. Button,
  6. AutoComplete,
  7. Input,
  8. Select,
  9. Spin,
  10. Table,
  11. message,
  12. Form,
  13. Tabs,
  14. } from 'antd';
  15. import $ from 'jquery/src/ajax';
  16. import moment from 'moment';
  17. import { ShowModal, getApprovedState, getWhether, getLiquidationStatus } from "@/tools.js";
  18. import { projectStatusList, salesList } from "@/dataDic";
  19. import { citySelect } from "../../../NewDicProvinceList";
  20. import ShowModalDiv from "@/showModal.jsx";
  21. import { ChooseList } from "../../order/orderNew/chooseList";
  22. import StaffSearch from '../../../../component/common/staffSearch';
  23. import Cascaders from "../../../common/cascaders";
  24. import './index.less';
  25. const TabPane = Tabs.TabPane;
  26. const { RangePicker, MonthPicker } = DatePicker;
  27. const ProjecDataStatistics = Form.create()(React.createClass({
  28. getInitialState() {
  29. return {
  30. searchValues: {},
  31. loading: false,
  32. exportPendingLoading: false,
  33. changeList: undefined,
  34. dataSource: [],
  35. pagination: {
  36. defaultCurrent: 1,
  37. defaultPageSize: 10,
  38. showQuickJumper: true,
  39. pageSize: 10,
  40. onChange: function (page) {
  41. this.loadData(page);
  42. }.bind(this),
  43. showTotal: function (total) {
  44. return '共' + total + '条数据';
  45. }
  46. },
  47. columns: [
  48. {
  49. title: "销售类型",
  50. dataIndex: "salesType",
  51. key: "salesType",
  52. render: (text, record) => {
  53. const obj = {
  54. children: <Tooltip title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}>
  55. <span>
  56. {salesList[text]}
  57. </span>
  58. </Tooltip>,
  59. props: {
  60. rowSpan: record.rowSpan || 0
  61. }
  62. }
  63. return obj
  64. },
  65. },
  66. {
  67. title: "订单类型",
  68. dataIndex: "serviceType",
  69. key: "serviceType",
  70. render: (text, record) => {
  71. const obj = {
  72. children: <div style={{ maxWidth: 200 }}>{text}</div>,
  73. props: {
  74. rowSpan: record.rowSpan || 0
  75. }
  76. }
  77. return obj
  78. }
  79. },
  80. {
  81. title: "结算状态",
  82. dataIndex: "liquidationStatus",
  83. key: "liquidationStatus",
  84. render: (text, record) => {
  85. const obj = {
  86. children: getLiquidationStatus(text),
  87. props: {
  88. rowSpan: record.rowSpan || 0
  89. }
  90. }
  91. return obj
  92. }
  93. },
  94. {
  95. title: "催款节点",
  96. dataIndex: "dunNodeContent",
  97. key: "dunNodeContent",
  98. render: (text, record) => {
  99. const obj = {
  100. children: text,
  101. props: {
  102. rowSpan: record.rowSpan || 0
  103. }
  104. }
  105. return obj
  106. }
  107. },
  108. {
  109. title: '是否会员',
  110. dataIndex: 'projectType',
  111. key: 'projectType',
  112. render: (text, record) => {
  113. const obj = {
  114. children: getWhether(text),
  115. props: {
  116. rowSpan: record.rowSpan || 0
  117. }
  118. }
  119. return obj
  120. }
  121. },
  122. {
  123. title: '是否大客户',
  124. dataIndex: 'bigCustomer',
  125. key: 'bigCustomer',
  126. render: (text, record) => {
  127. const obj = {
  128. children: getWhether(text),
  129. props: {
  130. rowSpan: record.rowSpan || 0
  131. }
  132. }
  133. return obj
  134. }
  135. },
  136. {
  137. title: "是否特批",
  138. dataIndex: "approval",
  139. key: "approval",
  140. render: (text, record) => {
  141. const obj = {
  142. children: getApprovedState(text),
  143. props: {
  144. rowSpan: record.rowSpan || 0
  145. }
  146. }
  147. return obj
  148. }
  149. },
  150. {
  151. title: '签单时间',
  152. dataIndex: 'signTime',
  153. key: 'signTime',
  154. render: (text, record) => {
  155. const obj = {
  156. children: text,
  157. props: {
  158. rowSpan: record.rowSpan || 0
  159. }
  160. }
  161. return obj
  162. }
  163. },
  164. {
  165. title: "派单时间",
  166. dataIndex: "createTime",
  167. key: "createTime",
  168. render: (text, record) => {
  169. const obj = {
  170. children: text,
  171. props: {
  172. rowSpan: record.rowSpan || 0
  173. }
  174. }
  175. return obj
  176. }
  177. },
  178. {
  179. title: '公司名称',
  180. dataIndex: 'buyerName',
  181. key: 'buyerName',
  182. render: (text, record) => {
  183. const obj = {
  184. children: <Tooltip title={text}>
  185. <div style={{ maxWidth: 200 }}>{text}</div>
  186. </Tooltip>,
  187. props: {
  188. rowSpan: record.rowSpan || 0
  189. }
  190. }
  191. return obj
  192. }
  193. },
  194. {
  195. title: "合同编号",
  196. dataIndex: "contractNo",
  197. key: "contractNo",
  198. render: (text, record) => {
  199. const obj = {
  200. children: text,
  201. props: {
  202. rowSpan: record.rowSpan || 0
  203. }
  204. }
  205. return obj
  206. }
  207. },
  208. {
  209. title: '合同类型',
  210. dataIndex: 'htlx',
  211. key: 'htlx',
  212. render: (text, record) => {
  213. const obj = {
  214. children: text,
  215. props: {
  216. rowSpan: record.rowSpan || 0
  217. }
  218. }
  219. return obj
  220. }
  221. },
  222. {
  223. title: '省份',
  224. dataIndex: 'province',
  225. key: 'province',
  226. render: (text, record) => {
  227. const obj = {
  228. children: text,
  229. props: {
  230. rowSpan: record.rowSpan || 0
  231. }
  232. }
  233. return obj
  234. }
  235. },
  236. {
  237. title: "派单公司",
  238. dataIndex: "depName",
  239. key: "depName",
  240. render: (text, record) => {
  241. const obj = {
  242. children: text,
  243. props: {
  244. rowSpan: record.rowSpan || 0
  245. }
  246. }
  247. return obj
  248. }
  249. },
  250. {
  251. title: '签单金额',
  252. dataIndex: 'totalAmount',
  253. key: 'totalAmount',
  254. render: (text, record) => {
  255. const obj = {
  256. children: text,
  257. props: {
  258. rowSpan: record.rowSpan || 0
  259. }
  260. }
  261. return obj
  262. }
  263. },
  264. {
  265. title: '合同收款比例',
  266. dataIndex: 'contractAmountProportion',
  267. key: 'contractAmountProportion',
  268. render: (text, record) => {
  269. const obj = {
  270. children: text,
  271. props: {
  272. rowSpan: record.rowSpan || 0
  273. }
  274. }
  275. return obj
  276. }
  277. },
  278. {
  279. title: '应收款',
  280. dataIndex: 'orderReceivables',
  281. key: 'orderReceivables',
  282. render: (text, record) => {
  283. const obj = {
  284. children: text,
  285. props: {
  286. rowSpan: record.rowSpan || 0
  287. }
  288. }
  289. return obj
  290. }
  291. },
  292. {
  293. title: '已收款',
  294. dataIndex: 'settlementAmount',
  295. key: 'settlementAmount',
  296. render: (text, record) => {
  297. const obj = {
  298. children: text,
  299. props: {
  300. rowSpan: record.rowSpan || 0
  301. }
  302. }
  303. return obj
  304. }
  305. },
  306. {
  307. title: "欠款",
  308. dataIndex: "arrearsAmount",
  309. key: "arrearsAmount",
  310. render: (text, record) => {
  311. const obj = {
  312. children: text,
  313. props: {
  314. rowSpan: record.rowSpan || 0
  315. }
  316. }
  317. return obj
  318. }
  319. },
  320. {
  321. title: "已报销",
  322. dataIndex: "expenseAmount",
  323. key: "expenseAmount",
  324. render: (text, record) => {
  325. const obj = {
  326. children: text,
  327. props: {
  328. rowSpan: record.rowSpan || 0
  329. }
  330. }
  331. return obj
  332. }
  333. },
  334. {
  335. title: "应公出/已公出/超出",
  336. dataIndex: "shouldPublic",
  337. key: "shouldPublic",
  338. render: (text, record) => {
  339. const obj = {
  340. children: <span>
  341. {text + " / " + record.alreadyPublic + " / " + record.exceedPublic}
  342. </span>,
  343. props: {
  344. rowSpan: record.rowSpan || 0
  345. }
  346. }
  347. return obj
  348. }
  349. },
  350. {
  351. title: "总成本/实付",
  352. dataIndex: "costAmount",
  353. key: "costAmount",
  354. render: (text, record) => {
  355. const obj = {
  356. children: <span>
  357. {text + " / " + record.paymentAmount}
  358. </span>,
  359. props: {
  360. rowSpan: record.rowSpan || 0
  361. }
  362. }
  363. return obj
  364. }
  365. },
  366. {
  367. title: "已开票金额",
  368. dataIndex: "invicueAmount",
  369. key: "invicueAmount",
  370. render: (text, record) => {
  371. const obj = {
  372. children: text,
  373. props: {
  374. rowSpan: record.rowSpan || 0
  375. }
  376. }
  377. return obj
  378. }
  379. },
  380. {
  381. title: "退款金额",
  382. dataIndex: "refundAmount",
  383. key: "refundAmount",
  384. render: (text, record) => {
  385. const obj = {
  386. children: text,
  387. props: {
  388. rowSpan: record.rowSpan || 0
  389. }
  390. }
  391. return obj
  392. }
  393. },
  394. {
  395. title: "财务负责人",
  396. dataIndex: "financeName",
  397. key: "financeName",
  398. render: (text, record) => {
  399. const obj = {
  400. children: text,
  401. props: {
  402. rowSpan: record.rowSpan || 0
  403. }
  404. }
  405. return obj
  406. }
  407. },
  408. {
  409. title: "营销负责人",
  410. dataIndex: "salesmanName",
  411. key: "salesmanName",
  412. render: (text, record) => {
  413. const obj = {
  414. children: text,
  415. props: {
  416. rowSpan: record.rowSpan || 0
  417. }
  418. }
  419. return obj
  420. }
  421. },
  422. {
  423. title: "项目名称",
  424. dataIndex: "commodityName",
  425. key: "commodityName",
  426. },
  427. {
  428. title: "项目转入时间",
  429. dataIndex: "taskDistributionTime",
  430. key: "taskDistributionTime",
  431. },
  432. {
  433. title: "是否重报",
  434. dataIndex: "restatementType",
  435. key: "restatementType",
  436. },
  437. {
  438. title: "是否科技项目",
  439. dataIndex: "orderType",
  440. key: "orderType",
  441. },
  442. {
  443. title: "项目数",
  444. dataIndex: "commodityQuantity",
  445. key: "commodityQuantity",
  446. },
  447. {
  448. title: "项目成本",
  449. dataIndex: "projectCostAmount",
  450. key: "projectCostAmount",
  451. },
  452. {
  453. title: "项目状态",
  454. dataIndex: "projectStatus",
  455. key: "projectStatus",
  456. },
  457. {
  458. title: "项目启动时间",
  459. dataIndex: "taskStartTime",
  460. key: "taskStartTime",
  461. },
  462. {
  463. title: "项目完成时间",
  464. dataIndex: "taskEndTime",
  465. key: "taskEndTime",
  466. },
  467. // {
  468. // title: "技术组",
  469. // dataIndex: "expenseAmount",
  470. // key: "expenseAmount",
  471. // },
  472. {
  473. title: "项目负责人",
  474. dataIndex: "receiverName",
  475. key: "receiverName",
  476. },
  477. {
  478. title: "满意度",
  479. dataIndex: "satisfactionDegree",
  480. key: "satisfactionDegree",
  481. },
  482. {
  483. title: "项目备注",
  484. dataIndex: "taskComment",
  485. key: "taskComment",
  486. render: text => {
  487. return (
  488. <div style={{ maxWidth: 220 }}>{text}</div>
  489. )
  490. }
  491. },
  492. {
  493. title: "核算比例",
  494. dataIndex: "hsbl",
  495. key: "hsbl",
  496. render: (text, record) => {
  497. const obj = {
  498. children: text,
  499. props: {
  500. rowSpan: record.rowSpan || 0
  501. }
  502. }
  503. return obj
  504. }
  505. },
  506. {
  507. title: "订单情况",
  508. dataIndex: "orderStatus",
  509. key: "orderStatus",
  510. render: (text, record) => {
  511. const obj = {
  512. children: text,
  513. props: {
  514. rowSpan: record.rowSpan || 0
  515. }
  516. }
  517. return obj
  518. }
  519. },
  520. {
  521. title: "变更情况",
  522. dataIndex: "changeType",
  523. key: "changeType",
  524. render: (text, record) => {
  525. const obj = {
  526. children: text,
  527. props: {
  528. rowSpan: record.rowSpan || 0
  529. }
  530. }
  531. return obj
  532. }
  533. },
  534. {
  535. title: "退单退款",
  536. dataIndex: "refundType",
  537. key: "refundType",
  538. render: (text, record) => {
  539. const obj = {
  540. children: text,
  541. props: {
  542. rowSpan: record.rowSpan || 0
  543. }
  544. }
  545. return obj
  546. }
  547. },
  548. ],
  549. dataSource: [],
  550. departmentArr: [],
  551. };
  552. },
  553. componentWillMount() {
  554. this.departmentList();
  555. this.selectSuperId();
  556. this.loadData();
  557. },
  558. loadData(pageNo) {
  559. const { searchValues, pagination } = this.state;
  560. this.setState({
  561. loading: true,
  562. });
  563. let datas = Object.assign(searchValues, {
  564. pageNo: pageNo || 1,
  565. pageSize: pagination.pageSize,
  566. });
  567. $.ajax({
  568. method: "get",
  569. dataType: "json",
  570. crossDomain: false,
  571. url: globalConfig.context + "/api/admin/statistis/orderProject",
  572. data: datas,
  573. success: function (data) {
  574. ShowModal(this);
  575. this.setState({
  576. loading: false,
  577. });
  578. if (data.error && data.error.length === 0) {
  579. if (data.data.list) {
  580. pagination.current = data.data.pageNo;
  581. pagination.total = data.data.totalCount;
  582. if (data.data && data.data.list && !data.data.list.length) {
  583. pagination.current = 0;
  584. pagination.total = 0;
  585. }
  586. let dList = this.handleData(data.data.list, "contractNo")
  587. this.setState({
  588. dataSource: dList,
  589. pagination: this.state.pagination,
  590. pageNo: data.data.pageNo,
  591. });
  592. } else {
  593. this.setState({
  594. dataSource: data.data,
  595. pagination: false,
  596. });
  597. }
  598. } else {
  599. message.warning(data.error[0].message);
  600. }
  601. }.bind(this),
  602. }).always(
  603. function () {
  604. this.setState({
  605. loading: false,
  606. });
  607. }.bind(this)
  608. );
  609. },
  610. // 部门
  611. departmentList() {
  612. this.setState({
  613. loading: true,
  614. });
  615. $.ajax({
  616. method: "get",
  617. dataType: "json",
  618. crossDomain: false,
  619. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  620. data: {},
  621. success: function (data) {
  622. let thedata = data.data;
  623. let theArr = [];
  624. if (!thedata) {
  625. if (data.error && data.error.length) {
  626. message.warning(data.error[0].message);
  627. }
  628. thedata = {};
  629. } else {
  630. thedata.map(function (item, index) {
  631. theArr.push({
  632. key: index,
  633. name: item.name,
  634. id: item.id,
  635. });
  636. });
  637. }
  638. this.setState({
  639. departmentArr: theArr,
  640. });
  641. }.bind(this),
  642. }).always(
  643. function () {
  644. this.setState({
  645. loading: false,
  646. });
  647. }.bind(this)
  648. );
  649. },
  650. // 项目类别
  651. selectSuperId() {
  652. $.ajax({
  653. method: "get",
  654. dataType: "json",
  655. crossDomain: false,
  656. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  657. data: {
  658. flag: 0
  659. },
  660. success: function (data) {
  661. let theArr = [];
  662. let thedata = data.data;
  663. if (!thedata) {
  664. if (data.error && data.error.length) {
  665. message.warning(data.error[0].message);
  666. }
  667. }
  668. for (let i = 0; i < data.data.length; i++) {
  669. let theData = data.data[i];
  670. theArr.push(
  671. <Select.Option value={theData.id} key={theData.cname}>
  672. {theData.cname}
  673. </Select.Option>
  674. );
  675. }
  676. this.setState({
  677. contactsOption: theArr,
  678. contactsOptionData: data.data,
  679. });
  680. }.bind(this)
  681. }).always(
  682. );
  683. },
  684. changeList(arr) {
  685. const newArr = [];
  686. let list = this.state.columns
  687. list.forEach((item) => {
  688. arr.forEach((val) => {
  689. if (val === item.title) {
  690. newArr.push(item);
  691. }
  692. });
  693. });
  694. this.setState({
  695. changeList: newArr,
  696. });
  697. },
  698. exportAll() {
  699. message.config({
  700. duration: 20,
  701. });
  702. let loading = message.loading("下载中...");
  703. this.setState({
  704. exportPendingLoading: true,
  705. });
  706. let data = JSON.parse(JSON.stringify(this.state.searchValues));
  707. $.ajax({
  708. method: "get",
  709. dataType: "json",
  710. crossDomain: false,
  711. url: "/api/admin/statistis/orderProject/export",
  712. data,
  713. success: function (data) {
  714. if (data.error.length === 0) {
  715. this.download(data.data);
  716. } else {
  717. message.warning(data.error[0].message);
  718. }
  719. }.bind(this),
  720. }).always(
  721. function () {
  722. loading();
  723. this.setState({
  724. exportPendingLoading: false,
  725. });
  726. }.bind(this)
  727. );
  728. },
  729. download(fileName) {
  730. window.location.href =
  731. globalConfig.context + "/open/download?fileName=" + fileName;
  732. },
  733. handleData(array, key) {
  734. if (array.length === 0) return
  735. let arr = [...array]
  736. let startItem = arr[0]
  737. startItem.rowSpan = 1
  738. arr.forEach((item, index) => {
  739. let nextItem = arr[index + 1] || {}
  740. if (item[key] === nextItem[key]) {
  741. startItem.rowSpan++
  742. } else {
  743. startItem = nextItem
  744. startItem.rowSpan = 1
  745. }
  746. })
  747. return arr
  748. },
  749. search() {
  750. this.loadData();
  751. },
  752. reset() {
  753. this.setState({
  754. financeName: "",
  755. salesmanName: "",
  756. techName: "",
  757. searchValues: JSON.parse(JSON.stringify({})),
  758. }, () => {
  759. // this.Cascaders1.empty();
  760. // this.Cascaders2.empty();
  761. this.StaffSearch1.httpChange("");
  762. this.StaffSearch2.httpChange("");
  763. this.StaffSearch3.httpChange("");
  764. this.loadData();
  765. })
  766. },
  767. render() {
  768. const { searchValues } = this.state
  769. let departmentArr = this.state.departmentArr || [];
  770. const getRowClassName = (record, index) => {
  771. // 根据某些条件返回不同的类名
  772. if (index % 10 + 1 === 1) {
  773. return 'even-row1';
  774. } else if (index % 10 + 1 === 2) {
  775. return 'even-row2';
  776. } else if (index % 10 + 1 === 3) {
  777. return 'even-row3';
  778. } else if (index % 10 + 1 === 4) {
  779. return 'even-row4';
  780. } else if (index % 10 + 1 === 5) {
  781. return 'even-row5';
  782. } else if (index % 10 + 1 === 6) {
  783. return 'even-row6';
  784. } else if (index % 10 + 1 === 7) {
  785. return 'even-row7';
  786. } else if (index % 10 + 1 === 8) {
  787. return 'even-row8';
  788. } else if (index % 10 + 1 === 9) {
  789. return 'even-row9';
  790. } else if (index % 10 + 1 === 10) {
  791. return 'even-row10';
  792. }
  793. };
  794. return (
  795. <div className="user-content">
  796. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  797. <div className="content-title" style={{ marginBottom: 10 }}>
  798. <span style={{ fontWeight: 900, fontSize: 16 }}>项目数据统计</span>
  799. </div>
  800. <div className="user-search">
  801. <Tabs
  802. defaultActiveKey="1"
  803. className="test">
  804. <TabPane tab="搜索" key="1">
  805. <div
  806. className="user-search"
  807. style={{
  808. marginTop: "10px",
  809. marginLeft: "10px",
  810. marginRight: "10px",
  811. }}
  812. >
  813. <Input
  814. placeholder="订单编号"
  815. style={{
  816. width: 220,
  817. marginRight: "10px",
  818. }}
  819. value={searchValues["orderNo"]
  820. ? searchValues["orderNo"]
  821. : ""}
  822. onChange={(e) => {
  823. searchValues["orderNo"] = e.target.value;
  824. this.setState({
  825. searchValues: searchValues,
  826. });
  827. }}
  828. />
  829. <Input
  830. placeholder="合同编号"
  831. style={{
  832. width: 220,
  833. marginRight: "10px",
  834. }}
  835. value={searchValues["contractNo"]
  836. ? searchValues["contractNo"]
  837. : ""}
  838. onChange={(e) => {
  839. searchValues["contractNo"] = e.target.value;
  840. this.setState({
  841. searchValues: searchValues,
  842. });
  843. }}
  844. />
  845. <Input
  846. placeholder="企业名称"
  847. style={{
  848. width: 220,
  849. marginRight: "10px",
  850. }}
  851. value={searchValues["userName"]
  852. ? searchValues["userName"]
  853. : ""}
  854. onChange={(e) => {
  855. searchValues["userName"] = e.target.value;
  856. this.setState({
  857. searchValues: searchValues,
  858. });
  859. }}
  860. />
  861. <Select
  862. placeholder="项目分类"
  863. style={{ width: 220 }}
  864. value={searchValues["businessCategory"]
  865. ? searchValues["businessCategory"]
  866. : undefined}
  867. onChange={(e) => {
  868. searchValues["businessCategory"] = e;
  869. this.setState({
  870. searchValues: searchValues,
  871. });
  872. }}
  873. >
  874. {this.state.contactsOption}
  875. </Select>
  876. <Input
  877. placeholder="项目名称"
  878. value={searchValues["projectName"]
  879. ? searchValues["projectName"]
  880. : ""}
  881. style={{ width: 220, marginRight: 10 }}
  882. onChange={e => {
  883. searchValues["projectName"] = e.target.value
  884. this.setState({
  885. searchValues: searchValues,
  886. });
  887. }}
  888. />
  889. <span
  890. style={{
  891. display: "inline-block",
  892. }}
  893. >
  894. <span style={{ marginBottom: "10px" }}>订单部门:</span>
  895. <Select
  896. placeholder="选择订单部门"
  897. style={{ width: 170, }}
  898. value={searchValues["depId"]
  899. ? searchValues["depId"]
  900. : undefined}
  901. onChange={(e) => {
  902. searchValues["depId"] = e
  903. this.setState({
  904. searchValues: searchValues,
  905. });
  906. }}
  907. >
  908. {departmentArr.map(function (item) {
  909. return (
  910. <Select.Option key={item.id}>{item.name}</Select.Option>
  911. );
  912. })}
  913. </Select>
  914. {/* <Cascaders
  915. ref={ref => this.Cascaders1 = ref}
  916. placeholder="请选择订单部门"
  917. height={28}
  918. width={170}
  919. onSel={(e) => {
  920. searchValues["deps"] = JSON.stringify(e)
  921. this.setState({
  922. searchValues: searchValues,
  923. });
  924. }}
  925. /> */}
  926. </span>
  927. <span
  928. style={{
  929. display: "inline-block",
  930. }}
  931. >
  932. <span style={{ marginBottom: "10px" }}>负责部门:</span>
  933. <Select
  934. placeholder="选择负责部门"
  935. style={{ width: 170, }}
  936. value={searchValues["liabilitiesDepId"]
  937. ? searchValues["liabilitiesDepId"]
  938. : undefined}
  939. onChange={(e) => {
  940. searchValues["liabilitiesDepId"] = e
  941. this.setState({
  942. searchValues: searchValues,
  943. });
  944. }}
  945. >
  946. {departmentArr.map(function (item) {
  947. return (
  948. <Select.Option key={item.id}>{item.name}</Select.Option>
  949. );
  950. })}
  951. </Select>
  952. {/* <Cascaders
  953. ref={ref => this.Cascaders2 = ref}
  954. placeholder="请选择负责部门"
  955. height={28}
  956. width={170}
  957. onSel={(e) => {
  958. searchValues["thchDeps"] = JSON.stringify(e)
  959. this.setState({
  960. searchValues: searchValues,
  961. });
  962. }}
  963. /> */}
  964. </span>
  965. <span style={{ display: "inline-block" }}>
  966. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  967. 申报批次:
  968. </span>
  969. <Select
  970. value={searchValues["declarationBatch"]
  971. ? searchValues["declarationBatch"]
  972. : undefined}
  973. placeholder="请选择批次"
  974. style={{
  975. width: 150,
  976. marginRight: "10px",
  977. }}
  978. onChange={(e) => {
  979. searchValues["declarationBatch"] = e
  980. this.setState({
  981. searchValues: searchValues,
  982. });
  983. }}
  984. >
  985. <Option value={1}>第一批</Option>
  986. <Option value={2}>第二批</Option>
  987. <Option value={3}>第三批</Option>
  988. <Option value={4}>第四批</Option>
  989. </Select>
  990. </span>
  991. <span style={{ display: "inline-block" }}>
  992. <span style={{ marginRight: "10px" }}>
  993. 项目金额:
  994. </span>
  995. <Select
  996. value={searchValues["projectAmountType"]
  997. ? searchValues["projectAmountType"]
  998. : undefined}
  999. placeholder="请选择项目金额"
  1000. style={{
  1001. width: 150,
  1002. marginRight: "10px",
  1003. }}
  1004. onChange={(e) => {
  1005. searchValues["projectAmountType"] = e
  1006. this.setState({
  1007. searchValues: searchValues,
  1008. });
  1009. }}
  1010. >
  1011. <Option value={1}>1万以下</Option>
  1012. <Option value={2}>1~5万</Option>
  1013. <Option value={3}>5~10万</Option>
  1014. <Option value={4}>10~20万</Option>
  1015. <Option value={5}>20万以上</Option>
  1016. </Select>
  1017. </span>
  1018. <span style={{ display: "inline-block" }}>
  1019. <span style={{ marginRight: "10px" }}>
  1020. 项目状态:
  1021. </span>
  1022. <Select
  1023. value={(searchValues["projectStatus"] || searchValues["projectStatus"] == 0)
  1024. ? searchValues["projectStatus"]
  1025. : undefined}
  1026. placeholder="请选择项目状态"
  1027. style={{
  1028. width: 150,
  1029. marginRight: "10px",
  1030. }}
  1031. onChange={(e) => {
  1032. searchValues["projectStatus"] = e
  1033. this.setState({
  1034. searchValues: searchValues,
  1035. });
  1036. }}
  1037. >
  1038. {
  1039. projectStatusList.map((item) =>
  1040. <Option value={item.value} key={item.value}>{item.label}</Option>
  1041. )
  1042. }
  1043. </Select>
  1044. </span>
  1045. <span style={{ display: "inline-block" }}>
  1046. <span style={{ marginRight: "10px" }}>
  1047. 满&nbsp;&nbsp;意&nbsp;&nbsp;度:
  1048. </span>
  1049. <Select
  1050. value={searchValues["satisfactionDegree"]
  1051. ? searchValues["satisfactionDegree"]
  1052. : undefined}
  1053. placeholder="请选择满意度"
  1054. style={{
  1055. width: 150,
  1056. marginRight: "10px",
  1057. }}
  1058. onChange={(e) => {
  1059. searchValues["satisfactionDegree"] = e
  1060. this.setState({
  1061. searchValues: searchValues,
  1062. });
  1063. }}
  1064. >
  1065. <Option value="0">非常满意</Option>
  1066. <Option value="1">满意</Option>
  1067. <Option value="2">一般</Option>
  1068. <Option value="3">不满意</Option>
  1069. </Select>
  1070. </span>
  1071. <span style={{ display: "inline-block" }}>
  1072. <span style={{ marginRight: "10px" }}>
  1073. 派单时间:
  1074. </span>
  1075. <RangePicker
  1076. allowClear={false}
  1077. style={{ marginRight: "10px", width: 250 }}
  1078. value={[
  1079. searchValues["startDate"]
  1080. ? moment(searchValues["startDate"])
  1081. : null,
  1082. searchValues["endDate"]
  1083. ? moment(searchValues["endDate"])
  1084. : null,
  1085. ]}
  1086. onChange={(data, dataString) => {
  1087. searchValues["startDate"] = String(
  1088. dataString[0]
  1089. );
  1090. searchValues["endDate"] = String(
  1091. dataString[1]
  1092. );
  1093. this.setState({
  1094. searchValues: searchValues,
  1095. });
  1096. }}
  1097. />
  1098. </span>
  1099. <span style={{ display: "inline-block" }}>
  1100. <span style={{ marginRight: "10px" }}>
  1101. 项目转入时间:
  1102. </span>
  1103. <RangePicker
  1104. allowClear={false}
  1105. style={{ marginRight: "10px", width: 250 }}
  1106. value={[
  1107. searchValues["projectStartDate"]
  1108. ? moment(searchValues["projectStartDate"])
  1109. : null,
  1110. searchValues["projectEndDate"]
  1111. ? moment(searchValues["projectEndDate"])
  1112. : null,
  1113. ]}
  1114. onChange={(data, dataString) => {
  1115. searchValues["projectStartDate"] = String(
  1116. dataString[0]
  1117. );
  1118. searchValues["projectEndDate"] = String(
  1119. dataString[1]
  1120. );
  1121. this.setState({
  1122. searchValues: searchValues,
  1123. });
  1124. }}
  1125. />
  1126. </span>
  1127. <span style={{ display: "inline-block" }}>
  1128. <span style={{ marginRight: "10px" }}>
  1129. 销售类型:
  1130. </span>
  1131. <Select
  1132. value={searchValues["salesType"]
  1133. ? searchValues["salesType"]
  1134. : undefined}
  1135. placeholder="请选择销售类型"
  1136. style={{
  1137. width: 150,
  1138. marginRight: "10px",
  1139. }}
  1140. onChange={(e) => {
  1141. searchValues["salesType"] = e
  1142. this.setState({
  1143. searchValues: searchValues,
  1144. });
  1145. }}
  1146. >
  1147. <Option value="0">电话新开发</Option>
  1148. <Option value="1">电话自带资源</Option>
  1149. <Option value="2">网络</Option>
  1150. <Option value="3">渠道</Option>
  1151. <Option value="4">转介绍</Option>
  1152. <Option value="5">其他</Option>
  1153. <Option value="6">高新复购</Option>
  1154. <Option value="7">其他复购</Option>
  1155. <Option value="8">私有/渠道</Option>
  1156. </Select>
  1157. </span>
  1158. <span style={{ display: "inline-block" }}>
  1159. <span style={{ marginRight: "10px" }}>
  1160. 订单类型:
  1161. </span>
  1162. <Input
  1163. placeholder="请输入订单类型"
  1164. style={{
  1165. width: 150,
  1166. marginRight: "10px",
  1167. }}
  1168. value={searchValues["serviceType"]
  1169. ? searchValues["serviceType"]
  1170. : ""}
  1171. onChange={(e) => {
  1172. searchValues["serviceType"] = e.target.value;
  1173. this.setState({
  1174. searchValues: searchValues,
  1175. });
  1176. }}
  1177. />
  1178. </span>
  1179. <span style={{ display: "inline-block" }}>
  1180. <span style={{ marginRight: "10px" }}>
  1181. 结算状态:
  1182. </span>
  1183. <Select
  1184. value={searchValues["liquidationStatus"]
  1185. ? searchValues["liquidationStatus"]
  1186. : undefined}
  1187. placeholder="请选择结算状态"
  1188. style={{
  1189. width: 150,
  1190. marginRight: "10px",
  1191. }}
  1192. onChange={(e) => {
  1193. searchValues["liquidationStatus"] = e
  1194. this.setState({
  1195. searchValues: searchValues,
  1196. });
  1197. }}
  1198. >
  1199. <Option value="0">首付待付请</Option>
  1200. <Option value="1">尾款待付清</Option>
  1201. <Option value="2">已付清</Option>
  1202. <Option value="3">部分退款</Option>
  1203. <Option value="4">全部退款</Option>
  1204. </Select>
  1205. </span>
  1206. <span style={{ display: "inline-block" }}>
  1207. <span style={{ marginRight: "10px" }}>
  1208. 催款节点:
  1209. </span>
  1210. <Select
  1211. placeholder={"催款节点"}
  1212. style={{ width: 150 }}
  1213. value={searchValues["dunType"]
  1214. ? searchValues["dunType"]
  1215. : undefined}
  1216. onChange={(e) => {
  1217. searchValues["dunType"] = e
  1218. this.setState({
  1219. searchValues: searchValues,
  1220. });
  1221. }}
  1222. >
  1223. <Option value="0">未启动</Option>
  1224. <Option value="1">已启动</Option>
  1225. </Select>
  1226. </span>
  1227. <span style={{ display: "inline-block" }}>
  1228. <span style={{ marginRight: "10px" }}>
  1229. 签单时间:
  1230. </span>
  1231. <RangePicker
  1232. allowClear={false}
  1233. style={{ marginRight: "10px", width: 250 }}
  1234. value={[
  1235. searchValues["signStartDate"]
  1236. ? moment(searchValues["signStartDate"])
  1237. : null,
  1238. searchValues["signEndDate"]
  1239. ? moment(searchValues["signEndDate"])
  1240. : null,
  1241. ]}
  1242. onChange={(data, dataString) => {
  1243. searchValues["signStartDate"] = String(
  1244. dataString[0]
  1245. );
  1246. searchValues["signEndDate"] = String(
  1247. dataString[1]
  1248. );
  1249. this.setState({
  1250. searchValues: searchValues,
  1251. });
  1252. }}
  1253. />
  1254. </span>
  1255. <span style={{ display: "inline-block" }}>
  1256. <span style={{ marginRight: "10px" }}>
  1257. 项目完成时间:
  1258. </span>
  1259. <RangePicker
  1260. allowClear={false}
  1261. style={{ marginRight: "10px", width: 250 }}
  1262. value={[
  1263. searchValues["projectCompleteStartTime"]
  1264. ? moment(searchValues["projectCompleteStartTime"])
  1265. : null,
  1266. searchValues["projectCompleteEndTime"]
  1267. ? moment(searchValues["projectCompleteEndTime"])
  1268. : null,
  1269. ]}
  1270. onChange={(data, dataString) => {
  1271. searchValues["projectCompleteStartTime"] = String(
  1272. dataString[0]
  1273. );
  1274. searchValues["projectCompleteEndTime"] = String(
  1275. dataString[1]
  1276. );
  1277. this.setState({
  1278. searchValues: searchValues,
  1279. });
  1280. }}
  1281. />
  1282. </span>
  1283. <span style={{ display: "inline-block" }}>
  1284. <span style={{ marginRight: "10px" }}>
  1285. 是否特批:
  1286. </span>
  1287. <Select
  1288. placeholder={"是否特批"}
  1289. style={{ width: 150 }}
  1290. value={searchValues["approval"]
  1291. ? searchValues["approval"]
  1292. : undefined}
  1293. onChange={(e) => {
  1294. searchValues["approval"] = e
  1295. this.setState({
  1296. searchValues: searchValues,
  1297. });
  1298. }}
  1299. >
  1300. <Option value="0">否</Option>
  1301. <Option value="1">是</Option>
  1302. </Select>
  1303. </span>
  1304. <span style={{ display: "inline-block" }}>
  1305. <span style={{ marginRight: "10px" }}>
  1306. 是否会员:
  1307. </span>
  1308. <Select
  1309. placeholder={"是否会员"}
  1310. style={{ width: 150 }}
  1311. value={searchValues["projectType"]
  1312. ? searchValues["projectType"]
  1313. : undefined}
  1314. onChange={(e) => {
  1315. searchValues["projectType"] = e
  1316. this.setState({
  1317. searchValues: searchValues,
  1318. });
  1319. }}
  1320. >
  1321. <Option value="0">否</Option>
  1322. <Option value="1">是</Option>
  1323. </Select>
  1324. </span>
  1325. <span style={{ display: "inline-block" }}>
  1326. <span style={{ marginRight: "10px" }}>
  1327. 是否重报:
  1328. </span>
  1329. <Select
  1330. placeholder={"是否重报"}
  1331. style={{ width: 150 }}
  1332. value={searchValues["restatement"]
  1333. ? searchValues["restatement"]
  1334. : undefined}
  1335. onChange={(e) => {
  1336. searchValues["restatement"] = e
  1337. this.setState({
  1338. searchValues: searchValues,
  1339. });
  1340. }}
  1341. >
  1342. <Option value="0">否</Option>
  1343. <Option value="1">是</Option>
  1344. </Select>
  1345. </span>
  1346. <span style={{ display: "inline-block" }}>
  1347. <span style={{ marginRight: "10px" }}>
  1348. 是否变更:
  1349. </span>
  1350. <Select
  1351. placeholder={"是否变更"}
  1352. style={{ width: 150 }}
  1353. value={searchValues["changeType"]
  1354. ? searchValues["changeType"]
  1355. : undefined}
  1356. onChange={(e) => {
  1357. searchValues["changeType"] = e
  1358. this.setState({
  1359. searchValues: searchValues,
  1360. });
  1361. }}
  1362. >
  1363. <Option value="0">否</Option>
  1364. <Option value="1">是</Option>
  1365. </Select>
  1366. </span>
  1367. <span style={{ display: "inline-block" }}>
  1368. <span style={{ marginRight: "10px" }}>
  1369. 是否退单:
  1370. </span>
  1371. <Select
  1372. placeholder={"是否退单"}
  1373. style={{ width: 150 }}
  1374. value={searchValues["refundType"]
  1375. ? searchValues["refundType"]
  1376. : undefined}
  1377. onChange={(e) => {
  1378. searchValues["refundType"] = e
  1379. this.setState({
  1380. searchValues: searchValues,
  1381. });
  1382. }}
  1383. >
  1384. <Option value="0">否</Option>
  1385. <Option value="1">是</Option>
  1386. </Select>
  1387. </span>
  1388. <span style={{ display: "inline-block" }}>
  1389. <span style={{ marginRight: "10px" }}>
  1390. 是否大客户:
  1391. </span>
  1392. <Select
  1393. placeholder={"是否大客户"}
  1394. style={{ width: 150 }}
  1395. value={searchValues["bigCustomer"]
  1396. ? searchValues["bigCustomer"]
  1397. : undefined}
  1398. onChange={(e) => {
  1399. searchValues["bigCustomer"] = e
  1400. this.setState({
  1401. searchValues: searchValues,
  1402. });
  1403. }}
  1404. >
  1405. <Option value="0">否</Option>
  1406. <Option value="1">是</Option>
  1407. </Select>
  1408. </span>
  1409. <span style={{ display: "inline-block" }}>
  1410. <span style={{ marginRight: "10px" }}>
  1411. 是否科技项目:
  1412. </span>
  1413. <Select
  1414. placeholder={"是否科技项目"}
  1415. style={{ width: 150 }}
  1416. value={searchValues["orderType"]
  1417. ? searchValues["orderType"]
  1418. : undefined}
  1419. onChange={(e) => {
  1420. searchValues["orderType"] = e
  1421. this.setState({
  1422. searchValues: searchValues,
  1423. });
  1424. }}
  1425. >
  1426. <Option value="0">否</Option>
  1427. <Option value="1">是</Option>
  1428. </Select>
  1429. </span>
  1430. <span style={{ display: "inline-block" }}>
  1431. <span style={{ marginRight: "10px" }}>
  1432. 省份选择:
  1433. </span>
  1434. <Select
  1435. placeholder="请选择省份"
  1436. style={{
  1437. width: 150,
  1438. }}
  1439. value={searchValues["province"]
  1440. ? searchValues["province"]
  1441. : undefined}
  1442. onChange={(e) => {
  1443. searchValues["province"] = e
  1444. this.setState({
  1445. searchValues: searchValues,
  1446. });
  1447. }}
  1448. >
  1449. {citySelect().map(function (item) {
  1450. return (
  1451. <Select.Option key={item.value} value={item.value}>
  1452. {item.label}
  1453. </Select.Option>
  1454. );
  1455. })}
  1456. </Select>
  1457. </span>
  1458. <span style={{ display: "inline-block" }}>
  1459. <span style={{ marginRight: "10px" }}>
  1460. 财务负责人:
  1461. </span>
  1462. <StaffSearch
  1463. ref={ref => this.StaffSearch1 = ref}
  1464. valueName={this.state.financeName}
  1465. placeholder="财务负责人"
  1466. width="150px"
  1467. onBlurText={e => {
  1468. this.setState({
  1469. financeName: e.title
  1470. })
  1471. }}
  1472. onBlurChange={(obj) => {
  1473. searchValues["financeId"] = obj.value
  1474. this.setState({
  1475. searchValues: searchValues,
  1476. });
  1477. }}
  1478. />
  1479. </span>
  1480. <span style={{ display: "inline-block" }}>
  1481. <span style={{ marginRight: "10px" }}>
  1482. 营销负责人:
  1483. </span>
  1484. <StaffSearch
  1485. ref={ref => this.StaffSearch2 = ref}
  1486. valueName={this.state.salesmanName}
  1487. placeholder="营销负责人"
  1488. width="150px"
  1489. onBlurText={e => {
  1490. this.setState({
  1491. salesmanName: e.title
  1492. })
  1493. }}
  1494. onBlurChange={(obj) => {
  1495. searchValues["salesmanId"] = obj.value
  1496. this.setState({
  1497. searchValues: searchValues,
  1498. });
  1499. }}
  1500. />
  1501. </span>
  1502. <span style={{ display: "inline-block" }}>
  1503. <span style={{ marginRight: "10px" }}>
  1504. 技术负责人:
  1505. </span>
  1506. <StaffSearch
  1507. ref={ref => this.StaffSearch3 = ref}
  1508. valueName={this.state.techName}
  1509. placeholder="技术负责人"
  1510. width="150px"
  1511. onBlurText={e => {
  1512. this.setState({
  1513. techName: e.title
  1514. })
  1515. }}
  1516. onBlurChange={(obj) => {
  1517. searchValues["techId"] = obj.value
  1518. this.setState({
  1519. searchValues: searchValues,
  1520. });
  1521. }}
  1522. />
  1523. </span>
  1524. <Button type="primary" onClick={this.search} style={{ marginRight: 10 }}>
  1525. 搜索
  1526. </Button>
  1527. <Button onClick={this.reset}>重置</Button>
  1528. </div>
  1529. </TabPane>
  1530. <TabPane tab="更改表格显示数据" key="2">
  1531. <div style={{ marginLeft: 10 }}>
  1532. <ChooseList
  1533. columns={this.state.columns}
  1534. changeFn={this.changeList}
  1535. changeList={this.state.changeList}
  1536. top={55}
  1537. margin={11}
  1538. />
  1539. </div>
  1540. </TabPane>
  1541. <TabPane tab="导出EXCEL" key="3">
  1542. <Button
  1543. type="primary"
  1544. loading={this.state.exportPendingLoading}
  1545. onClick={this.exportAll}
  1546. style={{ margin: 10 }}
  1547. >
  1548. 导出excel
  1549. </Button>
  1550. </TabPane>
  1551. </Tabs>
  1552. </div>
  1553. <div className="patent-table">
  1554. <Spin spinning={this.state.loading}>
  1555. <Table
  1556. columns={this.state.changeList
  1557. ? this.state.changeList
  1558. : this.state.columns}
  1559. dataSource={this.state.dataSource}
  1560. pagination={this.state.pagination}
  1561. bordered
  1562. // rowClassName={getRowClassName}
  1563. scroll={{ x: 4000 }}
  1564. />
  1565. </Spin>
  1566. </div>
  1567. </div >
  1568. );
  1569. }
  1570. }));
  1571. export default ProjecDataStatistics;