detailedList.jsx 31 KB

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