detailedList.jsx 29 KB

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