highTech.jsx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  1. import React, { Component } from "react";
  2. import {
  3. Button,
  4. DatePicker,
  5. Input,
  6. message,
  7. Select,
  8. Spin,
  9. Table,
  10. Tabs,
  11. } from "antd";
  12. import { ShowModal } from "@/tools";
  13. import { ChooseList } from "../../order/orderNew/chooseList";
  14. import $ from "jquery/src/ajax";
  15. import moment from "moment";
  16. import {
  17. highTechColumns,
  18. doubleSoft,
  19. softWriting,
  20. patent,
  21. currency,
  22. } from "./highTechConfig";
  23. import ProjectDetails from "./projectDetails";
  24. const { TabPane } = Tabs;
  25. const { RangePicker } = DatePicker;
  26. const { Option } = Select;
  27. class HighTech extends Component {
  28. constructor(props) {
  29. super(props);
  30. this.state = {
  31. loading: false,
  32. changeList: undefined,
  33. columns: currency,
  34. status: 0,
  35. page: 1,
  36. pagination: {
  37. defaultCurrent: 1,
  38. defaultPageSize: 10,
  39. showQuickJumper: true,
  40. pageSize: 10,
  41. onChange: function (page) {
  42. this.loadData(page);
  43. }.bind(this),
  44. showTotal: function (total) {
  45. return "共" + total + "条数据";
  46. },
  47. },
  48. dataSource: [],
  49. releaseDate: [],
  50. searchOrderNo: "",
  51. searchContractNo: "",
  52. searchEnterpriseName: "",
  53. declarationBatch: "",
  54. projectSituation: "",
  55. projectAmount: "",
  56. depId: "",
  57. thchDepId: "",
  58. projectType: "",
  59. projectStatus: "",
  60. departmentArr: [],
  61. contactsOption: [],
  62. contactsOptionData: [],
  63. visible: false,
  64. };
  65. this.resetAll = this.resetAll.bind(this);
  66. this.changeList = this.changeList.bind(this);
  67. this.departmentList = this.departmentList.bind(this);
  68. this.loadData = this.loadData.bind(this);
  69. this.selectSuperId = this.selectSuperId.bind(this);
  70. }
  71. changeList(arr) {
  72. const newArr = [];
  73. this.state.columns.forEach((item) => {
  74. arr.forEach((val) => {
  75. if (val === item.title) {
  76. newArr.push(item);
  77. }
  78. });
  79. });
  80. this.setState({
  81. changeList: newArr,
  82. });
  83. }
  84. loadData(pageNo = "") {
  85. this.setState({
  86. loading: true,
  87. });
  88. $.ajax({
  89. method: "get",
  90. dataType: "json",
  91. crossDomain: false,
  92. url: globalConfig.context + "/api/admin/statistis/selectTaskList",
  93. data: this.props.searchData
  94. ? Object.assign(
  95. {
  96. pageNo: pageNo || 1,
  97. pageSize: this.state.pagination.pageSize || 10,
  98. },
  99. this.props.searchData
  100. )
  101. : {
  102. pageNo: pageNo || 1,
  103. pageSize: this.state.pagination.pageSize || 10,
  104. startDate:
  105. this.state.releaseDate.length > 0
  106. ? this.state.releaseDate[0]
  107. : undefined, //开始时间
  108. endDate:
  109. this.state.releaseDate.length > 0
  110. ? this.state.releaseDate[1]
  111. : undefined, //结束时间
  112. depId: this.state.depId || undefined, //部门ID
  113. thchDepId: this.state.thchDepId || undefined, //责任部门ID
  114. projectStatus: this.state.projectStatus || undefined, //项目类别
  115. projectType:
  116. typeof this.state.projectType === "number"
  117. ? this.state.projectType
  118. : undefined, //项目分类
  119. orderNo: this.state.searchOrderNo || undefined, //订单编号
  120. contractNo: this.state.searchContractNo || undefined, //合同编号
  121. userName: this.state.searchEnterpriseName || undefined, //企业名称
  122. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  123. projectSituation:
  124. typeof this.state.projectSituation === "number"
  125. ? this.state.projectSituation
  126. : undefined, //项目分类
  127. projectAmount: this.state.projectAmount || undefined, //项目金额
  128. status: this.state.status,
  129. },
  130. success: function (data) {
  131. ShowModal(this);
  132. let theArr = [];
  133. if (!data.data || !data.data.list) {
  134. if (data.error && data.error.length) {
  135. message.warning(data.error[0].message);
  136. }
  137. } else {
  138. for (let i = 0; i < data.data.list.length; i++) {
  139. let thisdata = data.data.list[i];
  140. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  141. theArr.push(thisdata);
  142. }
  143. this.state.pagination.current = data.data.pageNo;
  144. this.state.pagination.total = data.data.totalCount;
  145. if (data.data && data.data.list && !data.data.list.length) {
  146. this.state.pagination.current = 0;
  147. this.state.pagination.total = 0;
  148. }
  149. this.setState({
  150. pagination: this.state.pagination,
  151. page: pageNo,
  152. dataSource: theArr,
  153. });
  154. }
  155. }.bind(this),
  156. }).always(
  157. function () {
  158. this.setState({
  159. loading: false,
  160. });
  161. }.bind(this)
  162. );
  163. }
  164. resetAll() {
  165. this.setState(
  166. {
  167. releaseDate: [],
  168. searchOrderNo: "",
  169. searchContractNo: "",
  170. searchEnterpriseName: "",
  171. declarationBatch: "",
  172. projectSituation: "",
  173. projectAmount: "",
  174. projectType: "",
  175. depId: "",
  176. thchDepId: "",
  177. projectStatus: "",
  178. columns: currency,
  179. status: 0,
  180. },
  181. () => {
  182. this.loadData();
  183. }
  184. );
  185. }
  186. //部门
  187. departmentList() {
  188. $.ajax({
  189. method: "get",
  190. dataType: "json",
  191. crossDomain: false,
  192. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  193. data: {},
  194. success: function (data) {
  195. let thedata = data.data;
  196. let theArr = [];
  197. if (!thedata) {
  198. if (data.error && data.error.length) {
  199. message.warning(data.error[0].message);
  200. }
  201. } else {
  202. thedata.map(function (item, index) {
  203. theArr.push({
  204. key: index,
  205. name: item.name,
  206. id: item.id,
  207. });
  208. });
  209. }
  210. this.setState({
  211. departmentArr: theArr,
  212. });
  213. }.bind(this),
  214. });
  215. }
  216. //项目类别
  217. selectSuperId() {
  218. $.ajax({
  219. method: "get",
  220. dataType: "json",
  221. crossDomain: false,
  222. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  223. data: {
  224. flag: 0,
  225. },
  226. success: function (data) {
  227. let theArr = [];
  228. let thedata = data.data;
  229. if (!thedata) {
  230. if (data.error && data.error.length) {
  231. message.warning(data.error[0].message);
  232. }
  233. }
  234. for (let i = 0; i < data.data.length; i++) {
  235. let theData = data.data[i];
  236. theArr.push(
  237. <Select.Option value={theData.id} key={theData.cname}>
  238. {theData.cname}
  239. </Select.Option>
  240. );
  241. }
  242. this.setState({
  243. contactsOption: theArr,
  244. contactsOptionData: data.data,
  245. });
  246. }.bind(this),
  247. }).always();
  248. }
  249. // 老版导出
  250. exportPending() {
  251. let url = `/api/admin/statistis/exporTaskList?status=${this.state.status}`;
  252. let dep = this.state.departmentArr.filter((e) => e.id === this.state.depId); //订单部门名称
  253. let thchDep = this.state.departmentArr.filter((e) => e.id === this.state.thchDepId); //责任部门名称
  254. let option = this.state.contactsOptionData.filter((e) => e.id === this.state.projectStatus); //项目类别名称
  255. if (dep.length > 0) {
  256. url = url + `&depName=${dep[0].name}`;
  257. }
  258. if (thchDep.length > 0) {
  259. url = url + `&thchDepName=${thchDep[0].name}`;
  260. }
  261. if (option.length > 0) {
  262. url = url + `&projectStatusName=${option[0].cname}`;
  263. }
  264. if (typeof this.state.projectType === "number") {
  265. url =
  266. url +
  267. `&projectTypeName=${this.state.projectType === 0
  268. ? "通用"
  269. : this.state.projectType === 1
  270. ? "专利"
  271. : this.state.projectType === 2
  272. ? "软著"
  273. : this.state.projectType === 3
  274. ? "审计"
  275. : this.state.projectType === 4
  276. ? "双软"
  277. : this.state.projectType === 5
  278. ? "高新"
  279. : ""
  280. }`;
  281. }
  282. let data = {
  283. startDate:
  284. this.state.releaseDate.length > 0
  285. ? this.state.releaseDate[0]
  286. : undefined, //开始时间
  287. endDate:
  288. this.state.releaseDate.length > 0
  289. ? this.state.releaseDate[1]
  290. : undefined, //结束时间
  291. depId: this.state.depId || undefined, //部门ID
  292. thchDepId: this.state.thchDepId || undefined, //责任部门ID
  293. projectStatus: this.state.projectStatus || undefined, //项目类别
  294. projectType:
  295. typeof this.state.projectType === "number"
  296. ? this.state.projectType
  297. : undefined, //项目分类
  298. orderNo: this.state.searchOrderNo || undefined, //订单编号
  299. contractNo: this.state.searchContractNo || undefined, //合同编号
  300. userName: this.state.searchEnterpriseName || undefined, //企业名称
  301. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  302. projectSituation:
  303. typeof this.state.projectSituation === "number"
  304. ? this.state.projectSituation
  305. : undefined, //项目情况
  306. projectAmount: this.state.projectAmount || undefined, //项目金额
  307. };
  308. for (let key in data) {
  309. if (data[key]) {
  310. url = url + `&${key}=${data[key]}`;
  311. }
  312. }
  313. window.location.href = globalConfig.context + url;
  314. }
  315. // 设置默认table(用来默认不显示某列数据 isNoD:true)
  316. defaultcolumns() {
  317. const newArr = [];
  318. this.state.columns.forEach((item) => {
  319. if (item.isNoD) {
  320. return
  321. } else {
  322. newArr.push(item);
  323. }
  324. });
  325. this.setState({
  326. changeList: newArr,
  327. });
  328. }
  329. // 导出excel
  330. exportExec() {
  331. message.config({
  332. duration: 20,
  333. });
  334. let loading = message.loading("下载中...");
  335. this.setState({
  336. exportPendingLoading: true,
  337. });
  338. let data = {
  339. startDate:
  340. this.state.releaseDate.length > 0
  341. ? this.state.releaseDate[0]
  342. : undefined, //开始时间
  343. endDate:
  344. this.state.releaseDate.length > 0
  345. ? this.state.releaseDate[1]
  346. : undefined, //结束时间
  347. depId: this.state.depId || undefined, //部门ID
  348. thchDepId: this.state.thchDepId || undefined, //责任部门ID
  349. projectStatus: this.state.projectStatus || undefined, //项目类别
  350. projectType:
  351. typeof this.state.projectType === "number"
  352. ? this.state.projectType
  353. : undefined, //项目分类
  354. orderNo: this.state.searchOrderNo || undefined, //订单编号
  355. contractNo: this.state.searchContractNo || undefined, //合同编号
  356. userName: this.state.searchEnterpriseName || undefined, //企业名称
  357. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  358. // projectSituation:
  359. // typeof this.state.projectSituation === "number"
  360. // ? this.state.projectSituation
  361. // : undefined, //项目情况
  362. projectAmount: this.state.projectAmount || undefined, //项目金额
  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. // 下载
  387. download(fileName) {
  388. window.location.href =
  389. globalConfig.context + "/open/download?fileName=" + fileName;
  390. }
  391. componentWillMount() {
  392. this.defaultcolumns();
  393. this.loadData();
  394. if (!this.props.introduce) {
  395. this.departmentList();
  396. this.selectSuperId();
  397. }
  398. if (this.props.searchData) {
  399. let e = this.props.searchData.projectType;
  400. this.setState({
  401. columns:
  402. e === 0
  403. ? currency
  404. : e === 1
  405. ? patent
  406. : e === 2
  407. ? softWriting
  408. : e === 3
  409. ? currency
  410. : e === 4
  411. ? doubleSoft
  412. : e === 5
  413. ? highTechColumns
  414. : e === 6
  415. ? currency
  416. : currency,
  417. });
  418. }
  419. }
  420. render() {
  421. return (
  422. <div className="user-content">
  423. {this.props.introduce ? (
  424. this.props.introduce()
  425. ) : (
  426. <div>
  427. <div className="content-title" style={{ marginBottom: 10 }}>
  428. <span style={{ fontWeight: 900, fontSize: 16 }}>
  429. 项目汇总表 (
  430. {this.state.status === 1
  431. ? "高新" : this.state.status === 2
  432. ? "双软" : this.state.status === 3
  433. ? "软著" : this.state.status === 4
  434. ? "专利" : "通用"}
  435. )
  436. </span>
  437. </div>
  438. <Tabs defaultActiveKey="1" className="test">
  439. <TabPane tab="搜索" key="1">
  440. <div
  441. className="user-search"
  442. style={{
  443. marginTop: "10px",
  444. marginLeft: "10px",
  445. marginRight: "10px",
  446. }}
  447. >
  448. <Input
  449. placeholder="订单编号"
  450. style={{
  451. width: 150,
  452. marginRight: "10px",
  453. }}
  454. value={this.state.searchOrderNo}
  455. onChange={(e) => {
  456. this.setState({ searchOrderNo: e.target.value });
  457. }}
  458. />
  459. <Input
  460. placeholder="合同编号"
  461. style={{
  462. width: 150,
  463. marginRight: "10px",
  464. }}
  465. value={this.state.searchContractNo}
  466. onChange={(e) => {
  467. this.setState({ searchContractNo: e.target.value });
  468. }}
  469. />
  470. <Input
  471. placeholder="企业名称"
  472. style={{
  473. width: 150,
  474. marginRight: "10px",
  475. }}
  476. value={this.state.searchEnterpriseName}
  477. onChange={(e) => {
  478. this.setState({ searchEnterpriseName: e.target.value });
  479. }}
  480. />
  481. <span style={{ display: "inline-block" }}>
  482. <span style={{ marginRight: "10px" }}>
  483. 项目类别 :
  484. </span>
  485. <Select
  486. value={this.state.projectStatus || undefined}
  487. placeholder="请选择项目类别"
  488. notFoundContent="未获取到上级品类列表"
  489. style={{
  490. width: 150,
  491. marginRight: "10px",
  492. }}
  493. onChange={(e) => {
  494. let infor = this.state.contactsOptionData.filter(
  495. (v) => v.id === e
  496. );
  497. this.setState(
  498. {
  499. projectStatus: e,
  500. }
  501. // ()=>{
  502. // if(infor[0].cname === '高新' && typeof this.state.projectType !== 'number'){
  503. // this.setState({
  504. // columns: highTechColumns,
  505. // dataSource:[],
  506. // changeList: [],
  507. // status: 1,
  508. // },()=>{
  509. // this.loadData();
  510. // })
  511. // }else if (typeof this.state.projectType !== 'number'){
  512. // this.setState({
  513. // columns: currency,
  514. // dataSource:[],
  515. // changeList: [],
  516. // status: 0,
  517. // },()=>{
  518. // this.loadData();
  519. // })
  520. // }else{
  521. // this.loadData();
  522. // }
  523. // }
  524. );
  525. }}
  526. >
  527. {this.state.contactsOption}
  528. </Select>
  529. </span>
  530. <span style={{ display: "inline-block" }}>
  531. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  532. 项目分类 :
  533. </span>
  534. <Select
  535. value={
  536. typeof this.state.projectType === "number"
  537. ? this.state.projectType
  538. : undefined
  539. }
  540. placeholder="请选择项目分类"
  541. style={{
  542. width: 150,
  543. marginRight: "10px",
  544. }}
  545. onChange={(e) => {
  546. this.setState(
  547. {
  548. columns:
  549. e === 0
  550. ? currency : e === 1
  551. ? patent : e === 2
  552. ? softWriting : e === 3
  553. ? currency : e === 4
  554. ? doubleSoft : e === 5
  555. ? highTechColumns : e === 6
  556. ? currency : currency,
  557. changeList: [],
  558. projectType: e,
  559. status:
  560. e === 4
  561. ? 2
  562. : e === 2
  563. ? 3
  564. : e === 1
  565. ? 4
  566. : e === 5
  567. ? 1
  568. : 0,
  569. dataSource: [],
  570. },
  571. () => {
  572. this.defaultcolumns();
  573. this.loadData();
  574. }
  575. );
  576. }}
  577. >
  578. {/*0通用 1专利 2软著 3审计 4双软 5高新*/}
  579. <Option value={0}>通用</Option>
  580. <Option value={1}>专利</Option>
  581. <Option value={2}>软著</Option>
  582. <Option value={3}>审计</Option>
  583. <Option value={4}>双软</Option>
  584. <Option value={5}>高新</Option>
  585. <Option value={6}>商标</Option>
  586. </Select>
  587. </span>
  588. <span
  589. style={{
  590. display: "inline-block",
  591. marginRight: "10px",
  592. }}
  593. >
  594. <span>订单部门:</span>
  595. <Select
  596. placeholder="请选择部门"
  597. style={{
  598. width: 200,
  599. marginRight: "10px",
  600. marginLeft: "10px",
  601. }}
  602. value={this.state.depId || undefined}
  603. onChange={(e) => {
  604. this.setState({ depId: e });
  605. }}
  606. >
  607. {this.state.departmentArr.map(function (item) {
  608. return (
  609. <Select.Option key={item.id} value={item.id}>
  610. {item.name}
  611. </Select.Option>
  612. );
  613. })}
  614. </Select>
  615. </span>
  616. <span
  617. style={{
  618. display: "inline-block",
  619. marginRight: "10px",
  620. }}
  621. >
  622. <span>负责部门:</span>
  623. <Select
  624. placeholder="请选择部门"
  625. style={{
  626. width: 200,
  627. marginRight: "10px",
  628. marginLeft: "10px",
  629. }}
  630. value={this.state.thchDepId || undefined}
  631. onChange={(e) => {
  632. this.setState({ thchDepId: e });
  633. }}
  634. >
  635. {this.state.departmentArr.map(function (item) {
  636. return (
  637. <Select.Option key={item.id} value={item.id}>
  638. {item.name}
  639. </Select.Option>
  640. );
  641. })}
  642. </Select>
  643. </span>
  644. <span style={{ display: "inline-block" }}>
  645. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  646. 申报批次 :
  647. </span>
  648. <Select
  649. value={this.state.declarationBatch || undefined}
  650. placeholder="请选择批次"
  651. style={{
  652. width: 150,
  653. marginRight: "10px",
  654. }}
  655. onChange={(e) => {
  656. this.setState({
  657. declarationBatch: e,
  658. });
  659. }}
  660. >
  661. <Option value={1}>第一批</Option>
  662. <Option value={2}>第二批</Option>
  663. <Option value={3}>第三批</Option>
  664. <Option value={4}>第四批</Option>
  665. </Select>
  666. </span>
  667. <span style={{ display: "inline-block" }}>
  668. <span style={{ marginRight: "10px" }}>
  669. 项目金额 :
  670. </span>
  671. <Select
  672. value={this.state.projectAmount || undefined}
  673. placeholder="请选择项目金额"
  674. style={{
  675. width: 150,
  676. marginRight: "10px",
  677. }}
  678. onChange={(e) => {
  679. this.setState({
  680. projectAmount: e,
  681. });
  682. }}
  683. >
  684. <Option value={1}>0~0.5万</Option>
  685. <Option value={2}>0.5~1万</Option>
  686. <Option value={3}>1~2万</Option>
  687. <Option value={4}>2~5万</Option>
  688. <Option value={5}>5~10万</Option>
  689. <Option value={6}>10~30万</Option>
  690. <Option value={7}>30~50万</Option>
  691. <Option value={8}>50~80万</Option>
  692. <Option value={9}>80万上</Option>
  693. </Select>
  694. </span>
  695. {/* <span style={{display:"inline-block"}}>*/}
  696. {/* <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>*/}
  697. {/* <Select*/}
  698. {/* value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}*/}
  699. {/* placeholder="请选择项目情况"*/}
  700. {/* style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}*/}
  701. {/* onChange={(e) => {*/}
  702. {/* this.setState({*/}
  703. {/* projectSituation: e,*/}
  704. {/* });*/}
  705. {/* }}*/}
  706. {/* >*/}
  707. {/* <Option value={0}>未开始</Option>*/}
  708. {/* <Option value={1}>进行中</Option>*/}
  709. {/* <Option value={2}>已暂停</Option>*/}
  710. {/* <Option value={3}>已驳回(专利、软著项目编写)</Option>*/}
  711. {/* <Option value={4}>已完成</Option>*/}
  712. {/* <Option value={5}>项目已完成 已退单</Option>*/}
  713. {/* <Option value={6}>项目未完成 已退单</Option>*/}
  714. {/* </Select>*/}
  715. {/*</span>*/}
  716. <span style={{ display: "inline-block" }}>
  717. <span style={{ marginRight: "10px" }}>
  718. 派单时间 :
  719. </span>
  720. <RangePicker
  721. style={{ marginRight: "10px" }}
  722. value={[
  723. this.state.releaseDate[0]
  724. ? moment(this.state.releaseDate[0])
  725. : null,
  726. this.state.releaseDate[1]
  727. ? moment(this.state.releaseDate[1])
  728. : null,
  729. ]}
  730. onChange={(data, dataString) => {
  731. this.setState({ releaseDate: dataString });
  732. }}
  733. />
  734. </span>
  735. <Button
  736. type="primary"
  737. onClick={() => {
  738. this.loadData();
  739. }}
  740. style={{ marginRight: "10px", marginBottom: "10px" }}
  741. >
  742. 搜索
  743. </Button>
  744. <Button
  745. onClick={this.resetAll}
  746. style={{ marginRight: "10px", marginBottom: "10px" }}
  747. >
  748. 重置
  749. </Button>
  750. </div>
  751. </TabPane>
  752. <TabPane tab="更改表格显示数据" key="2">
  753. <div style={{ marginLeft: 10 }}>
  754. <ChooseList
  755. columns={this.state.columns}
  756. changeFn={this.changeList}
  757. changeList={this.state.changeList}
  758. top={55}
  759. margin={11}
  760. />
  761. </div>
  762. </TabPane>
  763. <TabPane tab="导出EXCEL" key="3">
  764. <Button
  765. type="primary"
  766. style={{ margin: "10px" }}
  767. onClick={this.exportExec.bind(this)}
  768. >
  769. 导出excel
  770. </Button>
  771. </TabPane>
  772. </Tabs>
  773. </div>
  774. )}
  775. <div className="patent-table">
  776. <Spin spinning={this.state.loading}>
  777. <Table
  778. bordered
  779. size="middle"
  780. scroll={{
  781. x:
  782. this.state.status === 4 || this.state.status === 3
  783. ? 1800
  784. : 1000,
  785. y: 0,
  786. }}
  787. columns={
  788. (this.state.changeList && this.state.changeList.length != 0)
  789. ? this.state.changeList
  790. : this.state.columns
  791. }
  792. dataSource={this.state.dataSource}
  793. pagination={this.state.pagination}
  794. style={{
  795. cursor: "pointer",
  796. }}
  797. onRowClick={(record) => {
  798. this.setState({
  799. projectdetailsId: record.id,
  800. projectdetailsOrderNo: record.orderNo,
  801. pname: record.pname,
  802. visible: true,
  803. });
  804. }}
  805. />
  806. </Spin>
  807. </div>
  808. {this.state.visible ? (
  809. <ProjectDetails
  810. visible={this.state.visible}
  811. id={this.state.projectdetailsId}
  812. orderNo={this.state.projectdetailsOrderNo}
  813. taskName={this.state.pname}
  814. visitOk={() => {
  815. this.setState({
  816. visible: false,
  817. });
  818. }}
  819. visitCancel={() => {
  820. this.setState({
  821. visible: false,
  822. });
  823. }}
  824. />
  825. ) : null}
  826. </div>
  827. );
  828. }
  829. }
  830. export default HighTech;