detailedList.jsx 31 KB

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