highTech.jsx 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928
  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. // 暂停项目 颜色
  416. suspendColor(record) {
  417. if (record.projectStatus == 29) {
  418. return 'light'
  419. } else {
  420. return 'dark'
  421. }
  422. }
  423. render() {
  424. const dataSources = this.state.customerArr || [];
  425. const options = dataSources.map((group) => (
  426. <Select.Option key={group.id} value={group.name}>
  427. {group.name}
  428. </Select.Option>
  429. ));
  430. return (
  431. <div className="user-content">
  432. {this.props.introduce ? (
  433. this.props.introduce()
  434. ) : (
  435. <div>
  436. <div className="content-title" style={{ marginBottom: 10 }}>
  437. <span style={{ fontWeight: 900, fontSize: 16 }}>
  438. 项目汇总表 (
  439. {this.state.status === 1
  440. ? "高新" : this.state.status === 2
  441. ? "双软" : this.state.status === 3
  442. ? "软著" : this.state.status === 4
  443. ? "专利" : this.state.status === 5
  444. ? "会员" : this.state.status === 6
  445. ? "审计" : "通用"}
  446. )
  447. </span>
  448. </div>
  449. <Tabs defaultActiveKey="1" className="test"
  450. onChange={e => {
  451. this.setState({
  452. tbaindex: e
  453. })
  454. }}
  455. >
  456. <TabPane tab="搜索" key="1">
  457. <div
  458. className="user-search"
  459. style={{
  460. marginTop: "10px",
  461. marginLeft: "10px",
  462. marginRight: "10px",
  463. }}
  464. >
  465. <Input
  466. placeholder="订单编号"
  467. style={{
  468. width: 220,
  469. marginRight: "10px",
  470. }}
  471. value={this.state.searchOrderNo}
  472. onChange={(e) => {
  473. this.setState({ searchOrderNo: e.target.value });
  474. }}
  475. />
  476. <Input
  477. placeholder="合同编号"
  478. style={{
  479. width: 220,
  480. marginRight: "10px",
  481. }}
  482. value={this.state.searchContractNo}
  483. onChange={(e) => {
  484. this.setState({ searchContractNo: e.target.value });
  485. }}
  486. />
  487. <Input
  488. placeholder="企业名称"
  489. style={{
  490. width: 220,
  491. marginRight: "10px",
  492. }}
  493. value={this.state.searchEnterpriseName}
  494. onChange={(e) => {
  495. this.setState({ searchEnterpriseName: e.target.value });
  496. }}
  497. />
  498. <span style={{ display: "inline-block" }}>
  499. <span style={{ marginRight: "10px" }}>项目分类:</span>
  500. <Cascader
  501. options={this.state.contactsOptionData}
  502. value={this.state.newArray}
  503. placeholder="请选择"
  504. style={{ width: 150, marginRight: 10 }}
  505. onChange={(e, pre) => {
  506. let first = e[0];
  507. let two = e[1];
  508. this.setState({
  509. newArray: e,
  510. projectStatus: first,
  511. projectType: two,
  512. changeList: undefined,
  513. dataSource: [],
  514. status:
  515. two == "4"
  516. ? 2 : two == "3"
  517. ? 6 : two == "2"
  518. ? 3 : two == "1"
  519. ? 4 : two == "5"
  520. ? 1 : two == "7"
  521. ? 5 : 0,
  522. columns:
  523. two == "0"
  524. ? currency : two == "1"
  525. ? patent : two == "2"
  526. ? softWriting : two == "3"
  527. ? audit : two == "4"
  528. ? doubleSoft : two == "5"
  529. ? highTechColumns : two == "6"
  530. ? currency : two == "7"
  531. ? member : currency,
  532. }, () => {
  533. this.defaultcolumns()
  534. })
  535. }}
  536. />
  537. </span>
  538. {/* <span style={{ display: "inline-block" }}>
  539. <span style={{ marginRight: "10px" }}>
  540. 项目类别 :
  541. </span>
  542. <Select
  543. value={this.state.projectStatus || undefined}
  544. placeholder="请选择项目类别"
  545. notFoundContent="未获取到上级品类列表"
  546. style={{
  547. width: 150,
  548. marginRight: "10px",
  549. }}
  550. onChange={(e) => {
  551. let infor = this.state.contactsOptionData.filter(
  552. (v) => v.id === e
  553. );
  554. this.setState(
  555. {
  556. projectStatus: e,
  557. },
  558. // () => {
  559. // if (infor[0].cname === '高新会员服务' && typeof this.state.projectType !== 'number') {
  560. // this.setState({
  561. // columns: highTechColumns,
  562. // dataSource: [],
  563. // changeList: [],
  564. // status: 1,
  565. // }, () => {
  566. // this.loadData();
  567. // })
  568. // } else if (typeof this.state.projectType !== 'number') {
  569. // this.setState({
  570. // columns: currency,
  571. // dataSource: [],
  572. // changeList: [],
  573. // status: 0,
  574. // }, () => {
  575. // this.loadData();
  576. // })
  577. // } else {
  578. // this.loadData();
  579. // }
  580. // }
  581. );
  582. }}
  583. >
  584. {this.state.contactsOption}
  585. </Select>
  586. </span>
  587. <span style={{ display: "inline-block" }}>
  588. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  589. 项目分类 :
  590. </span>
  591. <Select
  592. value={
  593. typeof this.state.projectType === "number"
  594. ? this.state.projectType
  595. : undefined
  596. }
  597. placeholder="请选择项目分类"
  598. style={{
  599. width: 150,
  600. marginRight: "10px",
  601. }}
  602. onChange={(e) => {
  603. this.setState(
  604. {
  605. columns:
  606. e === 0
  607. ? currency : e === 1
  608. ? patent : e === 2
  609. ? softWriting : e === 3
  610. ? currency : e === 4
  611. ? doubleSoft : e === 5
  612. ? highTechColumns : e === 6
  613. ? currency : currency,
  614. changeList: [],
  615. projectType: e,
  616. status:
  617. e === 4
  618. ? 2 : e === 2
  619. ? 3 : e === 1
  620. ? 4 : e === 5
  621. ? 1 : 0,
  622. dataSource: [],
  623. },
  624. () => {
  625. this.defaultcolumns();
  626. this.loadData();
  627. }
  628. );
  629. }}
  630. >
  631. <Option value={0}>通用</Option>
  632. <Option value={1}>专利</Option>
  633. <Option value={2}>软著</Option>
  634. <Option value={3}>审计</Option>
  635. <Option value={4}>双软</Option>
  636. <Option value={5}>高新</Option>
  637. <Option value={6}>商标</Option>
  638. <Option value={7}>会员</Option>
  639. </Select>
  640. </span> */}
  641. <span
  642. style={{
  643. display: "inline-block",
  644. marginRight: "10px",
  645. }}
  646. >
  647. <span style={{ marginRight: "10px", marginBottom: "10px" }}>订单部门:</span>
  648. <Cascaders
  649. ref={ref => this.Cascaders1 = ref}
  650. placeholder="请选择订单部门"
  651. height={28}
  652. width={150}
  653. onSel={(e) => {
  654. this.setState({
  655. deps: JSON.stringify(e)
  656. })
  657. }}
  658. />
  659. </span>
  660. <span
  661. style={{
  662. display: "inline-block",
  663. marginRight: "10px",
  664. }}
  665. >
  666. <span style={{ marginRight: "10px", marginBottom: "10px" }}>负责部门:</span>
  667. <Cascaders
  668. ref={ref => this.Cascaders2 = ref}
  669. placeholder="请选择负责部门"
  670. height={28}
  671. width={150}
  672. onSel={(e) => {
  673. this.setState({
  674. thchDeps: JSON.stringify(e)
  675. })
  676. }}
  677. />
  678. </span>
  679. <span style={{ display: "inline-block" }}>
  680. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  681. 咨询师/经理:
  682. </span>
  683. <AutoComplete
  684. className="certain-category-search"
  685. dropdownClassName="certain-category-search-dropdown"
  686. dropdownMatchSelectWidth={false}
  687. style={{ width: "120px" }}
  688. dataSource={options}
  689. placeholder='请输入姓名'
  690. value={this.state.auto}
  691. onChange={this.httpChange}
  692. filterOption={true}
  693. onBlur={this.blurChange}
  694. onSelect={this.selectAuto}
  695. >
  696. <Input />
  697. </AutoComplete>
  698. </span>
  699. <span style={{ display: "inline-block" }}>
  700. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  701. 申报批次:
  702. </span>
  703. <Select
  704. value={this.state.declarationBatch || undefined}
  705. placeholder="请选择批次"
  706. style={{
  707. width: 150,
  708. marginRight: "10px",
  709. }}
  710. onChange={(e) => {
  711. this.setState({
  712. declarationBatch: e,
  713. });
  714. }}
  715. >
  716. <Option value={1}>第一批</Option>
  717. <Option value={2}>第二批</Option>
  718. <Option value={3}>第三批</Option>
  719. <Option value={4}>第四批</Option>
  720. </Select>
  721. </span>
  722. <span style={{ display: "inline-block" }}>
  723. <span style={{ marginRight: "10px" }}>
  724. 项目金额:
  725. </span>
  726. <Select
  727. value={this.state.projectAmount || undefined}
  728. placeholder="请选择项目金额"
  729. style={{
  730. width: 150,
  731. marginRight: "10px",
  732. }}
  733. onChange={(e) => {
  734. this.setState({
  735. projectAmount: e,
  736. });
  737. }}
  738. >
  739. <Option value={1}>0~0.5万</Option>
  740. <Option value={2}>0.5~1万</Option>
  741. <Option value={3}>1~2万</Option>
  742. <Option value={4}>2~5万</Option>
  743. <Option value={5}>5~10万</Option>
  744. <Option value={6}>10~30万</Option>
  745. <Option value={7}>30~50万</Option>
  746. <Option value={8}>50~80万</Option>
  747. <Option value={9}>80万上</Option>
  748. </Select>
  749. </span>
  750. <span style={{ display: "inline-block" }}>
  751. <span style={{ marginRight: "10px" }}>
  752. 项目状态:
  753. </span>
  754. <Select
  755. value={this.state.taskProjectStatus || undefined}
  756. placeholder="请选择项目状态"
  757. style={{
  758. width: 150,
  759. marginRight: "10px",
  760. }}
  761. onChange={(e) => {
  762. this.setState({
  763. taskProjectStatus: e,
  764. });
  765. }}
  766. >
  767. {
  768. projectStatusList.map((item) =>
  769. <Option value={item.value} key={item.value}>{item.label}</Option>
  770. )
  771. }
  772. </Select>
  773. </span>
  774. {/* <span style={{display:"inline-block"}}>*/}
  775. {/* <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>*/}
  776. {/* <Select*/}
  777. {/* value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}*/}
  778. {/* placeholder="请选择项目情况"*/}
  779. {/* style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}*/}
  780. {/* onChange={(e) => {*/}
  781. {/* this.setState({*/}
  782. {/* projectSituation: e,*/}
  783. {/* });*/}
  784. {/* }}*/}
  785. {/* >*/}
  786. {/* <Option value={0}>未开始</Option>*/}
  787. {/* <Option value={1}>进行中</Option>*/}
  788. {/* <Option value={2}>已暂停</Option>*/}
  789. {/* <Option value={3}>已驳回(专利、软著项目编写)</Option>*/}
  790. {/* <Option value={4}>已完成</Option>*/}
  791. {/* <Option value={5}>项目已完成 已退单</Option>*/}
  792. {/* <Option value={6}>项目未完成 已退单</Option>*/}
  793. {/* </Select>*/}
  794. {/*</span>*/}
  795. <span style={{ display: "inline-block" }}>
  796. <span style={{ marginRight: "10px" }}>
  797. 派单时间:
  798. </span>
  799. <RangePicker
  800. allowClear={false}
  801. style={{ marginRight: "10px" }}
  802. value={[
  803. this.state.releaseDate[0]
  804. ? moment(this.state.releaseDate[0])
  805. : null,
  806. this.state.releaseDate[1]
  807. ? moment(this.state.releaseDate[1])
  808. : null,
  809. ]}
  810. onChange={(data, dataString) => {
  811. this.setState({ releaseDate: dataString });
  812. }}
  813. />
  814. </span>
  815. <Button
  816. type="primary"
  817. onClick={() => {
  818. this.loadData();
  819. }}
  820. style={{ marginRight: "10px", marginBottom: "10px" }}
  821. >
  822. 搜索
  823. </Button>
  824. <Button
  825. onClick={this.resetAll}
  826. style={{ marginRight: "10px", marginBottom: "10px" }}
  827. >
  828. 重置
  829. </Button>
  830. </div>
  831. </TabPane>
  832. <TabPane tab="更改表格显示数据" key="2">
  833. {
  834. this.state.tbaindex == 2 &&
  835. <div style={{ marginLeft: 10 }}>
  836. <ChooseList
  837. columns={this.state.columns}
  838. changeFn={this.changeList}
  839. changeList={this.state.changeList}
  840. top={55}
  841. margin={11}
  842. />
  843. </div>
  844. }
  845. </TabPane>
  846. <TabPane tab="导出EXCEL" key="3">
  847. <Button
  848. type="primary"
  849. style={{ margin: "10px" }}
  850. onClick={this.exportExec.bind(this)}
  851. >
  852. 导出excel
  853. </Button>
  854. </TabPane>
  855. </Tabs>
  856. </div>
  857. )}
  858. <div className="patent-table">
  859. <Spin spinning={this.state.loading}>
  860. <Table
  861. bordered
  862. size="middle"
  863. scroll={{
  864. x:
  865. this.state.status === 4 || this.state.status === 3
  866. ? 1800
  867. : 1000,
  868. y: 0,
  869. }}
  870. columns={
  871. (this.state.changeList && this.state.changeList.length != 0)
  872. ? this.state.changeList
  873. : this.state.columns
  874. }
  875. dataSource={this.state.dataSource}
  876. pagination={this.state.pagination}
  877. style={{
  878. cursor: "pointer",
  879. }}
  880. rowClassName={this.suspendColor}
  881. onRowClick={(record) => {
  882. this.setState({
  883. projectdetailsId: record.id,
  884. projectdetailsOrderNo: record.orderNo,
  885. pname: record.pname,
  886. visible: true,
  887. });
  888. }}
  889. />
  890. </Spin>
  891. </div>
  892. {this.state.visible ? (
  893. <ProjectDetails
  894. visible={this.state.visible}
  895. id={this.state.projectdetailsId}
  896. orderNo={this.state.projectdetailsOrderNo}
  897. taskName={this.state.pname}
  898. visitOk={() => {
  899. this.setState({
  900. visible: false,
  901. });
  902. }}
  903. visitCancel={() => {
  904. this.setState({
  905. visible: false,
  906. });
  907. }}
  908. />
  909. ) : null}
  910. </div>
  911. );
  912. }
  913. }
  914. export default HighTech;