index.jsx 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  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. status:"2",
  439. },
  440. success: function (data) {
  441. if (data.error && data.error.length === 0) {
  442. this.setState({
  443. customerArr: data.data,
  444. });
  445. } else {
  446. message.warning(data.error[0].message);
  447. }
  448. }.bind(this),
  449. }).always(function () { }.bind(this));
  450. }
  451. supervisor1(e) {
  452. $.ajax({
  453. method: "get",
  454. dataType: "json",
  455. crossDomain: false,
  456. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  457. data: {
  458. adminName: e,
  459. status:"2",
  460. },
  461. success: function (data) {
  462. if (data.error && data.error.length === 0) {
  463. this.setState({
  464. customerArr1: data.data,
  465. });
  466. } else {
  467. message.warning(data.error[0].message);
  468. }
  469. }.bind(this),
  470. }).always(function () { }.bind(this));
  471. }
  472. httpChange(e) {
  473. if (e.length >= 1) {
  474. this.supervisor(e);
  475. }
  476. this.setState({
  477. auto: e,
  478. });
  479. }
  480. httpChange1(e) {
  481. if (e.length >= 1) {
  482. this.supervisor1(e);
  483. }
  484. this.setState({
  485. auto1: e,
  486. });
  487. }
  488. selectAuto(value, options) {
  489. this.setState({
  490. auto: value,
  491. });
  492. }
  493. selectAuto1(value, options) {
  494. this.setState({
  495. auto1: value,
  496. });
  497. }
  498. httpCustomerChange(e) {
  499. if (e.length >= 1) {
  500. this.getCustomer(e);
  501. }
  502. this.setState({
  503. customer: e,
  504. });
  505. }
  506. selectCustomerAuto(value, options) {
  507. this.setState({
  508. customer: value,
  509. });
  510. }
  511. getCustomer(e) {
  512. $.ajax({
  513. method: "get",
  514. dataType: "json",
  515. crossDomain: false,
  516. url: globalConfig.context + "/api/admin/customer/getUserByName",
  517. data: {
  518. name: e,
  519. },
  520. success: function (data) {
  521. if (data.error && data.error.length === 0) {
  522. this.setState({
  523. customerList: data.data,
  524. });
  525. } else {
  526. message.warning(data.error[0].message);
  527. }
  528. }.bind(this),
  529. }).always(function () { }.bind(this));
  530. }
  531. blurCustomerChange(e) {
  532. let theType = "";
  533. let contactLists = this.state.customerList || [];
  534. if (e) {
  535. contactLists.map(function (item) {
  536. if (item.name == e.toString()) {
  537. theType = item.id;
  538. }
  539. });
  540. }
  541. this.setState({
  542. theCustomerTypes: theType,
  543. });
  544. }
  545. blurChange(e) {
  546. let theType = "";
  547. let contactLists = this.state.customerArr || [];
  548. if (e) {
  549. contactLists.map(function (item) {
  550. if (item.name == e.toString()) {
  551. theType = item.id;
  552. }
  553. });
  554. }
  555. this.setState({
  556. theTypes: theType,
  557. });
  558. }
  559. blurChange1(e) {
  560. let theType = "";
  561. let contactLists = this.state.customerArr1 || [];
  562. if (e) {
  563. contactLists.map(function (item) {
  564. if (item.name == e.toString()) {
  565. theType = item.id;
  566. }
  567. });
  568. }
  569. this.setState({
  570. theTypes1: theType,
  571. });
  572. }
  573. componentWillMount() {
  574. this.loadData();
  575. this.selectSuperId();
  576. }
  577. exportExec() {
  578. this.setState({
  579. exportPendingLoading: true,
  580. });
  581. message.config({
  582. duration: 20,
  583. });
  584. let loading = message.loading("下载中...");
  585. let data = {
  586. releaseStart: this.state.releaseDate[0],
  587. releaseEnd: this.state.releaseDate[1],
  588. aid: this.state.theTypes,
  589. sid: this.state.theTypes1,
  590. uid: this.state.theCustomerTypes,
  591. status: this.state.status,
  592. clockIn: this.state.clockIn,
  593. depId: this.state.depId,
  594. publicType: this.state.type,
  595. };
  596. for (let i of Object.keys(data)) {
  597. if (i === "status" || i === "clockIn") {
  598. if (isNaN(parseInt(data[i]))) {
  599. delete data[i];
  600. }
  601. } else if (!data[i]) {
  602. delete data[i];
  603. }
  604. }
  605. $.ajax({
  606. method: "get",
  607. dataType: "json",
  608. crossDomain: false,
  609. url:
  610. globalConfig.context + "/api/admin/release/publicReleaseDtails/export",
  611. data,
  612. success: function (data) {
  613. if (data.error.length === 0) {
  614. this.download(data.data);
  615. } else {
  616. message.warning(data.error[0].message);
  617. }
  618. }.bind(this),
  619. }).always(
  620. function () {
  621. loading();
  622. this.setState({
  623. exportPendingLoading: false,
  624. });
  625. }.bind(this)
  626. );
  627. }
  628. download(fileName) {
  629. window.location.href =
  630. globalConfig.context + "/open/download?fileName=" + fileName;
  631. }
  632. render() {
  633. const dataSources = this.state.customerArr || [];
  634. const dataSources1 = this.state.customerArr1 || [];
  635. const options = dataSources.map((group) => (
  636. <Select.Option key={group.id} value={group.name}>
  637. {group.name}
  638. </Select.Option>
  639. ));
  640. const options1 = dataSources1.map((group) => (
  641. <Select.Option key={group.id} value={group.name}>
  642. {group.name}
  643. </Select.Option>
  644. ));
  645. const customerList = this.state.customerList || [];
  646. const customerOptions = customerList.map((group) => (
  647. <Select.Option key={group.id} value={group.name}>
  648. {group.name}
  649. </Select.Option>
  650. ));
  651. return (
  652. <div>
  653. <div className="user-content">
  654. <div className="content-title">
  655. <span>公出详细列表(全部)</span>
  656. </div>
  657. <Tabs defaultActiveKey="1" className="test">
  658. <TabPane tab="搜索" key="1">
  659. <div
  660. className="user-search"
  661. style={{
  662. marginTop: "10px",
  663. marginLeft: "10px",
  664. marginRight: "10px",
  665. }}
  666. >
  667. <span style={{ marginRight: "10px" }}>
  668. <AutoComplete
  669. className="certain-category-search"
  670. dropdownClassName="certain-category-search-dropdown"
  671. dropdownMatchSelectWidth={false}
  672. style={{ width: "120px" }}
  673. dataSource={customerOptions}
  674. placeholder="输入客户名称"
  675. value={this.state.customer}
  676. onChange={this.httpCustomerChange}
  677. filterOption={true}
  678. onBlur={this.blurCustomerChange}
  679. onSelect={this.selectCustomerAuto}
  680. >
  681. <Input />
  682. </AutoComplete>
  683. </span>
  684. <span style={{ marginRight: "10px" }}>
  685. <Select
  686. placeholder="请选择审核状态"
  687. style={{ width: 120 }}
  688. value={this.state.status}
  689. onChange={(e) => {
  690. this.setState({ status: e });
  691. }}
  692. >
  693. {clockState.map((v, k) => (
  694. <Select.Option key={k} value={v.id}>
  695. {v.title}
  696. </Select.Option>
  697. ))}
  698. </Select>
  699. </span>
  700. <span style={{ marginRight: "10px" }}>
  701. <Select
  702. placeholder="请选择打卡状态"
  703. style={{ width: 120 }}
  704. value={this.state.clockIn}
  705. onChange={(e) => {
  706. this.setState({ clockIn: e });
  707. }}
  708. >
  709. <Select.Option value={1}>已打卡</Select.Option>
  710. <Select.Option value={0}>未打卡</Select.Option>
  711. </Select>
  712. </span>
  713. <span style={{ marginRight: "10px" }}>
  714. <Select
  715. placeholder="请选择公出类型"
  716. style={{ width: 120 }}
  717. value={this.state.type}
  718. onChange={(e) => {
  719. this.setState({ type: e });
  720. }}
  721. >
  722. <Select.Option value={0}>业务打卡</Select.Option>
  723. <Select.Option value={1}>技术打卡</Select.Option>
  724. <Select.Option value={2}>行政打卡</Select.Option>
  725. <Select.Option value={3}>技术协单</Select.Option>
  726. </Select>
  727. </span>
  728. <span style={{ marginRight: "10px" }}>
  729. <AutoComplete
  730. className="certain-category-search"
  731. dropdownClassName="certain-category-search-dropdown"
  732. dropdownMatchSelectWidth={false}
  733. style={{ width: "120px" }}
  734. dataSource={options}
  735. placeholder="输入公出申请人"
  736. value={this.state.auto}
  737. onChange={this.httpChange}
  738. filterOption={true}
  739. onBlur={this.blurChange}
  740. onSelect={this.selectAuto}
  741. >
  742. <Input />
  743. </AutoComplete>
  744. </span>
  745. <span style={{ marginRight: "10px" }}>
  746. <AutoComplete
  747. className="certain-category-search"
  748. dropdownClassName="certain-category-search-dropdown"
  749. dropdownMatchSelectWidth={false}
  750. style={{ width: "120px" }}
  751. dataSource={options1}
  752. placeholder="输入跟单人"
  753. value={this.state.auto1}
  754. onChange={this.httpChange1}
  755. filterOption={true}
  756. onBlur={this.blurChange1}
  757. onSelect={this.selectAuto1}
  758. >
  759. <Input />
  760. </AutoComplete>
  761. </span>
  762. <span style={{ marginRight: "10px" }}>
  763. <Select
  764. placeholder="请选择公出部门"
  765. style={{ width: 200 }}
  766. value={this.state.depId}
  767. onChange={(e) => {
  768. this.setState({ depId: e });
  769. }}
  770. notFoundContent="未获取到上级组织列表"
  771. >
  772. {this.state.contactsOption}
  773. </Select>
  774. </span>
  775. <span style={{ marginRight: "10px" }}>
  776. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  777. 公出时间 :
  778. </span>
  779. <RangePicker
  780. style={{ marginRight: "10px", marginBottom: "10px" }}
  781. value={[
  782. this.state.releaseDate[0]
  783. ? moment(this.state.releaseDate[0])
  784. : null,
  785. this.state.releaseDate[1]
  786. ? moment(this.state.releaseDate[1])
  787. : null,
  788. ]}
  789. onChange={(data, dataString) => {
  790. this.setState({ releaseDate: dataString });
  791. }}
  792. />
  793. </span>
  794. <Button
  795. type="primary"
  796. onClick={() => {
  797. this.loadData();
  798. }}
  799. style={{ marginRight: "10px", marginBottom: "10px" }}
  800. >
  801. 搜索
  802. </Button>
  803. <Button
  804. onClick={this.resetAll}
  805. style={{ marginRight: "10px", marginBottom: "10px" }}
  806. >
  807. 重置
  808. </Button>
  809. </div>
  810. </TabPane>
  811. <TabPane tab="更改表格显示数据" key="2">
  812. <div style={{ marginLeft: 10 }}>
  813. <Spin spinning={this.state.loading}>
  814. <ChooseList
  815. columns={this.state.columns}
  816. changeFn={this.changeList}
  817. changeList={this.state.changeList}
  818. top={55}
  819. margin={11}
  820. />
  821. </Spin>
  822. </div>
  823. </TabPane>
  824. <TabPane tab="导出" key="3">
  825. <div style={{ float: "left" }}>
  826. <Button
  827. loading={this.state.exportPendingLoading}
  828. onClick={this.exportExec}
  829. style={{ margin: 10 }}
  830. >
  831. 导出excel
  832. </Button>
  833. </div>
  834. </TabPane>
  835. </Tabs>
  836. <div className="patent-table">
  837. <Spin spinning={this.state.loading}>
  838. <Table
  839. bordered
  840. size="middle"
  841. scroll={{ x: "120%" }}
  842. columns={
  843. this.state.changeList
  844. ? this.state.changeList
  845. : this.state.columns
  846. }
  847. dataSource={this.state.dataSource}
  848. pagination={this.state.pagination}
  849. rowClassName={this.addRowColor}
  850. />
  851. </Spin>
  852. </div>
  853. </div>
  854. {this.state.imgListVisible ? (
  855. <Modal
  856. maskClosable={false}
  857. visible={this.state.imgListVisible}
  858. onOk={() => {
  859. this.setState({
  860. imgListVisible: false,
  861. });
  862. }}
  863. onCancel={() => {
  864. this.setState({
  865. imgListVisible: false,
  866. });
  867. }}
  868. width="500px"
  869. title="图片"
  870. footer=""
  871. >
  872. <div>
  873. <div>申请附件</div>
  874. <ImgList
  875. fileList={this.state.annexUrlArr}
  876. domId="publicStatistics"
  877. />
  878. <div style={{ paddingTop: "35px" }}>打卡照片</div>
  879. <ImgList
  880. fileList={this.state.photoUrlArr}
  881. domId="publicStatistics1"
  882. />
  883. </div>
  884. </Modal>
  885. ) : null}
  886. </div>
  887. );
  888. }
  889. }
  890. export default PublicSummary;