detailedList.jsx 28 KB

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