index.jsx 29 KB

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