projecCount.jsx 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032
  1. import React, { Component } from "react";
  2. import {
  3. AutoComplete,
  4. Button,
  5. DatePicker,
  6. Input,
  7. message,
  8. Modal,
  9. Select,
  10. Spin,
  11. Table,
  12. Tabs,
  13. } from "antd";
  14. import { ShowModal, getNewDiccityArr } from "@/tools";
  15. import { citySelect } from "../../../NewDicProvinceList";
  16. import { ChooseList } from "../../order/orderNew/chooseList";
  17. import $ from "jquery/src/ajax";
  18. import moment from "moment";
  19. import {
  20. highTechColumns,
  21. invention,
  22. utilityModel,
  23. softWriting,
  24. otherTrademarks,
  25. currency,
  26. } from "./projecCountConfig";
  27. import HighTech from "./highTech";
  28. import "./index.less";
  29. const { TabPane } = Tabs;
  30. const { RangePicker } = DatePicker;
  31. const { Option } = Select;
  32. class ProjecCount extends Component {
  33. constructor(props) {
  34. super(props);
  35. this.state = {
  36. loading: false,
  37. changeList: [],
  38. columns: currency((v, screen) => {
  39. this.openProjectSummary(v, screen);
  40. }),
  41. pagination: {
  42. defaultCurrent: 1,
  43. defaultPageSize: 10,
  44. showQuickJumper: true,
  45. pageSize: 10,
  46. onChange: function (page) {
  47. this.loadData(page);
  48. }.bind(this),
  49. showTotal: function (total) {
  50. return "共" + total + "条数据";
  51. },
  52. },
  53. dataSource: [],
  54. taberReleaseDate: [],
  55. taberProjectType: "",
  56. taberCommodityName: "",
  57. releaseDate: [],
  58. searchOrderNo: "",
  59. searchContractNo: "",
  60. searchEnterpriseName: "",
  61. declarationBatch: "",
  62. projectType: "",
  63. projectStatus: "",
  64. province: "",
  65. depId: "",
  66. departmentArr: [],
  67. contactsOption: [],
  68. contactsOptionData: [],
  69. customerArr: [],
  70. commodityName: "",
  71. kid: "",
  72. status: 0,
  73. };
  74. this.loadData = this.loadData.bind(this);
  75. this.resetAll = this.resetAll.bind(this);
  76. this.changeList = this.changeList.bind(this);
  77. this.departmentList = this.departmentList.bind(this);
  78. this.exportPending = this.exportPending.bind(this);
  79. this.exportExcel = this.exportExcel.bind(this);
  80. this.selectSuperId = this.selectSuperId.bind(this);
  81. this.supervisorCui = this.supervisorCui.bind(this);
  82. this.httpChangeCui = this.httpChangeCui.bind(this);
  83. this.selectAuto = this.selectAuto.bind(this);
  84. this.openProjectSummary = this.openProjectSummary.bind(this);
  85. }
  86. changeList(arr) {
  87. const newArr = [];
  88. this.state.columns.forEach((item) => {
  89. arr.forEach((val) => {
  90. if (val === item.title) {
  91. newArr.push(item);
  92. }
  93. });
  94. });
  95. this.setState({
  96. changeList: newArr,
  97. });
  98. }
  99. loadData(pageNo) {
  100. this.setState({
  101. page: pageNo,
  102. loading: true,
  103. taberReleaseDate: this.state.releaseDate,
  104. taberProjectType: this.state.projectType,
  105. taberCommodityName: this.state.commodityName,
  106. });
  107. $.ajax({
  108. method: "get",
  109. dataType: "json",
  110. crossDomain: false,
  111. url:
  112. globalConfig.context +
  113. "/api/admin/statistis/selectProvincialStatistics",
  114. data: {
  115. pageNo: pageNo || 1,
  116. pageSize: this.state.pagination.pageSize,
  117. startDate:
  118. this.state.releaseDate.length > 0
  119. ? this.state.releaseDate[0]
  120. : undefined, //开始时间
  121. endDate:
  122. this.state.releaseDate.length > 0
  123. ? this.state.releaseDate[1]
  124. : undefined, //结束时间
  125. province: this.state.province || undefined,
  126. projectStatus: this.state.projectStatus || undefined, //项目类别
  127. projectType:
  128. typeof this.state.projectType === "number"
  129. ? this.state.projectType
  130. : undefined, //项目分类
  131. status: this.state.status,
  132. thchDepId: this.state.depId || undefined,
  133. projectId: this.state.kid || undefined,
  134. },
  135. success: function (data) {
  136. ShowModal(this);
  137. let theArr = [];
  138. if (!data.data || !data.data.list) {
  139. if (data.error && data.error.length) {
  140. message.warning(data.error[0].message);
  141. }
  142. } else {
  143. for (let i = 0; i < data.data.list.length; i++) {
  144. let thisdata = data.data.list[i];
  145. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  146. theArr.push(thisdata);
  147. }
  148. }
  149. this.state.pagination.current = data.data.pageNo;
  150. this.state.pagination.total = data.data.totalCount;
  151. if (data.data && data.data.list && !data.data.list.length) {
  152. this.state.pagination.current = 0;
  153. this.state.pagination.total = 0;
  154. }
  155. this.setState({
  156. dataSource: theArr,
  157. pagination: this.state.pagination,
  158. });
  159. }.bind(this),
  160. }).always(
  161. function () {
  162. this.setState({
  163. loading: false,
  164. });
  165. }.bind(this)
  166. );
  167. }
  168. //部门
  169. departmentList() {
  170. $.ajax({
  171. method: "get",
  172. dataType: "json",
  173. crossDomain: false,
  174. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  175. data: {},
  176. success: function (data) {
  177. let thedata = data.data;
  178. let theArr = [];
  179. if (!thedata) {
  180. if (data.error && data.error.length) {
  181. message.warning(data.error[0].message);
  182. }
  183. } else {
  184. thedata.map(function (item, index) {
  185. theArr.push({
  186. key: index,
  187. name: item.name,
  188. id: item.id,
  189. });
  190. });
  191. }
  192. this.setState({
  193. departmentArr: theArr,
  194. });
  195. }.bind(this),
  196. });
  197. }
  198. resetAll() {
  199. this.setState(
  200. {
  201. releaseDate: [],
  202. searchOrderNo: "",
  203. searchContractNo: "",
  204. searchEnterpriseName: "",
  205. declarationBatch: "",
  206. province: "",
  207. depId: "",
  208. projectType: "",
  209. projectStatus: "",
  210. columns: currency((v, screen) => {
  211. this.openProjectSummary(v, screen);
  212. }),
  213. commodityName: "",
  214. kid: "",
  215. status: 0,
  216. taberReleaseDate: [],
  217. taberProjectType: "",
  218. taberCommodityName: "",
  219. },
  220. () => {
  221. this.loadData();
  222. }
  223. );
  224. }
  225. exportPending() {
  226. message.config({
  227. duration: 20,
  228. });
  229. let loading = message.loading("下载中...");
  230. this.setState({
  231. exportPendingLoading: true,
  232. });
  233. let url = `/api/admin/statistis/exporProvincialList?status=${this.state.status}`;
  234. let dep = this.state.departmentArr.filter((e) => e.id === this.state.depId); //责任部门名称
  235. let option = this.state.contactsOptionData.filter(
  236. (e) => e.id === this.state.projectStatus
  237. ); //项目类别名称
  238. if (dep.length > 0) {
  239. url = url + `&thchDepName=${dep[0].name}`;
  240. }
  241. if (option.length > 0) {
  242. url = url + `&projectStatusName=${option[0].cname}`;
  243. }
  244. if (typeof this.state.projectType === "number") {
  245. url =
  246. url +
  247. `&projectTypeName=${
  248. this.state.projectType === 0
  249. ? "通用"
  250. : this.state.projectType === 1
  251. ? "专利"
  252. : this.state.projectType === 2
  253. ? "软著"
  254. : this.state.projectType === 3
  255. ? "审计"
  256. : this.state.projectType === 4
  257. ? "双软"
  258. : this.state.projectType === 5
  259. ? "高新"
  260. : this.state.projectType === 6
  261. ? "商标"
  262. : ""
  263. }`;
  264. }
  265. if (this.state.commodityName) {
  266. url = url + `&projectName=${this.state.commodityName}`;
  267. }
  268. if (this.state.province) {
  269. url = url + `&provinceName=${getNewDiccityArr(this.state.province)}`;
  270. }
  271. let data = {
  272. startDate:
  273. this.state.releaseDate.length > 0
  274. ? this.state.releaseDate[0]
  275. : undefined, //开始时间
  276. endDate:
  277. this.state.releaseDate.length > 0
  278. ? this.state.releaseDate[1]
  279. : undefined, //结束时间
  280. thchDepId: this.state.depId || undefined, //责任部门ID
  281. projectStatus: this.state.projectStatus || undefined, //项目类别
  282. projectType:
  283. typeof this.state.projectType === "number"
  284. ? this.state.projectType
  285. : undefined, //项目分类
  286. province: this.state.province || undefined,
  287. projectId: this.state.kid || undefined,
  288. };
  289. for (let key in data) {
  290. if (data[key]) {
  291. url = url + `&${key}=${data[key]}`;
  292. }
  293. }
  294. $.ajax({
  295. method: "get",
  296. dataType: "json",
  297. crossDomain: false,
  298. url: url,
  299. data: {},
  300. success: function (data) {
  301. if (data.error.length === 0) {
  302. this.download(data.data);
  303. } else {
  304. message.warning(data.error[0].message);
  305. }
  306. }.bind(this),
  307. }).always(
  308. function () {
  309. loading();
  310. this.setState({
  311. exportPendingLoading: false,
  312. });
  313. }.bind(this)
  314. );
  315. }
  316. exportExcel() {
  317. let data = {
  318. pageNo: this.state.pageNo || 1,
  319. pageSize: 9999,
  320. startDate:
  321. this.state.releaseDate.length > 0
  322. ? this.state.releaseDate[0]
  323. : undefined, //开始时间
  324. endDate:
  325. this.state.releaseDate.length > 0
  326. ? this.state.releaseDate[1]
  327. : undefined, //结束时间
  328. projectType:
  329. typeof this.state.projectType === "number"
  330. ? this.state.projectType
  331. : undefined, //项目分类
  332. projectId: this.state.kid || undefined,
  333. province: this.state.taberProvince || undefined,
  334. projectStatus: this.state.taberProjectStatus || undefined, //项目类别
  335. thchDepId: this.state.taberdepId || undefined,
  336. status:
  337. this.state.projectType === 4
  338. ? 2
  339. : this.state.projectType === 2
  340. ? 3
  341. : this.state.projectType === 1
  342. ? 4
  343. : this.state.projectType === 5
  344. ? 1
  345. : this.state.contactsOptionData.filter(
  346. (v) => v.id === this.state.taberProjectStatus
  347. ).length > 0
  348. ? this.state.contactsOptionData.filter(
  349. (v) => v.id === this.state.taberProjectStatus
  350. )[0].cname === "高新"
  351. ? 1
  352. : 0
  353. : 0,
  354. screen: this.state.screen, //筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 12公示数
  355. };
  356. for (let key in data) {
  357. if (!data[key]) {
  358. delete data[key];
  359. }
  360. }
  361. window.location.href =
  362. globalConfig.context +
  363. "/api/admin/statistis/exporTaskList?" +
  364. $.param(data);
  365. }
  366. download(fileName) {
  367. window.location.href =
  368. globalConfig.context + "/open/download?fileName=" + fileName;
  369. }
  370. //项目类别
  371. selectSuperId() {
  372. $.ajax({
  373. method: "get",
  374. dataType: "json",
  375. crossDomain: false,
  376. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  377. data: {
  378. flag: 0,
  379. },
  380. success: function (data) {
  381. let theArr = [];
  382. let thedata = data.data;
  383. if (!thedata) {
  384. if (data.error && data.error.length) {
  385. message.warning(data.error[0].message);
  386. }
  387. }
  388. for (let i = 0; i < data.data.length; i++) {
  389. let theData = data.data[i];
  390. theArr.push(
  391. <Select.Option value={theData.id} key={theData.cname}>
  392. {theData.cname}
  393. </Select.Option>
  394. );
  395. }
  396. this.setState({
  397. contactsOption: theArr,
  398. contactsOptionData: data.data,
  399. });
  400. }.bind(this),
  401. }).always();
  402. }
  403. supervisorCui(e) {
  404. //客户名称与服务名称自动补全
  405. let api = "/api/admin/order/getBusinessProjectByName";
  406. $.ajax({
  407. method: "get",
  408. dataType: "json",
  409. crossDomain: false,
  410. url: globalConfig.context + api,
  411. data: {
  412. businessName: e,
  413. },
  414. success: function (data) {
  415. let thedata = data.data;
  416. if (!thedata) {
  417. if (data.error && data.error.length) {
  418. message.warning(data.error[0].message);
  419. }
  420. thedata = {};
  421. }
  422. this.setState({
  423. customerArr: thedata,
  424. });
  425. }.bind(this),
  426. }).always(
  427. function () {
  428. this.setState({
  429. loading: false,
  430. });
  431. }.bind(this)
  432. );
  433. }
  434. httpChangeCui(e) {
  435. if (e.length >= 1) {
  436. this.supervisorCui(e, false);
  437. }
  438. this.setState({
  439. commodityName: e,
  440. });
  441. }
  442. //上级主管输入框失去焦点是判断客户是否存在
  443. selectAuto(value) {
  444. let kid = [];
  445. let fwList = this.state.customerArr;
  446. fwList.map(function (item) {
  447. if (value === item.bname) {
  448. kid = item.id;
  449. }
  450. });
  451. this.setState({
  452. kid: kid,
  453. commodityName: value,
  454. });
  455. }
  456. componentWillMount() {
  457. this.loadData();
  458. this.departmentList();
  459. this.selectSuperId();
  460. }
  461. openProjectSummary(record, screen) {
  462. this.setState({
  463. projectSummary: true,
  464. taberProvince: record.province,
  465. taberProjectStatus: record.bpId, //项目类别
  466. taberdepId: record.thchDepId,
  467. screen: screen,
  468. });
  469. }
  470. render() {
  471. const dataSources = this.state.customerArr || [];
  472. const options = dataSources.map((group, index) => (
  473. <Select.Option key={index} value={group.bname}>
  474. {group.bname}
  475. </Select.Option>
  476. ));
  477. return (
  478. <div className="user-content">
  479. <div className="content-title">
  480. <span>
  481. 项目统计 (
  482. {this.state.status === 2
  483. ? "专利"
  484. : this.state.status === 4
  485. ? "软著"
  486. : this.state.status === 1
  487. ? "高新"
  488. : this.state.status === 5
  489. ? "商标"
  490. : "通用"}
  491. )
  492. </span>
  493. </div>
  494. <Tabs defaultActiveKey="1" className="test">
  495. <TabPane tab="搜索" key="1">
  496. <div
  497. className="user-search"
  498. style={{
  499. marginTop: "10px",
  500. marginLeft: "10px",
  501. marginRight: "10px",
  502. }}
  503. >
  504. <span
  505. style={{
  506. display: "inline-block",
  507. marginRight: "10px",
  508. marginBottom: "10px",
  509. }}
  510. >
  511. <span>项目名称:</span>
  512. <AutoComplete
  513. className="certain-category-search"
  514. dropdownClassName="certain-category-search-dropdown"
  515. dropdownMatchSelectWidth={false}
  516. dropdownStyle={{ width: 200 }}
  517. style={{ width: 100, marginLeft: "10px" }}
  518. dataSource={options}
  519. placeholder="输入服务名称"
  520. value={this.state.commodityName}
  521. onChange={this.httpChangeCui}
  522. filterOption={true}
  523. onSelect={this.selectAuto}
  524. >
  525. <Input />
  526. </AutoComplete>
  527. </span>
  528. <span style={{ display: "inline-block" }}>
  529. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  530. 项目类别 :
  531. </span>
  532. <Select
  533. value={this.state.projectStatus || undefined}
  534. placeholder="请选择项目类别"
  535. notFoundContent="未获取到上级品类列表"
  536. style={{
  537. width: 100,
  538. marginRight: "10px",
  539. marginBottom: "10px",
  540. }}
  541. onChange={(e) => {
  542. let infor = this.state.contactsOptionData.filter(
  543. (v) => v.id === e
  544. );
  545. this.setState(
  546. {
  547. projectStatus: e,
  548. },
  549. () => {
  550. if (
  551. infor.length &&
  552. infor[0].cname === "高新" &&
  553. typeof this.state.projectType !== "number"
  554. ) {
  555. this.setState(
  556. {
  557. columns: highTechColumns((v, screen) => {
  558. this.openProjectSummary(v, screen);
  559. }),
  560. changeList: [],
  561. status: 1,
  562. },
  563. () => {
  564. this.loadData();
  565. }
  566. );
  567. } else if (typeof this.state.projectType !== "number") {
  568. this.setState(
  569. {
  570. columns: currency((v, screen) => {
  571. this.openProjectSummary(v, screen);
  572. }),
  573. changeList: [],
  574. status: 0,
  575. },
  576. () => {
  577. this.loadData();
  578. }
  579. );
  580. } else {
  581. this.loadData();
  582. }
  583. }
  584. );
  585. }}
  586. >
  587. {this.state.contactsOption}
  588. </Select>
  589. </span>
  590. <span style={{ display: "inline-block" }}>
  591. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  592. 项目分类 :
  593. </span>
  594. <Select
  595. value={
  596. typeof this.state.projectType === "number"
  597. ? this.state.projectType
  598. : undefined
  599. }
  600. placeholder="请选择项目分类"
  601. style={{
  602. width: 100,
  603. marginRight: "10px",
  604. marginBottom: "10px",
  605. }}
  606. onChange={(e) => {
  607. this.setState(
  608. {
  609. columns:
  610. e === 0
  611. ? currency((v, screen) => {
  612. this.openProjectSummary(v, screen);
  613. })
  614. : e === 1
  615. ? invention((v, screen) => {
  616. this.openProjectSummary(v, screen);
  617. })
  618. : e === 2
  619. ? softWriting((v, screen) => {
  620. this.openProjectSummary(v, screen);
  621. })
  622. : e === 3
  623. ? currency((v, screen) => {
  624. this.openProjectSummary(v, screen);
  625. })
  626. : e === 4
  627. ? currency((v, screen) => {
  628. this.openProjectSummary(v, screen);
  629. })
  630. : e === 5
  631. ? highTechColumns((v, screen) => {
  632. this.openProjectSummary(v, screen);
  633. })
  634. : e === 6
  635. ? otherTrademarks((v, screen) => {
  636. this.openProjectSummary(v, screen);
  637. })
  638. : [],
  639. changeList: [],
  640. projectType: e,
  641. status:
  642. e === 1
  643. ? 2
  644. : e === 2
  645. ? 4
  646. : e === 5
  647. ? 1
  648. : e === 6
  649. ? 5
  650. : 0, // 0通用 1高新 2发明专利 3实用新型 4软著 5商标
  651. },
  652. () => {
  653. this.loadData();
  654. }
  655. );
  656. }}
  657. >
  658. <Option value={0}>通用</Option>
  659. <Option value={1}>专利</Option>
  660. <Option value={2}>软著</Option>
  661. <Option value={3}>审计</Option>
  662. <Option value={4}>双软</Option>
  663. <Option value={5}>高新</Option>
  664. <Option value={6}>商标</Option>
  665. </Select>
  666. </span>
  667. <span
  668. style={{
  669. display: "inline-block",
  670. marginRight: "10px",
  671. marginBottom: "10px",
  672. }}
  673. >
  674. <span>派单省份:</span>
  675. <Select
  676. placeholder="请选择省份"
  677. style={{
  678. width: 100,
  679. marginRight: "10px",
  680. marginLeft: "10px",
  681. marginBottom: "10px",
  682. }}
  683. value={getNewDiccityArr(this.state.province)}
  684. onChange={(e) => {
  685. this.setState({ province: e });
  686. }}
  687. >
  688. {citySelect().map(function (item) {
  689. return (
  690. <Select.Option key={item.value} value={item.value}>
  691. {item.label}
  692. </Select.Option>
  693. );
  694. })}
  695. </Select>
  696. </span>
  697. <span
  698. style={{
  699. display: "inline-block",
  700. marginRight: "10px",
  701. marginBottom: "10px",
  702. }}
  703. >
  704. <span>负责部门:</span>
  705. <Select
  706. placeholder="请选择部门"
  707. style={{
  708. width: 200,
  709. marginRight: "10px",
  710. marginLeft: "10px",
  711. marginBottom: "10px",
  712. }}
  713. value={this.state.depId || undefined}
  714. onChange={(e) => {
  715. this.setState({ depId: e });
  716. }}
  717. >
  718. {this.state.departmentArr.map(function (item) {
  719. return (
  720. <Select.Option key={item.id} value={item.id}>
  721. {item.name}
  722. </Select.Option>
  723. );
  724. })}
  725. </Select>
  726. </span>
  727. <span style={{ display: "inline-block" }}>
  728. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  729. 派单时间 :
  730. </span>
  731. <RangePicker
  732. style={{ marginRight: "10px", marginBottom: "10px" }}
  733. value={[
  734. this.state.releaseDate[0]
  735. ? moment(this.state.releaseDate[0])
  736. : null,
  737. this.state.releaseDate[1]
  738. ? moment(this.state.releaseDate[1])
  739. : null,
  740. ]}
  741. onChange={(data, dataString) => {
  742. this.setState({ releaseDate: dataString });
  743. }}
  744. />
  745. </span>
  746. <Button
  747. type="primary"
  748. onClick={() => {
  749. if (this.state.commodityName.length === 0) {
  750. this.setState(
  751. {
  752. kid: "",
  753. },
  754. () => {
  755. this.loadData();
  756. }
  757. );
  758. } else {
  759. this.loadData();
  760. }
  761. }}
  762. style={{ marginRight: "10px", marginBottom: "10px" }}
  763. >
  764. 搜索
  765. </Button>
  766. <Button
  767. onClick={this.resetAll}
  768. style={{ marginRight: "10px", marginBottom: "10px" }}
  769. >
  770. 重置
  771. </Button>
  772. </div>
  773. </TabPane>
  774. <TabPane tab="更改表格显示数据" key="2">
  775. <div style={{ marginLeft: 10 }}>
  776. <ChooseList
  777. columns={this.state.columns}
  778. changeFn={this.changeList}
  779. changeList={this.state.changeList}
  780. top={55}
  781. margin={11}
  782. />
  783. </div>
  784. </TabPane>
  785. <TabPane tab="导出EXCEL" key="3">
  786. <Button
  787. type="primary"
  788. style={{ margin: "10px" }}
  789. loading={this.state.exportPendingLoading}
  790. onClick={this.exportPending}
  791. >
  792. 导出
  793. </Button>
  794. </TabPane>
  795. </Tabs>
  796. <div className="patent-table">
  797. <Spin spinning={this.state.loading}>
  798. <Table
  799. bordered
  800. size="middle"
  801. scroll={{ x: 800, y: 0 }}
  802. columns={
  803. this.state.changeList.length > 0
  804. ? this.state.changeList
  805. : this.state.columns
  806. }
  807. dataSource={this.state.dataSource}
  808. pagination={this.state.pagination}
  809. />
  810. </Spin>
  811. </div>
  812. {this.state.projectSummary ? (
  813. <Modal
  814. maskClosable={false}
  815. className="customeDetails"
  816. footer=""
  817. title=""
  818. width="1800px"
  819. visible={this.state.projectSummary}
  820. onOk={() => {
  821. this.setState({
  822. projectSummary: false,
  823. });
  824. }}
  825. onCancel={() => {
  826. this.setState({
  827. projectSummary: false,
  828. });
  829. }}
  830. >
  831. <HighTech
  832. searchData={{
  833. startDate:
  834. this.state.releaseDate.length > 0
  835. ? this.state.releaseDate[0]
  836. : undefined, //开始时间
  837. endDate:
  838. this.state.releaseDate.length > 0
  839. ? this.state.releaseDate[1]
  840. : undefined, //结束时间
  841. projectType:
  842. typeof this.state.projectType === "number"
  843. ? this.state.projectType
  844. : undefined, //项目分类
  845. projectId: this.state.kid || undefined,
  846. province: this.state.taberProvince || undefined,
  847. projectStatus: this.state.taberProjectStatus || undefined, //项目类别
  848. thchDepId: this.state.taberdepId || undefined,
  849. status:
  850. this.state.projectType === 4
  851. ? 2
  852. : this.state.projectType === 2
  853. ? 3
  854. : this.state.projectType === 1
  855. ? 4
  856. : this.state.projectType === 5
  857. ? 1
  858. : this.state.contactsOptionData.filter(
  859. (v) => v.id === this.state.taberProjectStatus
  860. ).length > 0
  861. ? this.state.contactsOptionData.filter(
  862. (v) => v.id === this.state.taberProjectStatus
  863. )[0].cname === "高新"
  864. ? 1
  865. : 0
  866. : 0,
  867. screen: this.state.screen, //筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 12公示数
  868. }}
  869. introduce={() => (
  870. <div
  871. className="user-search"
  872. style={{
  873. marginTop: "10px",
  874. marginLeft: "10px",
  875. marginRight: "10px",
  876. }}
  877. >
  878. {this.state.taberProvince ? (
  879. <span
  880. style={{
  881. display: "inline-block",
  882. marginRight: "20px",
  883. marginBottom: "10px",
  884. }}
  885. >
  886. <span>派单省份:</span>
  887. <span style={{ width: 100, marginLeft: "10px" }}>
  888. {getNewDiccityArr(this.state.taberProvince)}
  889. </span>
  890. </span>
  891. ) : null}
  892. {this.state.taberProjectStatus ? (
  893. <span
  894. style={{
  895. display: "inline-block",
  896. marginRight: "20px",
  897. marginBottom: "10px",
  898. }}
  899. >
  900. <span>项目类别 :</span>
  901. <span style={{ width: 100, marginLeft: "10px" }}>
  902. {
  903. this.state.contactsOptionData.filter(
  904. (v) => v.id === this.state.taberProjectStatus
  905. )[0].cname
  906. }
  907. </span>
  908. </span>
  909. ) : null}
  910. {this.state.taberdepId ? (
  911. <span
  912. style={{
  913. display: "inline-block",
  914. marginRight: "20px",
  915. marginBottom: "10px",
  916. }}
  917. >
  918. <span>负责部门:</span>
  919. <span style={{ width: 200, marginLeft: "10px" }}>
  920. {
  921. this.state.departmentArr.filter(
  922. (v) => v.id === this.state.taberdepId
  923. )[0].name
  924. }
  925. </span>
  926. </span>
  927. ) : null}
  928. {this.state.taberCommodityName ? (
  929. <span
  930. style={{
  931. display: "inline-block",
  932. marginRight: "20px",
  933. marginBottom: "10px",
  934. }}
  935. >
  936. <span>项目名称:</span>
  937. <span style={{ width: 100, marginLeft: "10px" }}>
  938. {this.state.taberCommodityName}
  939. </span>
  940. </span>
  941. ) : null}
  942. {typeof this.state.taberProjectType === "number" ? (
  943. <span
  944. style={{
  945. display: "inline-block",
  946. marginRight: "20px",
  947. marginBottom: "10px",
  948. }}
  949. >
  950. <span>项目分类 :</span>
  951. <span style={{ width: 100, marginRight: "10px" }}>
  952. {this.state.taberProjectType === 0
  953. ? "通用"
  954. : this.state.taberProjectType === 1
  955. ? "专利"
  956. : this.state.taberProjectType === 2
  957. ? "软著"
  958. : this.state.taberProjectType === 3
  959. ? "审计"
  960. : this.state.taberProjectType === 4
  961. ? "双软"
  962. : this.state.taberProjectType === 5
  963. ? "高新"
  964. : this.state.taberProjectType === 6
  965. ? "商标"
  966. : ""}
  967. </span>
  968. </span>
  969. ) : null}
  970. {this.state.taberReleaseDate.length > 0 ? (
  971. <span
  972. style={{
  973. display: "inline-block",
  974. marginRight: "20px",
  975. marginBottom: "10px",
  976. }}
  977. >
  978. <span>派单时间 :</span>
  979. <span style={{ width: 100, marginRight: "10px" }}>
  980. {this.state.taberReleaseDate[0] +
  981. "~" +
  982. this.state.taberReleaseDate[1]}
  983. </span>
  984. </span>
  985. ) : null}
  986. <Button type="primary" onClick={this.exportExcel}>导出EXCEL</Button>
  987. </div>
  988. )}
  989. />
  990. </Modal>
  991. ) : null}
  992. </div>
  993. );
  994. }
  995. }
  996. export default ProjecCount;