highTech.jsx 29 KB

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