projecCount.jsx 33 KB

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