index.jsx 28 KB

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