highTech.jsx 31 KB

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