index.jsx 26 KB

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