enterpriseProjectQuery.jsx 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. import React, { Component } from 'react';
  2. import { Button, DatePicker, AutoComplete, Input, message, Select, Spin, Table, Tabs } from "antd";
  3. import { ChooseList } from "../../order/orderNew/chooseList";
  4. import $ from "jquery/src/ajax";
  5. import {
  6. ShowModal,
  7. getProjectName,
  8. download,
  9. getApprovedType,
  10. } from "@/tools";
  11. import moment from "moment";
  12. import ProjectDetails from "../summary/projectDetails";
  13. import { approvalOptions } from "@/dataDic.js";
  14. const { TabPane } = Tabs;
  15. const { RangePicker } = DatePicker;
  16. const { Option } = Select;
  17. class EnterpriseProjectQuery extends Component {
  18. constructor(props) {
  19. super(props);
  20. this.state = {
  21. approvaType: [],
  22. visible: false,
  23. dataSource: [],
  24. departmentArr: [],
  25. page: 1,
  26. pagination: {
  27. defaultCurrent: 1,
  28. defaultPageSize: 10,
  29. showQuickJumper: true,
  30. pageSize: 10,
  31. onChange: function (page) {
  32. this.loadData(page);
  33. }.bind(this),
  34. showTotal: function (total) {
  35. return "共" + total + "条数据";
  36. },
  37. },
  38. columns: [
  39. {
  40. title: "序号",
  41. dataIndex: "id",
  42. key: "id",
  43. },
  44. {
  45. title: "派单时间",
  46. dataIndex: "taskDistributionTime",
  47. key: "taskDistributionTime",
  48. },
  49. {
  50. title: "派单省份",
  51. dataIndex: "provinceName",
  52. key: "provinceName",
  53. },
  54. {
  55. title: '订单部门',
  56. dataIndex: 'depName',
  57. key: 'depName',
  58. },
  59. {
  60. title: "营销员",
  61. dataIndex: "salesmanName",
  62. key: "salesmanName",
  63. },
  64. {
  65. title: "特批类型",
  66. dataIndex: "type",
  67. key: "type",
  68. width: 110,
  69. render: (text, record) => {
  70. return (
  71. <span>
  72. {getApprovedType(text ? text.split(",").map(Number) : [], record.typeExplain)}
  73. </span>
  74. );
  75. },
  76. },
  77. {
  78. title: "合同编号",
  79. dataIndex: "contractNo",
  80. key: "contractNo",
  81. },
  82. {
  83. title: "订单编号",
  84. dataIndex: "orderNo",
  85. key: "orderNo",
  86. },
  87. {
  88. title: "签单客户",
  89. dataIndex: "userName",
  90. key: "userName",
  91. },
  92. {
  93. title: "项目类型",
  94. dataIndex: "cname",
  95. key: "cname",
  96. },
  97. {
  98. title: "项目名称",
  99. dataIndex: "commodityName",
  100. key: "commodityName",
  101. },
  102. {
  103. title: "数量",
  104. dataIndex: "commodityQuantity",
  105. key: "commodityQuantity",
  106. },
  107. {
  108. title: "负责部门",
  109. dataIndex: "techDepName",
  110. key: "techDepName",
  111. },
  112. {
  113. title: "咨询师/咨询经理",
  114. dataIndex: "techName",
  115. key: "techName",
  116. },
  117. {
  118. title: "项目状态",
  119. dataIndex: "projectStatus",
  120. key: "projectStatus",
  121. render: (value) => (
  122. getProjectName(parseInt(value))
  123. )
  124. },
  125. {
  126. title: "项目金额",
  127. dataIndex: "commodityPrice",
  128. key: "commodityPrice",
  129. },
  130. {
  131. title: "特别说明",
  132. dataIndex: "specialComment",
  133. key: "specialComment",
  134. },
  135. ],
  136. releaseDate: [],
  137. searchOrderNo: '',
  138. searchContractNo: '',
  139. searchEnterpriseName: '',
  140. declarationBatch: '',
  141. projectSituation: '',
  142. projectAmount: '',
  143. depId: '',
  144. thchDepId: '',
  145. projectType: '',
  146. projectStatus: '',
  147. contactsOption: [],
  148. contactsOptionData: [],
  149. }
  150. this.changeList = this.changeList.bind(this);
  151. this.resetAll = this.resetAll.bind(this);
  152. this.exportPending = this.exportPending.bind(this);
  153. this.supervisor = this.supervisor.bind(this);
  154. this.httpChange = this.httpChange.bind(this);
  155. this.selectAuto = this.selectAuto.bind(this);
  156. this.blurChange = this.blurChange.bind(this);
  157. }
  158. changeList(arr) {
  159. const newArr = [];
  160. this.state.columns.forEach(item => {
  161. arr.forEach(val => {
  162. if (val === item.title) {
  163. newArr.push(item);
  164. }
  165. });
  166. });
  167. this.setState({
  168. changeList: newArr
  169. });
  170. }
  171. loadData(pageNo) {
  172. this.setState({
  173. loading: true,
  174. });
  175. $.ajax({
  176. method: "get",
  177. dataType: "json",
  178. crossDomain: false,
  179. url: globalConfig.context + "/api/admin/orderProject/managerSelect",
  180. data: {
  181. pageNo: pageNo || 1,
  182. pageSize: this.state.pagination.pageSize || 10,
  183. startTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[0] : undefined, //开始时间
  184. endTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[1] : undefined, //结束时间
  185. depId: this.state.depId || undefined,//部门ID
  186. techDepId: this.state.thchDepId || undefined,//责任部门ID
  187. cid: this.state.projectStatus || undefined,//项目类别
  188. projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
  189. orderNo: this.state.searchOrderNo || undefined,//订单编号
  190. contractNo: this.state.searchContractNo || undefined,//合同编号
  191. name: this.state.searchEnterpriseName || undefined,//企业名称
  192. declarationBatch: this.state.declarationBatch || undefined,//申报批次
  193. // projectSituation: typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined,//项目分类
  194. commodityPrice: this.state.projectAmount || undefined,//项目金额
  195. thchId: this.state.thchId || undefined, //咨询师/咨询经理id
  196. type: this.state.approvaType.length > 0 ? this.state.approvaType.toString() : undefined, //特批类型
  197. },
  198. success: function (data) {
  199. ShowModal(this);
  200. let theArr = [];
  201. if (!data.data || !data.data.list) {
  202. if (data.error && data.error.length) {
  203. message.warning(data.error[0].message);
  204. }
  205. } else {
  206. for (let i = 0; i < data.data.list.length; i++) {
  207. let thisdata = data.data.list[i];
  208. theArr.push(thisdata);
  209. }
  210. this.state.pagination.current = data.data.pageNo;
  211. this.state.pagination.total = data.data.totalCount;
  212. if (data.data && data.data.list && !data.data.list.length) {
  213. this.state.pagination.current = 0;
  214. this.state.pagination.total = 0;
  215. }
  216. this.setState({
  217. dataSource: theArr,
  218. page: data.data.pageNo,
  219. pagination: this.state.pagination,
  220. });
  221. }
  222. }.bind(this),
  223. }).always(
  224. function () {
  225. this.setState({
  226. loading: false,
  227. });
  228. }.bind(this)
  229. );
  230. }
  231. //部门
  232. departmentList() {
  233. this.setState({
  234. departmentListloading: true,
  235. });
  236. $.ajax({
  237. method: "get",
  238. dataType: "json",
  239. crossDomain: false,
  240. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  241. data: {},
  242. success: function (data) {
  243. let thedata = data.data;
  244. let theArr = [];
  245. if (!thedata) {
  246. if (data.error && data.error.length) {
  247. message.warning(data.error[0].message);
  248. }
  249. thedata = {};
  250. } else {
  251. thedata.map(function (item, index) {
  252. theArr.push({
  253. key: index,
  254. name: item.name,
  255. id: item.id,
  256. });
  257. });
  258. }
  259. this.setState({
  260. departmentArr: theArr,
  261. });
  262. }.bind(this),
  263. }).always(
  264. function () {
  265. this.setState({
  266. departmentListloading: false,
  267. });
  268. }.bind(this)
  269. );
  270. }
  271. resetAll() {
  272. this.setState({
  273. approvaType: [],
  274. releaseDate: [],
  275. searchOrderNo: '',
  276. searchContractNo: '',
  277. searchEnterpriseName: '',
  278. declarationBatch: '',
  279. projectSituation: '',
  280. projectAmount: '',
  281. projectType: '',
  282. depId: '',
  283. thchDepId: '',
  284. projectStatus: '',
  285. thchId: "",
  286. auto: ""
  287. }, () => {
  288. this.loadData();
  289. })
  290. }
  291. //项目类别
  292. selectSuperId() {
  293. $.ajax({
  294. method: "get",
  295. dataType: "json",
  296. crossDomain: false,
  297. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  298. data: {
  299. flag: 0
  300. },
  301. success: function (data) {
  302. let theArr = [];
  303. let thedata = data.data;
  304. if (!thedata) {
  305. if (data.error && data.error.length) {
  306. message.warning(data.error[0].message);
  307. }
  308. }
  309. for (let i = 0; i < data.data.length; i++) {
  310. let theData = data.data[i];
  311. theArr.push(
  312. <Select.Option value={theData.id} key={theData.cname}>
  313. {theData.cname}
  314. </Select.Option>
  315. );
  316. }
  317. this.setState({
  318. contactsOption: theArr,
  319. contactsOptionData: data.data,
  320. });
  321. }.bind(this)
  322. }).always(
  323. );
  324. }
  325. exportPending() {
  326. $.ajax({
  327. method: "get",
  328. dataType: "json",
  329. crossDomain: false,
  330. url: globalConfig.context + "/api/admin/orderProject/exportManagerSelect",
  331. data: {
  332. pageNo: 1,
  333. pageSize: 99999,
  334. startTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[0] : undefined, //开始时间
  335. endTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[1] : undefined, //结束时间
  336. depId: this.state.depId || undefined,//部门ID
  337. techDepId: this.state.thchDepId || undefined,//责任部门ID
  338. cid: this.state.projectStatus || undefined,//项目类别
  339. projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
  340. orderNo: this.state.searchOrderNo || undefined,//订单编号
  341. contractNo: this.state.searchContractNo || undefined,//合同编号
  342. name: this.state.searchEnterpriseName || undefined,//企业名称
  343. declarationBatch: this.state.declarationBatch || undefined,//申报批次
  344. commodityPrice: this.state.projectAmount || undefined,//项目金额
  345. thchId: this.state.thchId || undefined, //咨询师/咨询经理id
  346. type: this.state.approvaType.length > 0 ? this.state.approvaType.toString() : undefined, //特批类型
  347. },
  348. success: function (data) {
  349. ShowModal(this);
  350. if (data.error && data.error.length) {
  351. message.warning(data.error[0].message);
  352. } else {
  353. download(data.data, true);
  354. }
  355. }.bind(this),
  356. }).always(
  357. function () {
  358. this.setState({
  359. loading: false,
  360. });
  361. }.bind(this)
  362. );
  363. }
  364. // 查询用户
  365. supervisor(e) {
  366. $.ajax({
  367. method: "get",
  368. dataType: "json",
  369. crossDomain: false,
  370. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  371. data: {
  372. adminName: e,
  373. },
  374. success: function (data) {
  375. let thedata = data.data;
  376. if (!thedata) {
  377. if (data.error && data.error.length) {
  378. message.warning(data.error[0].message);
  379. }
  380. thedata = {};
  381. }
  382. this.setState({
  383. customerArr: thedata,
  384. });
  385. }.bind(this),
  386. }).always(
  387. function () {
  388. }.bind(this)
  389. );
  390. }
  391. // 输入触发
  392. httpChange(e) {
  393. if (e.length >= 1) {
  394. this.supervisor(e);
  395. }
  396. this.setState({
  397. auto: e,
  398. });
  399. }
  400. // 选中
  401. selectAuto(value, options) {
  402. let thchId = ""
  403. let contactLists = this.state.customerArr || [];
  404. if (value) {
  405. contactLists.map(function (item) {
  406. if (item.name == value.toString()) {
  407. thchId = item.id;
  408. }
  409. });
  410. }
  411. this.setState({
  412. auto: value,
  413. thchId: thchId,
  414. });
  415. }
  416. // 失去焦点
  417. blurChange(e) {
  418. let thchId = ""
  419. let contactLists = this.state.customerArr || [];
  420. if (e) {
  421. contactLists.map(function (item) {
  422. if (item.name == e.toString()) {
  423. thchId = item.id;
  424. }
  425. });
  426. }
  427. this.setState({
  428. thchId: thchId,
  429. });
  430. }
  431. componentDidMount() {
  432. this.departmentList();
  433. this.selectSuperId();
  434. this.loadData();
  435. }
  436. // 暂停项目 颜色
  437. suspendColor(record) {
  438. if (record.projectStatus == 29) {
  439. return 'light'
  440. } else {
  441. return 'dark'
  442. }
  443. }
  444. render() {
  445. const dataSources = this.state.customerArr || [];
  446. const options = dataSources.map((group) => (
  447. <Select.Option key={group.id} value={group.name}>
  448. {group.name}
  449. </Select.Option>
  450. ));
  451. const approvaChildren = approvalOptions.map(i => (
  452. <Option key={i.value}>{i.label}</Option>
  453. ));
  454. return (
  455. <div className="user-content">
  456. <div className="content-title">
  457. <span style={{ fontWeight: 900, fontSize: 16 }}>企业项目派单查询</span>
  458. </div>
  459. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  460. <TabPane tab="搜索" key="1">
  461. <div className="user-search" style={{
  462. marginTop: '10px',
  463. marginLeft: '10px',
  464. marginRight: '10px'
  465. }}>
  466. <Input
  467. placeholder="订单编号"
  468. style={{ width: 200, marginRight: '10px', marginBottom: '10px' }}
  469. value={this.state.searchOrderNo}
  470. onChange={e => {
  471. this.setState({ searchOrderNo: e.target.value });
  472. }}
  473. />
  474. <Input
  475. placeholder="合同编号"
  476. style={{ width: 200, marginRight: '10px', marginBottom: '10px' }}
  477. value={this.state.searchContractNo}
  478. onChange={e => {
  479. this.setState({ searchContractNo: e.target.value });
  480. }}
  481. />
  482. <Input
  483. placeholder="企业名称"
  484. style={{ width: 200, marginRight: '10px', marginBottom: '10px' }}
  485. value={this.state.searchEnterpriseName}
  486. onChange={e => {
  487. this.setState({ searchEnterpriseName: e.target.value });
  488. }}
  489. />
  490. <span style={{ display: "inline-block", marginRight: '10px', marginBottom: '10px' }}>
  491. <Spin spinning={this.state.departmentListloading}>
  492. <span>订单部门:</span>
  493. <Select
  494. placeholder="请选择部门"
  495. style={{ width: 200, marginRight: '10px', marginLeft: '10px', marginBottom: '10px' }}
  496. value={this.state.depId || undefined}
  497. onChange={e => {
  498. this.setState({ depId: e });
  499. }}
  500. >
  501. {
  502. this.state.departmentArr.map(function (item) {
  503. return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
  504. })
  505. }
  506. </Select>
  507. </Spin>
  508. </span>
  509. <span style={{ display: "inline-block", marginRight: '10px', marginBottom: '10px' }}>
  510. <span>负责部门:</span>
  511. <Select
  512. placeholder="请选择部门"
  513. style={{ width: 200, marginRight: '10px', marginLeft: '10px', marginBottom: '10px' }}
  514. value={this.state.thchDepId || undefined}
  515. onChange={e => {
  516. this.setState({ thchDepId: e });
  517. }}
  518. >
  519. {
  520. this.state.departmentArr.map(function (item) {
  521. return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
  522. })
  523. }
  524. </Select>
  525. </span>
  526. <span style={{ display: "inline-block", marginRight: '10px', marginBottom: '10px' }}>
  527. <span>咨询师/经理:</span>
  528. <AutoComplete
  529. className="certain-category-search"
  530. dropdownClassName="certain-category-search-dropdown"
  531. dropdownMatchSelectWidth={false}
  532. style={{ width: "200px", marginLeft: '10px' }}
  533. dataSource={options}
  534. placeholder='请输入姓名'
  535. value={this.state.auto}
  536. onChange={this.httpChange}
  537. filterOption={true}
  538. onBlur={this.blurChange}
  539. onSelect={this.selectAuto}
  540. >
  541. <Input />
  542. </AutoComplete>
  543. </span>
  544. <span style={{ display: "inline-block" }}>
  545. <span style={{ marginRight: '10px', marginBottom: '10px' }}>项目类别 :</span>
  546. <Select
  547. value={this.state.projectStatus || undefined}
  548. placeholder="请选择项目类别"
  549. notFoundContent="未获取到上级品类列表"
  550. style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
  551. onChange={(e) => {
  552. let infor = this.state.contactsOptionData.filter((v) => v.id === e);
  553. this.setState({
  554. projectStatus: e,
  555. })
  556. }}
  557. >
  558. {this.state.contactsOption}
  559. </Select>
  560. </span>
  561. <span style={{ display: "inline-block" }}>
  562. <span style={{ marginRight: '10px', marginBottom: '10px' }}>项目分类 :</span>
  563. <Select
  564. value={typeof this.state.projectType === 'number' ? this.state.projectType : undefined}
  565. placeholder="请选择项目分类"
  566. style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
  567. onChange={(e) => {
  568. this.setState({
  569. projectType: e,
  570. })
  571. }}
  572. >
  573. {/*0通用 1专利 2软著 3审计 4双软 5高新*/}
  574. <Option value={0}>通用</Option>
  575. <Option value={1}>专利</Option>
  576. <Option value={2}>软著</Option>
  577. <Option value={3}>审计</Option>
  578. <Option value={4}>双软</Option>
  579. <Option value={5}>高新</Option>
  580. <Option value={6}>商标</Option>
  581. <Option value={7}>会员</Option>
  582. </Select>
  583. </span>
  584. <span style={{ display: "inline-block" }}>
  585. <span style={{ marginRight: '10px', marginBottom: '10px' }}>申报批次 :</span>
  586. <Select
  587. value={this.state.declarationBatch || undefined}
  588. placeholder="请选择批次"
  589. style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
  590. onChange={(e) => {
  591. this.setState({
  592. declarationBatch: e,
  593. });
  594. }}
  595. >
  596. <Option value={1}>第一批</Option>
  597. <Option value={2}>第二批</Option>
  598. <Option value={3}>第三批</Option>
  599. <Option value={4}>第四批</Option>
  600. </Select>
  601. </span>
  602. <span style={{ display: "inline-block" }}>
  603. <span style={{ marginRight: '10px', marginBottom: '10px' }}>项目金额 :</span>
  604. <Select
  605. value={this.state.projectAmount || undefined}
  606. placeholder="请选择项目金额"
  607. style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
  608. onChange={(e) => {
  609. this.setState({
  610. projectAmount: e,
  611. });
  612. }}
  613. >
  614. <Option value={1}>0~0.5万</Option>
  615. <Option value={2}>0.5~1万</Option>
  616. <Option value={3}>1~2万</Option>
  617. <Option value={4}>2~5万</Option>
  618. <Option value={5}>5~10万</Option>
  619. <Option value={6}>10~30万</Option>
  620. <Option value={7}>30~50万</Option>
  621. <Option value={8}>50~80万</Option>
  622. <Option value={9}>80万上</Option>
  623. </Select>
  624. </span>
  625. {/*<span style={{display:"inline-block"}}>*/}
  626. {/* <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>*/}
  627. {/* <Select*/}
  628. {/* value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}*/}
  629. {/* placeholder="请选择项目情况"*/}
  630. {/* style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}*/}
  631. {/* onChange={(e) => {*/}
  632. {/* this.setState({*/}
  633. {/* projectSituation: e,*/}
  634. {/* });*/}
  635. {/* }}*/}
  636. {/* >*/}
  637. {/* <Option value={0}>未开始</Option>*/}
  638. {/* <Option value={1}>进行中</Option>*/}
  639. {/* <Option value={2}>已暂停</Option>*/}
  640. {/* <Option value={3}>已驳回(专利、软著项目编写)</Option>*/}
  641. {/* <Option value={4}>已完成</Option>*/}
  642. {/* <Option value={5}>项目已完成 已退单</Option>*/}
  643. {/* <Option value={6}>项目未完成 已退单</Option>*/}
  644. {/* </Select>*/}
  645. {/*</span>*/}
  646. <span style={{ display: "inline-block" }}>
  647. <span style={{ marginRight: '10px', marginBottom: '10px' }}>派单时间 :</span>
  648. <RangePicker
  649. style={{ marginRight: '10px', marginBottom: '10px', width: 250 }}
  650. value={[
  651. this.state.releaseDate[0]
  652. ? moment(this.state.releaseDate[0])
  653. : null,
  654. this.state.releaseDate[1]
  655. ? moment(this.state.releaseDate[1])
  656. : null,
  657. ]}
  658. onChange={(data, dataString) => {
  659. this.setState({ releaseDate: dataString });
  660. }}
  661. />
  662. </span>
  663. <Select
  664. mode="multiple"
  665. style={{ width: 200 }}
  666. placeholder="特批类型"
  667. value={this.state.approvaType}
  668. onChange={e => {
  669. this.setState({
  670. approvaType: e
  671. })
  672. }}
  673. >
  674. {approvaChildren}
  675. </Select>
  676. <Button type="primary" onClick={() => { this.loadData(); }} style={{ marginRight: '10px', marginBottom: '10px' }}>搜索</Button>
  677. <Button onClick={this.resetAll} style={{ marginRight: '10px', marginBottom: '10px' }}>重置</Button>
  678. </div>
  679. </TabPane>
  680. <TabPane tab="更改表格显示数据" key="2">
  681. <div style={{ marginLeft: 10 }}>
  682. <ChooseList
  683. columns={this.state.columns}
  684. changeFn={this.changeList}
  685. changeList={this.state.changeList}
  686. top={55}
  687. margin={11}
  688. />
  689. </div>
  690. </TabPane>
  691. <TabPane tab="导出EXCEL" key="3">
  692. <Button type="primary" style={{ margin: '10px' }} onClick={this.exportPending}>导出</Button>
  693. </TabPane>
  694. </Tabs>
  695. <div className="patent-table">
  696. <Spin spinning={this.state.loading}>
  697. <Table
  698. scroll={{ x: 1200, y: 0 }}
  699. columns={
  700. this.state.changeList
  701. ? this.state.changeList
  702. : this.state.columns
  703. }
  704. dataSource={this.state.dataSource}
  705. pagination={this.state.pagination}
  706. style={{
  707. cursor: 'pointer',
  708. }}
  709. onRowClick={(record) => {
  710. this.setState({
  711. projectdetailsId: record.id,
  712. projectdetailsOrderNo: record.orderNo,
  713. commodityName: record.commodityName,
  714. visible: true,
  715. })
  716. }}
  717. bordered
  718. size="middle"
  719. rowClassName={this.suspendColor}
  720. />
  721. </Spin>
  722. </div>
  723. {this.state.visible ? <ProjectDetails
  724. visible={this.state.visible}
  725. id={this.state.projectdetailsId}
  726. orderNo={this.state.projectdetailsOrderNo}
  727. taskName={this.state.commodityName}
  728. visitOk={() => {
  729. this.setState({
  730. visible: false,
  731. });
  732. }}
  733. visitCancel={() => {
  734. this.setState({
  735. visible: false,
  736. });
  737. }}
  738. /> : null}
  739. </div>
  740. )
  741. }
  742. }
  743. export default EnterpriseProjectQuery;