index.jsx 26 KB

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