detailedList.jsx 28 KB

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