projecCount.jsx 33 KB

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