highTech.jsx 33 KB

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