index.jsx 26 KB

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