highTech.jsx 31 KB

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