index.jsx 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956
  1. import React, { Component } from "react";
  2. import {
  3. AutoComplete,
  4. Button,
  5. DatePicker,
  6. Input,
  7. message,
  8. Modal,
  9. Select,
  10. Spin,
  11. Table,
  12. Tabs,
  13. Tag,
  14. Tooltip,
  15. } from "antd";
  16. import { ShowModal, splitUrl, getClockState } from "@/tools";
  17. import { clockState } from "@/dataDic";
  18. import { ChooseList } from "../../order/orderNew/chooseList";
  19. import $ from "jquery/src/ajax";
  20. import "./index.less";
  21. import moment from "moment";
  22. import ImgList from "../../../common/imgList";
  23. const { TabPane } = Tabs;
  24. const { RangePicker } = DatePicker;
  25. class PublicSummary extends Component {
  26. constructor(props) {
  27. super(props);
  28. this.state = {
  29. pageNo: 1,
  30. loading: false,
  31. changeList: [],
  32. annexUrlArr: [],
  33. photoUrlArr: [],
  34. imgListVisible: false,
  35. columns: [
  36. {
  37. title: "编号",
  38. dataIndex: "key",
  39. key: "key",
  40. width: 45,
  41. },
  42. {
  43. title: "客户名称",
  44. dataIndex: "nickname",
  45. key: "nickname",
  46. width: 80,
  47. render: (text) => {
  48. return (
  49. <div
  50. style={{
  51. width: 80,
  52. wordBreak: "break-all",
  53. }}
  54. >
  55. {text}
  56. </div>
  57. );
  58. },
  59. },
  60. {
  61. title: "跟单人",
  62. dataIndex: "sname",
  63. key: "sname",
  64. width: 90,
  65. render: (text) => {
  66. return (
  67. <Tooltip title={text}>
  68. <div
  69. style={{
  70. width: 90,
  71. overflow: "hidden",
  72. textOverflow: "ellipsis",
  73. whiteSpace: "nowrap",
  74. }}
  75. >
  76. {text}
  77. </div>
  78. </Tooltip>
  79. );
  80. },
  81. },
  82. {
  83. title: "公出申请人",
  84. dataIndex: "aname",
  85. key: "aname",
  86. width: 90,
  87. render: (text) => {
  88. return (
  89. <Tooltip title={text}>
  90. <div
  91. style={{
  92. width: 90,
  93. overflow: "hidden",
  94. textOverflow: "ellipsis",
  95. whiteSpace: "nowrap",
  96. }}
  97. >
  98. {text}
  99. </div>
  100. </Tooltip>
  101. );
  102. },
  103. },
  104. {
  105. title: "申请时间",
  106. dataIndex: "createTimes",
  107. key: "createTimes",
  108. width: 130,
  109. },
  110. {
  111. title: "公出时间",
  112. dataIndex: "releaseStarts",
  113. key: "releaseStarts",
  114. width: 130,
  115. render: (text, record) => (
  116. <div>
  117. <div>{text}</div>
  118. <div style={{ paddingLeft: "44px" }}>至</div>
  119. <div>{record.releaseEnds}</div>
  120. </div>
  121. ),
  122. },
  123. {
  124. title: "公出地点",
  125. dataIndex: "userName",
  126. key: "userName",
  127. width: 120,
  128. render: (text) => {
  129. return (
  130. <div
  131. // style={{
  132. // width: 120,
  133. // overflow: "hidden",
  134. // textOverflow: "ellipsis",
  135. // whiteSpace: "nowrap",
  136. // }}
  137. >
  138. {text}
  139. </div>
  140. );
  141. },
  142. },
  143. {
  144. title: "公出时长(时)",
  145. dataIndex: "duration",
  146. key: "duration",
  147. width: 50,
  148. },
  149. {
  150. title: "打卡时间",
  151. dataIndex: "clockInTimes",
  152. key: "clockInTimes",
  153. width: 130,
  154. },
  155. {
  156. title: "审核状态",
  157. dataIndex: "status",
  158. key: "status",
  159. width: 40,
  160. render: (text) => (
  161. <Tag color={getClockState(text).color}>
  162. {getClockState(text).title}
  163. </Tag>
  164. ),
  165. },
  166. {
  167. title: "打卡状态",
  168. dataIndex: "clockIn",
  169. key: "clockIn",
  170. width: 70,
  171. render: (text) =>
  172. text === 1 ? "已打卡" : text === 0 ? "未打卡" : "",
  173. },
  174. {
  175. title: "公出目标",
  176. dataIndex: "remarks",
  177. key: "remarks",
  178. width: 280,
  179. render: (text) => {
  180. return (
  181. <div
  182. // style={{
  183. // width: 60,
  184. // overflow: "hidden",
  185. // textOverflow: "ellipsis",
  186. // whiteSpace: "nowrap",
  187. // }}
  188. >
  189. {text}
  190. </div>
  191. );
  192. },
  193. },
  194. {
  195. title: "公出计划",
  196. dataIndex: "plan",
  197. key: "plan",
  198. width: 280,
  199. render: (text) => {
  200. return (
  201. <div
  202. // style={{
  203. // width: 60,
  204. // overflow: "hidden",
  205. // textOverflow: "ellipsis",
  206. // whiteSpace: "nowrap",
  207. // }}
  208. // title={text}
  209. >
  210. {text}
  211. </div>
  212. );
  213. },
  214. },
  215. {
  216. title: "预计效果",
  217. dataIndex: "expectedEffect",
  218. key: "expectedEffect",
  219. width: 280,
  220. render: (text) => {
  221. return (
  222. <div
  223. // style={{
  224. // width: 60,
  225. // overflow: "hidden",
  226. // textOverflow: "ellipsis",
  227. // whiteSpace: "nowrap",
  228. // }}
  229. // title={text}
  230. >
  231. {text}
  232. </div>
  233. );
  234. },
  235. },
  236. {
  237. title: "本次公出目标总结",
  238. dataIndex: "supplement",
  239. key: "supplement",
  240. width: 280,
  241. render: (text) => {
  242. return (
  243. <div
  244. // style={{
  245. // width: 130,
  246. // overflow: "hidden",
  247. // textOverflow: "ellipsis",
  248. // whiteSpace: "nowrap",
  249. // }}
  250. // title={text}
  251. >
  252. {text}
  253. </div>
  254. );
  255. },
  256. },
  257. {
  258. title: "下一次公出计划",
  259. dataIndex: "nextPlan",
  260. key: "nextPlan",
  261. width: 280,
  262. render: (text) => {
  263. return (
  264. <div
  265. // style={{
  266. // width: 120,
  267. // overflow: "hidden",
  268. // textOverflow: "ellipsis",
  269. // whiteSpace: "nowrap",
  270. // }}
  271. // title={text}
  272. >
  273. {text}
  274. </div>
  275. );
  276. },
  277. },
  278. {
  279. title: "审核/指导",
  280. dataIndex: "auditInfo",
  281. key: "auditInfo",
  282. width: 200,
  283. render: (text) => {
  284. return <div style={{ wordBreak: "break-all" }}>{text}</div>;
  285. },
  286. },
  287. {
  288. title: "操作",
  289. dataIndex: "annexUrl",
  290. key: "annexUrl",
  291. render: (text, record) => (
  292. <div>
  293. <Button
  294. type={"primary"}
  295. onClick={(e) => {
  296. e.stopPropagation();
  297. let arr1 = text || [];
  298. let arr2 = record.photoUrl || [];
  299. this.setState(
  300. {
  301. annexUrlArr: splitUrl(
  302. arr1,
  303. ",",
  304. globalConfig.avatarHost + "/upload"
  305. ),
  306. photoUrlArr: splitUrl(
  307. arr2,
  308. ",",
  309. globalConfig.avatarHost + "/upload"
  310. ),
  311. },
  312. () => {
  313. this.setState({
  314. imgListVisible: true,
  315. });
  316. }
  317. );
  318. }}
  319. >
  320. 查看附件
  321. </Button>
  322. </div>
  323. ),
  324. },
  325. ],
  326. pagination: {
  327. defaultCurrent: 1,
  328. defaultPageSize: 10,
  329. showQuickJumper: true,
  330. pageSize: 10,
  331. onChange: function (page) {
  332. this.loadData(page);
  333. }.bind(this),
  334. showTotal: function (total) {
  335. return "共" + total + "条数据";
  336. },
  337. },
  338. dataSource: [],
  339. releaseDate: [],
  340. status: undefined,
  341. clockIn: undefined,
  342. depId: undefined,
  343. theTypes: undefined,
  344. theTypes1: undefined,
  345. theCustomerTypes: undefined,
  346. };
  347. this.loadData = this.loadData.bind(this);
  348. this.resetAll = this.resetAll.bind(this);
  349. this.changeList = this.changeList.bind(this);
  350. this.selectSuperId = this.selectSuperId.bind(this);
  351. this.supervisor = this.supervisor.bind(this);
  352. this.httpChange = this.httpChange.bind(this);
  353. this.blurChange = this.blurChange.bind(this);
  354. this.selectAuto = this.selectAuto.bind(this);
  355. this.httpChange1 = this.httpChange1.bind(this);
  356. this.blurChange1 = this.blurChange1.bind(this);
  357. this.selectAuto1 = this.selectAuto1.bind(this);
  358. this.getCustomer = this.getCustomer.bind(this);
  359. this.selectCustomerAuto = this.selectCustomerAuto.bind(this);
  360. this.httpCustomerChange = this.httpCustomerChange.bind(this);
  361. this.blurCustomerChange = this.blurCustomerChange.bind(this);
  362. this.exportExec = this.exportExec.bind(this);
  363. }
  364. //获取上级组织
  365. selectSuperId() {
  366. $.ajax({
  367. method: "get",
  368. dataType: "json",
  369. crossDomain: false,
  370. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  371. data: {},
  372. success: function (data) {
  373. let theArr = [];
  374. if (data.error && data.error.length === 0) {
  375. for (let i = 0; i < data.data.length; i++) {
  376. let theData = data.data[i];
  377. theArr.push(
  378. <Select.Option value={theData.id} key={theData.id}>
  379. {theData.name}
  380. </Select.Option>
  381. );
  382. }
  383. this.setState({
  384. contactsOption: theArr,
  385. });
  386. } else {
  387. message.warning(data.error[0].message);
  388. }
  389. }.bind(this),
  390. }).always(
  391. function () {
  392. this.setState({
  393. loading: false,
  394. });
  395. }.bind(this)
  396. );
  397. }
  398. changeList(arr) {
  399. const newArr = [];
  400. this.state.columns.forEach((item) => {
  401. arr.forEach((val) => {
  402. if (val === item.title) {
  403. newArr.push(item);
  404. }
  405. });
  406. });
  407. this.setState({
  408. changeList: newArr,
  409. });
  410. }
  411. loadData(pageNo) {
  412. this.setState({
  413. loading: true,
  414. });
  415. $.ajax({
  416. method: "get",
  417. dataType: "json",
  418. crossDomain: false,
  419. url: globalConfig.context + "/api/admin/release/publicReleaseDtails",
  420. data: {
  421. pageNo: pageNo || 1,
  422. pageSize: this.state.pagination.pageSize,
  423. releaseStart: this.state.releaseDate[0] || undefined,
  424. releaseEnd: this.state.releaseDate[1] || undefined,
  425. aid: this.state.theTypes || undefined,
  426. sid: this.state.theTypes1 || undefined,
  427. uid: this.state.theCustomerTypes,
  428. status: this.state.status,
  429. clockIn: this.state.clockIn,
  430. depId: this.state.depId || undefined,
  431. },
  432. success: function (data) {
  433. ShowModal(this);
  434. let theArr = [];
  435. this.setState({
  436. loading: false,
  437. });
  438. if (data.error && data.error.length === 0) {
  439. for (let i = 0; i < data.data.list.length; i++) {
  440. let thisdata = data.data.list[i];
  441. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  442. theArr.push(thisdata);
  443. }
  444. this.state.pagination.current = data.data.pageNo;
  445. this.state.pagination.total = data.data.totalCount;
  446. if (data.data && data.data.list && !data.data.list.length) {
  447. this.state.pagination.current = 0;
  448. this.state.pagination.total = 0;
  449. }
  450. this.setState({
  451. dataSource: theArr,
  452. pagination: this.state.pagination,
  453. pageNo: data.data.pageNo,
  454. });
  455. } else {
  456. message.warning(data.error[0].message);
  457. }
  458. }.bind(this),
  459. }).always(
  460. function () {
  461. this.setState({
  462. loading: false,
  463. });
  464. }.bind(this)
  465. );
  466. }
  467. resetAll() {
  468. this.setState(
  469. {
  470. releaseDate: [],
  471. theCustomerTypes: undefined,
  472. status: undefined,
  473. clockIn: undefined,
  474. depId: undefined,
  475. auto: "",
  476. auto1: "",
  477. customer: "",
  478. theTypes: undefined,
  479. theTypes1: undefined,
  480. },
  481. () => {
  482. this.loadData();
  483. }
  484. );
  485. }
  486. supervisor(e) {
  487. $.ajax({
  488. method: "get",
  489. dataType: "json",
  490. crossDomain: false,
  491. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  492. data: {
  493. adminName: e,
  494. },
  495. success: function (data) {
  496. if (data.error && data.error.length === 0) {
  497. this.setState({
  498. customerArr: data.data,
  499. });
  500. } else {
  501. message.warning(data.error[0].message);
  502. }
  503. }.bind(this),
  504. }).always(function () {}.bind(this));
  505. }
  506. supervisor1(e) {
  507. $.ajax({
  508. method: "get",
  509. dataType: "json",
  510. crossDomain: false,
  511. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  512. data: {
  513. adminName: e,
  514. },
  515. success: function (data) {
  516. if (data.error && data.error.length === 0) {
  517. this.setState({
  518. customerArr1: data.data,
  519. });
  520. } else {
  521. message.warning(data.error[0].message);
  522. }
  523. }.bind(this),
  524. }).always(function () {}.bind(this));
  525. }
  526. httpChange(e) {
  527. if (e.length >= 1) {
  528. this.supervisor(e);
  529. }
  530. this.setState({
  531. auto: e,
  532. });
  533. }
  534. httpChange1(e) {
  535. if (e.length >= 1) {
  536. this.supervisor1(e);
  537. }
  538. this.setState({
  539. auto1: e,
  540. });
  541. }
  542. selectAuto(value, options) {
  543. this.setState({
  544. auto: value,
  545. });
  546. }
  547. selectAuto1(value, options) {
  548. this.setState({
  549. auto1: value,
  550. });
  551. }
  552. httpCustomerChange(e) {
  553. if (e.length >= 1) {
  554. this.getCustomer(e);
  555. }
  556. this.setState({
  557. customer: e,
  558. });
  559. }
  560. selectCustomerAuto(value, options) {
  561. this.setState({
  562. customer: value,
  563. });
  564. }
  565. getCustomer(e) {
  566. $.ajax({
  567. method: "get",
  568. dataType: "json",
  569. crossDomain: false,
  570. url: globalConfig.context + "/api/admin/customer/getUserByName",
  571. data: {
  572. name: e,
  573. },
  574. success: function (data) {
  575. if (data.error && data.error.length === 0) {
  576. this.setState({
  577. customerList: data.data,
  578. });
  579. } else {
  580. message.warning(data.error[0].message);
  581. }
  582. }.bind(this),
  583. }).always(function () {}.bind(this));
  584. }
  585. blurCustomerChange(e) {
  586. let theType = "";
  587. let contactLists = this.state.customerList || [];
  588. if (e) {
  589. contactLists.map(function (item) {
  590. if (item.name == e.toString()) {
  591. theType = item.id;
  592. }
  593. });
  594. }
  595. this.setState({
  596. theCustomerTypes: theType,
  597. });
  598. }
  599. blurChange(e) {
  600. let theType = "";
  601. let contactLists = this.state.customerArr || [];
  602. if (e) {
  603. contactLists.map(function (item) {
  604. if (item.name == e.toString()) {
  605. theType = item.id;
  606. }
  607. });
  608. }
  609. this.setState({
  610. theTypes: theType,
  611. });
  612. }
  613. blurChange1(e) {
  614. let theType = "";
  615. let contactLists = this.state.customerArr1 || [];
  616. if (e) {
  617. contactLists.map(function (item) {
  618. if (item.name == e.toString()) {
  619. theType = item.id;
  620. }
  621. });
  622. }
  623. this.setState({
  624. theTypes1: theType,
  625. });
  626. }
  627. componentWillMount() {
  628. this.loadData();
  629. this.selectSuperId();
  630. }
  631. exportExec() {
  632. this.setState({
  633. exportPendingLoading: true,
  634. });
  635. message.config({
  636. duration: 20,
  637. });
  638. let loading = message.loading("下载中...");
  639. let data = {
  640. releaseStart: this.state.releaseDate[0],
  641. releaseEnd: this.state.releaseDate[1],
  642. aid: this.state.theTypes,
  643. sid: this.state.theTypes1,
  644. uid: this.state.theCustomerTypes,
  645. status: this.state.status,
  646. clockIn: this.state.clockIn,
  647. depId: this.state.depId,
  648. };
  649. for (let i of Object.keys(data)) {
  650. if (i === "status" || i === "clockIn") {
  651. if (isNaN(parseInt(data[i]))) {
  652. delete data[i];
  653. }
  654. } else if (!data[i]) {
  655. delete data[i];
  656. }
  657. }
  658. $.ajax({
  659. method: "get",
  660. dataType: "json",
  661. crossDomain: false,
  662. url:
  663. globalConfig.context +
  664. "/api/admin/release/publicReleaseDtails/export?" +
  665. $.param(data),
  666. data: {},
  667. success: function (data) {
  668. if (data.error.length === 0) {
  669. this.download(data.data);
  670. } else {
  671. message.warning(data.error[0].message);
  672. }
  673. }.bind(this),
  674. }).always(
  675. function () {
  676. loading();
  677. this.setState({
  678. exportPendingLoading: false,
  679. });
  680. }.bind(this)
  681. );
  682. }
  683. download(fileName) {
  684. window.location.href =
  685. globalConfig.context + "/open/download?fileName=" + fileName;
  686. }
  687. render() {
  688. const dataSources = this.state.customerArr || [];
  689. const dataSources1 = this.state.customerArr1 || [];
  690. const options = dataSources.map((group) => (
  691. <Select.Option key={group.id} value={group.name}>
  692. {group.name}
  693. </Select.Option>
  694. ));
  695. const options1 = dataSources1.map((group) => (
  696. <Select.Option key={group.id} value={group.name}>
  697. {group.name}
  698. </Select.Option>
  699. ));
  700. const customerList = this.state.customerList || [];
  701. const customerOptions = customerList.map((group) => (
  702. <Select.Option key={group.id} value={group.name}>
  703. {group.name}
  704. </Select.Option>
  705. ));
  706. return (
  707. <div>
  708. <div className="user-content">
  709. <div className="content-title">
  710. <span>公出详细列表(全部)</span>
  711. </div>
  712. <Tabs defaultActiveKey="1" className="test">
  713. <TabPane tab="搜索" key="1">
  714. <div
  715. className="user-search"
  716. style={{
  717. marginTop: "10px",
  718. marginLeft: "10px",
  719. marginRight: "10px",
  720. }}
  721. >
  722. <span style={{ marginRight: "10px" }}>
  723. <AutoComplete
  724. className="certain-category-search"
  725. dropdownClassName="certain-category-search-dropdown"
  726. dropdownMatchSelectWidth={false}
  727. style={{ width: "120px" }}
  728. dataSource={customerOptions}
  729. placeholder="输入客户名称"
  730. value={this.state.customer}
  731. onChange={this.httpCustomerChange}
  732. filterOption={true}
  733. onBlur={this.blurCustomerChange}
  734. onSelect={this.selectCustomerAuto}
  735. >
  736. <Input />
  737. </AutoComplete>
  738. </span>
  739. <span style={{ marginRight: "10px" }}>
  740. <Select
  741. placeholder="请选择审核状态"
  742. style={{ width: 200, marginLeft: 10 }}
  743. value={this.state.status}
  744. onChange={(e) => {
  745. this.setState({ status: e });
  746. }}
  747. >
  748. {clockState.map((v, k) => (
  749. <Select.Option key={k} value={v.id}>
  750. {v.title}
  751. </Select.Option>
  752. ))}
  753. </Select>
  754. </span>
  755. <span style={{ marginRight: "10px" }}>
  756. <Select
  757. placeholder="请选择打卡状态"
  758. style={{ width: 200, marginLeft: 10 }}
  759. value={this.state.clockIn}
  760. onChange={(e) => {
  761. this.setState({ clockIn: e });
  762. }}
  763. >
  764. <Select.Option value={1}>已打卡</Select.Option>
  765. <Select.Option value={0}>未打卡</Select.Option>
  766. </Select>
  767. </span>
  768. <span style={{ marginRight: "10px" }}>
  769. <AutoComplete
  770. className="certain-category-search"
  771. dropdownClassName="certain-category-search-dropdown"
  772. dropdownMatchSelectWidth={false}
  773. style={{ width: "120px" }}
  774. dataSource={options}
  775. placeholder="输入公出申请人"
  776. value={this.state.auto}
  777. onChange={this.httpChange}
  778. filterOption={true}
  779. onBlur={this.blurChange}
  780. onSelect={this.selectAuto}
  781. >
  782. <Input />
  783. </AutoComplete>
  784. </span>
  785. <span style={{ marginRight: "10px" }}>
  786. <AutoComplete
  787. className="certain-category-search"
  788. dropdownClassName="certain-category-search-dropdown"
  789. dropdownMatchSelectWidth={false}
  790. style={{ width: "120px" }}
  791. dataSource={options1}
  792. placeholder="输入跟单人"
  793. value={this.state.auto1}
  794. onChange={this.httpChange1}
  795. filterOption={true}
  796. onBlur={this.blurChange1}
  797. onSelect={this.selectAuto1}
  798. >
  799. <Input />
  800. </AutoComplete>
  801. </span>
  802. <span style={{ marginRight: "10px" }}>
  803. <Select
  804. placeholder="请选择公出部门"
  805. style={{ width: 200, marginLeft: 10 }}
  806. value={this.state.depId}
  807. onChange={(e) => {
  808. this.setState({ depId: e });
  809. }}
  810. notFoundContent="未获取到上级组织列表"
  811. >
  812. {this.state.contactsOption}
  813. </Select>
  814. </span>
  815. <span style={{ marginRight: "10px" }}>
  816. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  817. 公出时间 :
  818. </span>
  819. <RangePicker
  820. style={{ marginRight: "10px", marginBottom: "10px" }}
  821. value={[
  822. this.state.releaseDate[0]
  823. ? moment(this.state.releaseDate[0])
  824. : null,
  825. this.state.releaseDate[1]
  826. ? moment(this.state.releaseDate[1])
  827. : null,
  828. ]}
  829. onChange={(data, dataString) => {
  830. this.setState({ releaseDate: dataString });
  831. }}
  832. />
  833. </span>
  834. <Button
  835. type="primary"
  836. onClick={() => {
  837. this.loadData();
  838. }}
  839. style={{ marginRight: "10px", marginBottom: "10px" }}
  840. >
  841. 搜索
  842. </Button>
  843. <Button
  844. onClick={this.resetAll}
  845. style={{ marginRight: "10px", marginBottom: "10px" }}
  846. >
  847. 重置
  848. </Button>
  849. </div>
  850. </TabPane>
  851. <TabPane tab="更改表格显示数据" key="2">
  852. <div style={{ marginLeft: 10 }}>
  853. <Spin spinning={this.state.loading}>
  854. <ChooseList
  855. columns={this.state.columns}
  856. changeFn={this.changeList}
  857. changeList={this.state.changeList}
  858. top={55}
  859. margin={11}
  860. />
  861. </Spin>
  862. </div>
  863. </TabPane>
  864. <TabPane tab="导出" key="3">
  865. <div style={{ float: "left" }}>
  866. <Button
  867. loading={this.state.exportPendingLoading}
  868. onClick={this.exportExec}
  869. style={{ margin: 10 }}
  870. >
  871. 导出excel
  872. </Button>
  873. </div>
  874. </TabPane>
  875. </Tabs>
  876. <div className="patent-table">
  877. <Spin spinning={this.state.loading}>
  878. <Table
  879. bordered
  880. size="middle"
  881. scroll={{ x: '120%' }}
  882. columns={
  883. this.state.changeList.length > 0
  884. ? this.state.changeList
  885. : this.state.columns
  886. }
  887. dataSource={this.state.dataSource}
  888. pagination={this.state.pagination}
  889. />
  890. </Spin>
  891. </div>
  892. </div>
  893. {this.state.imgListVisible ? (
  894. <Modal
  895. maskClosable={false}
  896. visible={this.state.imgListVisible}
  897. onOk={() => {
  898. this.setState({
  899. imgListVisible: false,
  900. });
  901. }}
  902. onCancel={() => {
  903. this.setState({
  904. imgListVisible: false,
  905. });
  906. }}
  907. width="500px"
  908. title="图片"
  909. footer=""
  910. >
  911. <div>
  912. <div>申请附件</div>
  913. <ImgList
  914. fileList={this.state.annexUrlArr}
  915. domId="publicStatistics"
  916. />
  917. <div style={{ paddingTop: "35px" }}>打卡照片</div>
  918. <ImgList
  919. fileList={this.state.photoUrlArr}
  920. domId="publicStatistics1"
  921. />
  922. </div>
  923. </Modal>
  924. ) : null}
  925. </div>
  926. );
  927. }
  928. }
  929. export default PublicSummary;