index.jsx 28 KB

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