detailedList.jsx 29 KB

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