projecCount.jsx 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014
  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. console.log(123123123);
  318. // let loading = message.loading('下载中...');
  319. console.log(this.state);
  320. let data = {
  321. startDate:this.state.releaseDate.length > 0
  322. ? this.state.releaseDate[0]
  323. : undefined, //开始时间
  324. endDate:this.state.releaseDate.length > 0
  325. ? this.state.releaseDate[1]
  326. : undefined, //结束时间
  327. thchDepId: this.state.depId || undefined, //责任部门ID
  328. depId: this.state.depId || undefined,
  329. projectStatus: this.state.projectStatus || undefined, //项目类别
  330. projectType:
  331. typeof this.state.projectType === "number"
  332. ? this.state.projectType
  333. : undefined, //项目分类
  334. province: this.state.province || undefined,
  335. projectId: this.state.kid || undefined,
  336. declarationBatch: this.state.declarationBatch || undefined,
  337. status: this.state.status || undefined,
  338. screen: this.state.screen || undefined
  339. };
  340. for (let key in data) {
  341. if (!data[key]) {
  342. delete data[key];
  343. }
  344. }
  345. window.location.href =
  346. globalConfig.context +
  347. "/api/admin/statistis/exporTaskList?" +
  348. $.param(data);
  349. }
  350. download(fileName) {
  351. window.location.href =
  352. globalConfig.context + "/open/download?fileName=" + fileName;
  353. }
  354. //项目类别
  355. selectSuperId() {
  356. $.ajax({
  357. method: "get",
  358. dataType: "json",
  359. crossDomain: false,
  360. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  361. data: {
  362. flag: 0,
  363. },
  364. success: function (data) {
  365. let theArr = [];
  366. let thedata = data.data;
  367. if (!thedata) {
  368. if (data.error && data.error.length) {
  369. message.warning(data.error[0].message);
  370. }
  371. }
  372. for (let i = 0; i < data.data.length; i++) {
  373. let theData = data.data[i];
  374. theArr.push(
  375. <Select.Option value={theData.id} key={theData.cname}>
  376. {theData.cname}
  377. </Select.Option>
  378. );
  379. }
  380. this.setState({
  381. contactsOption: theArr,
  382. contactsOptionData: data.data,
  383. });
  384. }.bind(this),
  385. }).always();
  386. }
  387. supervisorCui(e) {
  388. //客户名称与服务名称自动补全
  389. let api = "/api/admin/order/getBusinessProjectByName";
  390. $.ajax({
  391. method: "get",
  392. dataType: "json",
  393. crossDomain: false,
  394. url: globalConfig.context + api,
  395. data: {
  396. businessName: e,
  397. },
  398. success: function (data) {
  399. let thedata = data.data;
  400. if (!thedata) {
  401. if (data.error && data.error.length) {
  402. message.warning(data.error[0].message);
  403. }
  404. thedata = {};
  405. }
  406. this.setState({
  407. customerArr: thedata,
  408. });
  409. }.bind(this),
  410. }).always(
  411. function () {
  412. this.setState({
  413. loading: false,
  414. });
  415. }.bind(this)
  416. );
  417. }
  418. httpChangeCui(e) {
  419. if (e.length >= 1) {
  420. this.supervisorCui(e, false);
  421. }
  422. this.setState({
  423. commodityName: e,
  424. });
  425. }
  426. //上级主管输入框失去焦点是判断客户是否存在
  427. selectAuto(value) {
  428. let kid = [];
  429. let fwList = this.state.customerArr;
  430. fwList.map(function (item) {
  431. if (value === item.bname) {
  432. kid = item.id;
  433. }
  434. });
  435. this.setState({
  436. kid: kid,
  437. commodityName: value,
  438. });
  439. }
  440. componentWillMount() {
  441. this.loadData();
  442. this.departmentList();
  443. this.selectSuperId();
  444. }
  445. openProjectSummary(record, screen) {
  446. this.setState({
  447. projectSummary: true,
  448. taberProvince: record.province,
  449. taberProjectStatus: record.bpId, //项目类别
  450. taberdepId: record.thchDepId,
  451. screen: screen,
  452. });
  453. }
  454. render() {
  455. const dataSources = this.state.customerArr || [];
  456. const options = dataSources.map((group, index) => (
  457. <Select.Option key={index} value={group.bname}>
  458. {group.bname}
  459. </Select.Option>
  460. ));
  461. return (
  462. <div className="user-content">
  463. <div className="content-title">
  464. <span>
  465. 项目统计 (
  466. {this.state.status === 2
  467. ? "专利"
  468. : this.state.status === 4
  469. ? "软著"
  470. : this.state.status === 1
  471. ? "高新"
  472. : this.state.status === 5
  473. ? "商标"
  474. : "通用"}
  475. )
  476. </span>
  477. </div>
  478. <Tabs defaultActiveKey="1" className="test">
  479. <TabPane tab="搜索" key="1">
  480. <div
  481. className="user-search"
  482. style={{
  483. marginTop: "10px",
  484. marginLeft: "10px",
  485. marginRight: "10px",
  486. }}
  487. >
  488. <span
  489. style={{
  490. display: "inline-block",
  491. marginRight: "10px",
  492. marginBottom: "10px",
  493. }}
  494. >
  495. <span>项目名称:</span>
  496. <AutoComplete
  497. className="certain-category-search"
  498. dropdownClassName="certain-category-search-dropdown"
  499. dropdownMatchSelectWidth={false}
  500. dropdownStyle={{ width: 200 }}
  501. style={{ width: 100, marginLeft: "10px" }}
  502. dataSource={options}
  503. placeholder="输入服务名称"
  504. value={this.state.commodityName}
  505. onChange={this.httpChangeCui}
  506. filterOption={true}
  507. onSelect={this.selectAuto}
  508. >
  509. <Input />
  510. </AutoComplete>
  511. </span>
  512. <span style={{ display: "inline-block" }}>
  513. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  514. 项目类别 :
  515. </span>
  516. <Select
  517. value={this.state.projectStatus || undefined}
  518. placeholder="请选择项目类别"
  519. notFoundContent="未获取到上级品类列表"
  520. style={{
  521. width: 100,
  522. marginRight: "10px",
  523. marginBottom: "10px",
  524. }}
  525. onChange={(e) => {
  526. let infor = this.state.contactsOptionData.filter(
  527. (v) => v.id === e
  528. );
  529. this.setState(
  530. {
  531. projectStatus: e,
  532. },
  533. () => {
  534. if (
  535. infor.length &&
  536. infor[0].cname === "高新" &&
  537. typeof this.state.projectType !== "number"
  538. ) {
  539. this.setState(
  540. {
  541. columns: highTechColumns((v, screen) => {
  542. this.openProjectSummary(v, screen);
  543. }),
  544. changeList: [],
  545. status: 1,
  546. },
  547. () => {
  548. this.loadData();
  549. }
  550. );
  551. } else if (typeof this.state.projectType !== "number") {
  552. this.setState(
  553. {
  554. columns: currency((v, screen) => {
  555. this.openProjectSummary(v, screen);
  556. }),
  557. changeList: [],
  558. status: 0,
  559. },
  560. () => {
  561. this.loadData();
  562. }
  563. );
  564. } else {
  565. this.loadData();
  566. }
  567. }
  568. );
  569. }}
  570. >
  571. {this.state.contactsOption}
  572. </Select>
  573. </span>
  574. <span style={{ display: "inline-block" }}>
  575. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  576. 项目分类 :
  577. </span>
  578. <Select
  579. value={
  580. typeof this.state.projectType === "number"
  581. ? this.state.projectType
  582. : undefined
  583. }
  584. placeholder="请选择项目分类"
  585. style={{
  586. width: 100,
  587. marginRight: "10px",
  588. marginBottom: "10px",
  589. }}
  590. onChange={(e) => {
  591. this.setState(
  592. {
  593. columns:
  594. e === 0
  595. ? currency((v, screen) => {
  596. this.openProjectSummary(v, screen);
  597. })
  598. : e === 1
  599. ? invention((v, screen) => {
  600. this.openProjectSummary(v, screen);
  601. })
  602. : e === 2
  603. ? softWriting((v, screen) => {
  604. this.openProjectSummary(v, screen);
  605. })
  606. : e === 3
  607. ? currency((v, screen) => {
  608. this.openProjectSummary(v, screen);
  609. })
  610. : e === 4
  611. ? currency((v, screen) => {
  612. this.openProjectSummary(v, screen);
  613. })
  614. : e === 5
  615. ? highTechColumns((v, screen) => {
  616. this.openProjectSummary(v, screen);
  617. })
  618. : e === 6
  619. ? otherTrademarks((v, screen) => {
  620. this.openProjectSummary(v, screen);
  621. })
  622. : [],
  623. changeList: [],
  624. projectType: e,
  625. status:
  626. e === 1
  627. ? 2
  628. : e === 2
  629. ? 4
  630. : e === 5
  631. ? 1
  632. : e === 6
  633. ? 5
  634. : 0, // 0通用 1高新 2发明专利 3实用新型 4软著 5商标
  635. },
  636. () => {
  637. this.loadData();
  638. }
  639. );
  640. }}
  641. >
  642. <Option value={0}>通用</Option>
  643. <Option value={1}>专利</Option>
  644. <Option value={2}>软著</Option>
  645. <Option value={3}>审计</Option>
  646. <Option value={4}>双软</Option>
  647. <Option value={5}>高新</Option>
  648. <Option value={6}>商标</Option>
  649. </Select>
  650. </span>
  651. <span
  652. style={{
  653. display: "inline-block",
  654. marginRight: "10px",
  655. marginBottom: "10px",
  656. }}
  657. >
  658. <span>派单省份:</span>
  659. <Select
  660. placeholder="请选择省份"
  661. style={{
  662. width: 100,
  663. marginRight: "10px",
  664. marginLeft: "10px",
  665. marginBottom: "10px",
  666. }}
  667. value={getNewDiccityArr(this.state.province)}
  668. onChange={(e) => {
  669. this.setState({ province: e });
  670. }}
  671. >
  672. {citySelect().map(function (item) {
  673. return (
  674. <Select.Option key={item.value} value={item.value}>
  675. {item.label}
  676. </Select.Option>
  677. );
  678. })}
  679. </Select>
  680. </span>
  681. <span
  682. style={{
  683. display: "inline-block",
  684. marginRight: "10px",
  685. marginBottom: "10px",
  686. }}
  687. >
  688. <span>负责部门:</span>
  689. <Select
  690. placeholder="请选择部门"
  691. style={{
  692. width: 200,
  693. marginRight: "10px",
  694. marginLeft: "10px",
  695. marginBottom: "10px",
  696. }}
  697. value={this.state.depId || undefined}
  698. onChange={(e) => {
  699. this.setState({ depId: e });
  700. }}
  701. >
  702. {this.state.departmentArr.map(function (item) {
  703. return (
  704. <Select.Option key={item.id} value={item.id}>
  705. {item.name}
  706. </Select.Option>
  707. );
  708. })}
  709. </Select>
  710. </span>
  711. <span style={{ display: "inline-block" }}>
  712. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  713. 派单时间 :
  714. </span>
  715. <RangePicker
  716. style={{ marginRight: "10px", marginBottom: "10px" }}
  717. value={[
  718. this.state.releaseDate[0]
  719. ? moment(this.state.releaseDate[0])
  720. : null,
  721. this.state.releaseDate[1]
  722. ? moment(this.state.releaseDate[1])
  723. : null,
  724. ]}
  725. onChange={(data, dataString) => {
  726. this.setState({ releaseDate: dataString });
  727. }}
  728. />
  729. </span>
  730. <Button
  731. type="primary"
  732. onClick={() => {
  733. if (this.state.commodityName.length === 0) {
  734. this.setState(
  735. {
  736. kid: "",
  737. },
  738. () => {
  739. this.loadData();
  740. }
  741. );
  742. } else {
  743. this.loadData();
  744. }
  745. }}
  746. style={{ marginRight: "10px", marginBottom: "10px" }}
  747. >
  748. 搜索
  749. </Button>
  750. <Button
  751. onClick={this.resetAll}
  752. style={{ marginRight: "10px", marginBottom: "10px" }}
  753. >
  754. 重置
  755. </Button>
  756. </div>
  757. </TabPane>
  758. <TabPane tab="更改表格显示数据" key="2">
  759. <div style={{ marginLeft: 10 }}>
  760. <ChooseList
  761. columns={this.state.columns}
  762. changeFn={this.changeList}
  763. changeList={this.state.changeList}
  764. top={55}
  765. margin={11}
  766. />
  767. </div>
  768. </TabPane>
  769. <TabPane tab="导出EXCEL" key="3">
  770. <Button
  771. type="primary"
  772. style={{ margin: "10px" }}
  773. loading={this.state.exportPendingLoading}
  774. onClick={this.exportPending}
  775. >
  776. 导出
  777. </Button>
  778. </TabPane>
  779. </Tabs>
  780. <div className="patent-table">
  781. <Spin spinning={this.state.loading}>
  782. <Table
  783. bordered
  784. size="middle"
  785. scroll={{ x: 800, y: 0 }}
  786. columns={
  787. this.state.changeList.length > 0
  788. ? this.state.changeList
  789. : this.state.columns
  790. }
  791. dataSource={this.state.dataSource}
  792. pagination={this.state.pagination}
  793. />
  794. </Spin>
  795. </div>
  796. {this.state.projectSummary ? (
  797. <Modal
  798. maskClosable={false}
  799. className="customeDetails"
  800. footer=""
  801. title=""
  802. width="1800px"
  803. visible={this.state.projectSummary}
  804. onOk={() => {
  805. this.setState({
  806. projectSummary: false,
  807. });
  808. }}
  809. onCancel={() => {
  810. this.setState({
  811. projectSummary: false,
  812. });
  813. }}
  814. >
  815. <HighTech
  816. searchData={{
  817. startDate:
  818. this.state.releaseDate.length > 0
  819. ? this.state.releaseDate[0]
  820. : undefined, //开始时间
  821. endDate:
  822. this.state.releaseDate.length > 0
  823. ? this.state.releaseDate[1]
  824. : undefined, //结束时间
  825. projectType:
  826. typeof this.state.projectType === "number"
  827. ? this.state.projectType
  828. : undefined, //项目分类
  829. projectId: this.state.kid || undefined,
  830. province: this.state.taberProvince || undefined,
  831. projectStatus: this.state.taberProjectStatus || undefined, //项目类别
  832. thchDepId: this.state.taberdepId || undefined,
  833. status:
  834. this.state.projectType === 4
  835. ? 2
  836. : this.state.projectType === 2
  837. ? 3
  838. : this.state.projectType === 1
  839. ? 4
  840. : this.state.projectType === 5
  841. ? 1
  842. : this.state.contactsOptionData.filter(
  843. (v) => v.id === this.state.taberProjectStatus
  844. ).length > 0
  845. ? this.state.contactsOptionData.filter(
  846. (v) => v.id === this.state.taberProjectStatus
  847. )[0].cname === "高新"
  848. ? 1
  849. : 0
  850. : 0,
  851. screen: this.state.screen, //筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 12公示数
  852. }}
  853. introduce={() => (
  854. <div
  855. className="user-search"
  856. style={{
  857. marginTop: "10px",
  858. marginLeft: "10px",
  859. marginRight: "10px",
  860. }}
  861. >
  862. {this.state.taberProvince ? (
  863. <span
  864. style={{
  865. display: "inline-block",
  866. marginRight: "20px",
  867. marginBottom: "10px",
  868. }}
  869. >
  870. <span>派单省份:</span>
  871. <span style={{ width: 100, marginLeft: "10px" }}>
  872. {getNewDiccityArr(this.state.taberProvince)}
  873. </span>
  874. </span>
  875. ) : null}
  876. {this.state.taberProjectStatus ? (
  877. <span
  878. style={{
  879. display: "inline-block",
  880. marginRight: "20px",
  881. marginBottom: "10px",
  882. }}
  883. >
  884. <span>项目类别 :</span>
  885. <span style={{ width: 100, marginLeft: "10px" }}>
  886. {
  887. this.state.contactsOptionData.filter(
  888. (v) => v.id === this.state.taberProjectStatus
  889. )[0].cname
  890. }
  891. </span>
  892. </span>
  893. ) : null}
  894. {this.state.taberdepId ? (
  895. <span
  896. style={{
  897. display: "inline-block",
  898. marginRight: "20px",
  899. marginBottom: "10px",
  900. }}
  901. >
  902. <span>负责部门:</span>
  903. <span style={{ width: 200, marginLeft: "10px" }}>
  904. {
  905. this.state.departmentArr.filter(
  906. (v) => v.id === this.state.taberdepId
  907. )[0].name
  908. }
  909. </span>
  910. </span>
  911. ) : null}
  912. {this.state.taberCommodityName ? (
  913. <span
  914. style={{
  915. display: "inline-block",
  916. marginRight: "20px",
  917. marginBottom: "10px",
  918. }}
  919. >
  920. <span>项目名称:</span>
  921. <span style={{ width: 100, marginLeft: "10px" }}>
  922. {this.state.taberCommodityName}
  923. </span>
  924. </span>
  925. ) : null}
  926. {typeof this.state.taberProjectType === "number" ? (
  927. <span
  928. style={{
  929. display: "inline-block",
  930. marginRight: "20px",
  931. marginBottom: "10px",
  932. }}
  933. >
  934. <span>项目分类 :</span>
  935. <span style={{ width: 100, marginRight: "10px" }}>
  936. {this.state.taberProjectType === 0
  937. ? "通用"
  938. : this.state.taberProjectType === 1
  939. ? "专利"
  940. : this.state.taberProjectType === 2
  941. ? "软著"
  942. : this.state.taberProjectType === 3
  943. ? "审计"
  944. : this.state.taberProjectType === 4
  945. ? "双软"
  946. : this.state.taberProjectType === 5
  947. ? "高新"
  948. : this.state.taberProjectType === 6
  949. ? "商标"
  950. : ""}
  951. </span>
  952. </span>
  953. ) : null}
  954. {this.state.taberReleaseDate.length > 0 ? (
  955. <span
  956. style={{
  957. display: "inline-block",
  958. marginRight: "20px",
  959. marginBottom: "10px",
  960. }}
  961. >
  962. <span>派单时间 :</span>
  963. <span style={{ width: 100, marginRight: "10px" }}>
  964. {this.state.taberReleaseDate[0] +
  965. "~" +
  966. this.state.taberReleaseDate[1]}
  967. </span>
  968. </span>
  969. ) : null}
  970. <span onClick={this.exportExcel}>导出EXCEL</span>
  971. </div>
  972. )}
  973. />
  974. </Modal>
  975. ) : null}
  976. </div>
  977. );
  978. }
  979. }
  980. export default ProjecCount;