index.jsx 27 KB

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