projecDataStatistics.jsx 44 KB

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