detailedList.jsx 31 KB

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