index.jsx 27 KB

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