index.jsx 28 KB

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