detailedList.jsx 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  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: 120,
  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: 80,
  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: 120,
  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: 85,
  158. },
  159. {
  160. title: "打卡时间",
  161. dataIndex: "clockInTimes",
  162. key: "clockInTimes",
  163. width: 80,
  164. },
  165. {
  166. title: "审核状态",
  167. dataIndex: "status",
  168. key: "status",
  169. width: 105,
  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: 70,
  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: 100,
  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. let _this = this
  693. this.setState({
  694. loading: true
  695. })
  696. setTimeout(function () {
  697. _this.loadData();
  698. _this.setState({
  699. loading: false
  700. })
  701. }, 300)
  702. this.selectSuperId();
  703. }
  704. exportExec() {
  705. message.config({
  706. duration: 20,
  707. });
  708. let loading = message.loading("下载中...");
  709. this.setState({
  710. exportPendingLoading: true,
  711. });
  712. let data = {
  713. releaseStart: this.state.releaseDate[0],
  714. releaseEnd: this.state.releaseDate[1],
  715. aid: this.state.theTypes,
  716. sid: this.state.theTypes1,
  717. uid: this.state.theCustomerTypes,
  718. status: this.state.status,
  719. clockIn: this.state.clockIn,
  720. publicType: this.state.type,
  721. };
  722. for (let i of Object.keys(data)) {
  723. if (i === "status" || i === "clockIn") {
  724. if (isNaN(parseInt(data[i]))) {
  725. delete data[i];
  726. }
  727. } else if (!data[i]) {
  728. delete data[i];
  729. }
  730. }
  731. console.log(data);
  732. $.ajax({
  733. method: "get",
  734. dataType: "json",
  735. crossDomain: false,
  736. url:
  737. globalConfig.context + "/api/admin/release/publicReleaseDtails/export?",
  738. data,
  739. success: function (data) {
  740. if (data.error.length === 0) {
  741. this.download(data.data);
  742. } else {
  743. message.warning(data.error[0].message);
  744. }
  745. }.bind(this),
  746. }).always(
  747. function () {
  748. loading();
  749. this.setState({
  750. exportPendingLoading: false,
  751. });
  752. }.bind(this)
  753. );
  754. // window.location.href =
  755. // globalConfig.context +
  756. // "/api/admin/release/publicReleaseDtails/export?" +
  757. // $.param(data);
  758. }
  759. download(fileName) {
  760. window.location.href =
  761. globalConfig.context + "/open/download?fileName=" + fileName;
  762. }
  763. render() {
  764. const dataSources = this.state.customerArr || [];
  765. const dataSources1 = this.state.customerArr1 || [];
  766. const options = dataSources.map((group) => (
  767. <Select.Option key={group.id} value={group.name}>
  768. {group.name}
  769. </Select.Option>
  770. ));
  771. const options1 = dataSources1.map((group) => (
  772. <Select.Option key={group.id} value={group.name}>
  773. {group.name}
  774. </Select.Option>
  775. ));
  776. const customerList = this.state.customerList || [];
  777. const customerOptions = customerList.map((group) => (
  778. <Select.Option key={group.id} value={group.name}>
  779. {group.name}
  780. </Select.Option>
  781. ));
  782. return (
  783. <div>
  784. <Modal
  785. maskClosable={false}
  786. visible={this.props.visible}
  787. onOk={this.props.onCancel}
  788. onCancel={this.props.onCancel}
  789. width="1600px"
  790. title={
  791. <span>
  792. <span style={{ marginRight: "15px" }}>公出详细列表</span>
  793. <Tag color="#f50">{this.props.aName}</Tag>
  794. <Tag color="#108ee9">{this.props.title}</Tag>
  795. </span>
  796. }
  797. footer=""
  798. className="admin-desc-content"
  799. >
  800. <div className="user-content">
  801. <Tabs defaultActiveKey="1" className="test">
  802. <TabPane tab="搜索" key="1">
  803. <div
  804. className="user-search"
  805. style={{
  806. marginTop: "10px",
  807. marginLeft: "10px",
  808. marginRight: "10px",
  809. }}
  810. >
  811. <span style={{ marginRight: "10px" }}>
  812. <AutoComplete
  813. className="certain-category-search"
  814. dropdownClassName="certain-category-search-dropdown"
  815. dropdownMatchSelectWidth={false}
  816. style={{ width: "120px" }}
  817. dataSource={customerOptions}
  818. placeholder="输入客户名称"
  819. value={this.state.customer}
  820. onChange={this.httpCustomerChange}
  821. filterOption={true}
  822. onBlur={this.blurCustomerChange}
  823. onSelect={this.selectCustomerAuto}
  824. >
  825. <Input />
  826. </AutoComplete>
  827. </span>
  828. <span style={{ marginRight: "10px" }}>
  829. <Select
  830. placeholder="请选择审核状态"
  831. style={{ width: 200, marginLeft: 10 }}
  832. value={this.state.status}
  833. onChange={(e) => {
  834. this.setState({ status: e });
  835. }}
  836. >
  837. {clockState.map((v, k) => (
  838. <Select.Option key={k} value={v.id}>
  839. {v.title}
  840. </Select.Option>
  841. ))}
  842. </Select>
  843. </span>
  844. <span style={{ marginRight: "10px" }}>
  845. <Select
  846. placeholder="请选择打卡状态"
  847. style={{ width: 200, marginLeft: 10 }}
  848. value={this.state.clockIn}
  849. onChange={(e) => {
  850. this.setState({ clockIn: e });
  851. }}
  852. >
  853. <Select.Option value={1}>已打卡</Select.Option>
  854. <Select.Option value={0}>未打卡</Select.Option>
  855. </Select>
  856. </span>
  857. <span style={{ marginRight: "10px" }}>
  858. <Select
  859. placeholder="请选择公出类型"
  860. style={{ width: 200, marginLeft: 10 }}
  861. value={this.state.type}
  862. onChange={(e) => {
  863. this.setState({ type: e });
  864. }}
  865. >
  866. <Select.Option value={0}>业务打卡</Select.Option>
  867. <Select.Option value={1}>技术打卡</Select.Option>
  868. <Select.Option value={2}>行政打卡</Select.Option>
  869. </Select>
  870. </span>
  871. <span style={{ marginRight: "10px" }}>
  872. <AutoComplete
  873. className="certain-category-search"
  874. dropdownClassName="certain-category-search-dropdown"
  875. dropdownMatchSelectWidth={false}
  876. style={{ width: "120px" }}
  877. dataSource={options}
  878. placeholder="输入公出申请人"
  879. value={this.state.auto}
  880. onChange={this.httpChange}
  881. filterOption={true}
  882. onBlur={this.blurChange}
  883. onSelect={this.selectAuto}
  884. >
  885. <Input />
  886. </AutoComplete>
  887. </span>
  888. <span style={{ marginRight: "10px" }}>
  889. <AutoComplete
  890. className="certain-category-search"
  891. dropdownClassName="certain-category-search-dropdown"
  892. dropdownMatchSelectWidth={false}
  893. style={{ width: "120px" }}
  894. dataSource={options1}
  895. placeholder="输入跟单人"
  896. value={this.state.auto1}
  897. onChange={this.httpChange1}
  898. filterOption={true}
  899. onBlur={this.blurChange1}
  900. onSelect={this.selectAuto1}
  901. >
  902. <Input />
  903. </AutoComplete>
  904. </span>
  905. <span style={{ marginRight: "10px" }}>
  906. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  907. 公出时间 :
  908. </span>
  909. <RangePicker
  910. style={{ marginRight: "10px", marginBottom: "10px" }}
  911. value={[
  912. this.state.releaseDate[0]
  913. ? moment(this.state.releaseDate[0])
  914. : null,
  915. this.state.releaseDate[1]
  916. ? moment(this.state.releaseDate[1])
  917. : null,
  918. ]}
  919. onChange={(data, dataString) => {
  920. this.setState({ releaseDate: dataString });
  921. }}
  922. />
  923. </span>
  924. <Button
  925. type="primary"
  926. onClick={() => {
  927. this.loadData();
  928. }}
  929. style={{ marginRight: "10px", marginBottom: "10px" }}
  930. >
  931. 搜索
  932. </Button>
  933. <Button
  934. onClick={this.resetAll}
  935. style={{ marginRight: "10px", marginBottom: "10px" }}
  936. >
  937. 重置
  938. </Button>
  939. </div>
  940. </TabPane>
  941. <TabPane tab="更改表格显示数据" key="2">
  942. <div style={{ marginLeft: 10 }}>
  943. <Spin spinning={this.state.loading}>
  944. <ChooseList
  945. columns={this.state.columns}
  946. changeFn={this.changeList}
  947. changeList={this.state.changeList}
  948. top={55}
  949. margin={11}
  950. />
  951. </Spin>
  952. </div>
  953. </TabPane>
  954. <TabPane tab="导出" key="3">
  955. <div style={{ float: "left" }}>
  956. <Button onClick={this.exportExec} style={{ margin: 10 }}>
  957. 导出excel
  958. </Button>
  959. </div>
  960. </TabPane>
  961. </Tabs>
  962. <div className="patent-table">
  963. <Spin spinning={this.state.loading}>
  964. <Table
  965. bordered
  966. size="middle"
  967. scroll={{ x: "max-content", y: "100%" }}
  968. columns={
  969. this.state.changeList.length > 0
  970. ? this.state.changeList
  971. : this.state.columns
  972. }
  973. dataSource={this.state.dataSource}
  974. pagination={this.state.pagination}
  975. />
  976. </Spin>
  977. </div>
  978. </div>
  979. </Modal>
  980. {this.state.imgListVisible ? (
  981. <Modal
  982. maskClosable={false}
  983. visible={this.state.imgListVisible}
  984. onOk={() => {
  985. this.setState({
  986. imgListVisible: false,
  987. });
  988. }}
  989. onCancel={() => {
  990. this.setState({
  991. imgListVisible: false,
  992. });
  993. }}
  994. width="500px"
  995. title="图片"
  996. footer=""
  997. >
  998. <div>
  999. <div>申请附件</div>
  1000. <ImgList
  1001. fileList={this.state.annexUrlArr}
  1002. domId="publicStatistics"
  1003. />
  1004. <div style={{ paddingTop: "35px" }}>打卡照片</div>
  1005. <ImgList
  1006. fileList={this.state.photoUrlArr}
  1007. domId="publicStatistics1"
  1008. />
  1009. </div>
  1010. </Modal>
  1011. ) : null}
  1012. </div>
  1013. );
  1014. }
  1015. }
  1016. export default DetailedList;