clue.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import {
  5. Button,
  6. Form,
  7. Input,
  8. Spin,
  9. Table,
  10. Select,
  11. message,
  12. Tabs,
  13. DatePicker,
  14. AutoComplete,
  15. Modal,
  16. Upload,
  17. Icon,
  18. Tooltip,
  19. Tag,
  20. } from "antd";
  21. import { ChooseList } from "../../../order/orderNew/chooseList";
  22. import { ShowModal, } from "@/tools.js"
  23. import { accountType, accountStatus } from "@/dataDic";
  24. import ZhuanjiaoDetail from "@/zhuanjiaoDetail.jsx";
  25. import IntentionDetail from "./intentionDetail/intentionDetail";
  26. import ShowModalDiv from "@/showModal.jsx";
  27. import FollowDetail from "./followDetail"
  28. import Outbound from '../components/outbound';
  29. import './clue.less';
  30. const FormItem = Form.Item;
  31. const { RangePicker } = DatePicker;
  32. const { TabPane } = Tabs;
  33. const LimitedProject = React.createClass({
  34. getInitialState() {
  35. return {
  36. searchValues: {
  37. clueProcess: this.props.intentionState == 1 ? "0" : ""
  38. }, // 列表筛选条件
  39. loading: false, //加载动画
  40. changeList: undefined, // 更改后的表格显示数据
  41. dataSource: [], // 列表数据
  42. fjlist: [],
  43. pagination: {
  44. defaultCurrent: 1,
  45. defaultPageSize: 10,
  46. showQuickJumper: true,
  47. pageSize: 10,
  48. onChange: function (page) {
  49. this.loadData(page);
  50. }.bind(this),
  51. showTotal: function (total) {
  52. return "共" + total + "条数据";
  53. },
  54. },
  55. columns: [
  56. {
  57. title: "客户名称",
  58. dataIndex: "nickname",
  59. key: "nickname",
  60. width: 300,
  61. },
  62. {
  63. title: "联系人",
  64. dataIndex: "contacts",
  65. key: "contacts",
  66. },
  67. {
  68. title: "联系电话",
  69. dataIndex: "contactMobile",
  70. key: "contactMobile",
  71. },
  72. {
  73. title: "所属人",
  74. dataIndex: "adminName",
  75. key: "adminName",
  76. isSelect: "jl",
  77. },
  78. {
  79. title: "转交人",
  80. dataIndex: "clueAname",
  81. key: "clueAname",
  82. isSelect: "yxy",
  83. },
  84. {
  85. title: "状态",
  86. dataIndex: "clueProcess",
  87. key: "clueProcess",
  88. render: (text, record) => {
  89. return (
  90. <div style={{ color: ["green", "", "red", "", ""][text] }}>
  91. {["待分配", "已分配", "已回退", "已释放", "已领取"][text]}
  92. </div>
  93. );
  94. },
  95. },
  96. {
  97. title: "导入时间",
  98. dataIndex: "clueTime",
  99. key: "clueTime",
  100. isSelect: "jl",
  101. render: (text, record) => {
  102. return (
  103. <div>
  104. {text}
  105. </div>
  106. );
  107. },
  108. },
  109. {
  110. title: "转交时间",
  111. dataIndex: "clueTransferTime",
  112. key: "clueTransferTime",
  113. isSelect: "yxy",
  114. render: (text, record) => {
  115. return (
  116. <div>
  117. {text}
  118. </div>
  119. );
  120. },
  121. },
  122. {
  123. title: "操作",
  124. dataIndex: "op",
  125. key: "op",
  126. render: (text, record) => {
  127. return (
  128. <div>
  129. <Outbound
  130. type="public"
  131. uid={record.id}
  132. />
  133. {
  134. ((record.clueProcess == 1 && this.props.intentionState == 2) ||
  135. ((record.clueProcess == 0 || record.clueProcess == 2) && this.props.intentionState == 1)
  136. ) &&
  137. <Button
  138. style={{ marginLeft: 10 }}
  139. type="primary"
  140. onClick={(e) => {
  141. let _this = this;
  142. Modal.confirm({
  143. title: "提示",
  144. content: (
  145. <span style={{ color: "red" }}>
  146. 确定将此客户领取至私有库吗?
  147. <div style={{ marginTop: "5px", color: "#000" }}>
  148. {record.nickname}
  149. </div>
  150. </span>
  151. ),
  152. onOk() {
  153. _this.changeAssigner(3, record.id)
  154. },
  155. onCancel() { },
  156. });
  157. }}
  158. >
  159. 领取
  160. </Button>
  161. }
  162. {this.props.intentionState == 2 &&
  163. <Button
  164. style={{ marginLeft: 10 }}
  165. type="primary"
  166. onClick={(e) => {
  167. let _this = this;
  168. Modal.confirm({
  169. title: "提示",
  170. content: (
  171. <span style={{ color: "red" }}>
  172. 确定将此客户退回吗?
  173. <div style={{ marginTop: "5px", color: "#000" }}>
  174. {record.nickname}
  175. </div>
  176. </span>
  177. ),
  178. onOk() {
  179. _this.changeAssigner(1, record.id)
  180. },
  181. onCancel() { },
  182. });
  183. }}
  184. >
  185. 回退
  186. </Button>}
  187. <Button
  188. style={{ marginLeft: 10 }}
  189. type="primary"
  190. onClick={(e) => {
  191. e.stopPropagation();
  192. this.zhuanjiaoDetail(record);
  193. }}
  194. >
  195. 记录
  196. </Button>
  197. </div>
  198. );
  199. },
  200. },
  201. ],
  202. customerArr: [],
  203. selectedRowKeys: [],
  204. selectedRows: [],
  205. zhuanjiaoVisible: false,
  206. categoryArr: [],
  207. upLoad: {
  208. customRequest: (options) => {
  209. this.setState({
  210. upLoadFileLoading: true,
  211. })
  212. let params = new FormData();
  213. params.append("file", options.file);
  214. $.ajax({
  215. method: "post",
  216. url: globalConfig.context + "/api/admin/userClue/import",
  217. async: true,
  218. cache: false,
  219. contentType: false,
  220. processData: false,
  221. data: params
  222. }).done(
  223. function (data) {
  224. this.setState({
  225. upLoadFileLoading: false,
  226. })
  227. if (data.error.length === 0) {
  228. if (data.data.errorCount == 0) {
  229. message.success("上传成功!");
  230. } else {
  231. Modal.info({
  232. title: "提示",
  233. width: 500,
  234. content: (
  235. <span>
  236. {data.data.errorCount}个客户信息导入失败!
  237. <div style={{ color: "red" }} dangerouslySetInnerHTML={{ __html: data.data.msg }}/>
  238. </span>
  239. ),
  240. onOk() { },
  241. });
  242. }
  243. this.loadData();
  244. } else {
  245. message.warning(data.error[0].message);
  246. this.loadData();
  247. }
  248. }.bind(this)
  249. ).always(
  250. function () {
  251. this.loadData();
  252. this.setState({
  253. upLoadFileLoading: false,
  254. });
  255. }.bind(this)
  256. );
  257. },
  258. name: "file",
  259. action: globalConfig.context + "/api/admin/userClue/import",
  260. showUploadList: false,
  261. },
  262. status: this.props.intentionState,
  263. };
  264. },
  265. componentWillMount() {
  266. this.defaultcolumns()
  267. },
  268. defaultcolumns() {
  269. const newArr = [];
  270. this.state.columns.forEach((item) => {
  271. if (this.props.intentionState == 1) {
  272. if (item.isSelect == "yxy") {
  273. return
  274. } else {
  275. newArr.push(item);
  276. }
  277. } else if (this.props.intentionState == 2) {
  278. if (item.isSelect == "jl") {
  279. return
  280. } else {
  281. newArr.push(item);
  282. }
  283. }
  284. });
  285. this.setState({
  286. changeList: newArr,
  287. }, () => {
  288. this.loadData();
  289. });
  290. },
  291. componentWillReceiveProps(prevProps) {
  292. if (prevProps.intentionState !== this.state.status) {
  293. this.setState({
  294. status: prevProps.intentionState
  295. }, () => {
  296. this.defaultcolumns()
  297. })
  298. }
  299. },
  300. // 列表接口
  301. loadData(pageNo) {
  302. const { searchValues, pagination } = this.state;
  303. this.setState({
  304. loading: true,
  305. });
  306. let datas = Object.assign(searchValues, {
  307. pageNo: pageNo || 1,
  308. pageSize: pagination.pageSize,
  309. shiroType: this.props.intentionState,
  310. });
  311. $.ajax({
  312. method: "get",
  313. dataType: "json",
  314. crossDomain: false,
  315. url: globalConfig.context + "/api/admin/userClue/list",
  316. data: datas,
  317. success: function (data) {
  318. ShowModal(this);
  319. this.setState({
  320. loading: false,
  321. });
  322. let theArr = [];
  323. if (data.error && data.error.length === 0) {
  324. if (data.data) {
  325. pagination.current = data.data.pageNo;
  326. pagination.total = data.data.totalCount;
  327. if (data.data && data.data.list && !data.data.list.length) {
  328. pagination.current = 0
  329. pagination.total = 0
  330. };
  331. this.setState({
  332. dataSource: data.data.list,
  333. pagination: this.state.pagination,
  334. pageNo: data.data.pageNo,
  335. });
  336. }
  337. } else {
  338. message.warning(data.error[0].message);
  339. }
  340. }.bind(this),
  341. }).always(
  342. function () {
  343. this.setState({
  344. loading: false,
  345. });
  346. }.bind(this)
  347. );
  348. },
  349. // 搜索
  350. search() {
  351. this.loadData();
  352. },
  353. // 重置
  354. reset() {
  355. this.setState({
  356. searchValues: {
  357. clueProcess: this.props.intentionState == 1 ? "0" : ""
  358. },
  359. }, () => {
  360. this.defaultcolumns();
  361. })
  362. },
  363. changeList(arr) {
  364. const newArr = [];
  365. this.state.columns.forEach((item) => {
  366. arr.forEach((val) => {
  367. if (val === item.title) {
  368. newArr.push(item);
  369. }
  370. });
  371. });
  372. this.setState({
  373. changeList: newArr,
  374. });
  375. },
  376. supervisor(e) {
  377. $.ajax({
  378. method: "get",
  379. dataType: "json",
  380. crossDomain: false,
  381. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  382. data: {
  383. adminName: e,
  384. },
  385. success: function (data) {
  386. let thedata = data.data;
  387. if (!thedata) {
  388. if (data.error && data.error.length) {
  389. message.warning(data.error[0].message);
  390. }
  391. thedata = {};
  392. }
  393. this.setState({
  394. customerArr: thedata,
  395. });
  396. }.bind(this),
  397. }).always(
  398. function () {
  399. this.setState({
  400. loading: false,
  401. });
  402. }.bind(this)
  403. );
  404. },
  405. selectAuto(value, options) {
  406. this.setState({
  407. auto: value,
  408. });
  409. },
  410. blurChange(e) {
  411. let theType = "";
  412. let contactLists = this.state.customerArr || [];
  413. if (e) {
  414. contactLists.map(function (item) {
  415. if (item.name == e.toString()) {
  416. theType = item.id;
  417. }
  418. });
  419. }
  420. this.setState({
  421. theTypes: theType,
  422. });
  423. },
  424. httpChange(e) {
  425. if (e.length >= 1) {
  426. this.supervisor(e);
  427. }
  428. this.setState({
  429. auto: e,
  430. });
  431. },
  432. showConfirm() {
  433. let _this = this;
  434. Modal.confirm({
  435. title: "提示",
  436. content: (
  437. <span style={{ color: "red" }}>
  438. 确定要转交以下客户吗?
  439. {this.state.selectedRows.map((value, index) => (
  440. <div key={index} style={{ marginTop: "5px", color: "#000" }}>
  441. {value.nickname}
  442. </div>
  443. ))}
  444. </span>
  445. ),
  446. onOk() {
  447. _this.changeAssigner(0)
  448. },
  449. onCancel() { },
  450. });
  451. },
  452. showConfirms() {
  453. let _this = this;
  454. Modal.confirm({
  455. title: "您确定将以下客户移至公共库吗?",
  456. content: (
  457. <span style={{ color: "red" }}>
  458. 移除后,以下客户将被别人领取!
  459. {this.state.selectedRows.map((value, index) => (
  460. <div key={index} style={{ marginTop: "5px", color: "#000" }}>
  461. {value.nickname}
  462. </div>
  463. ))}
  464. </span>
  465. ),
  466. onOk() {
  467. _this.changeAssigner(2);
  468. },
  469. onCancel() { },
  470. });
  471. },
  472. // 批量转交,移至公共库
  473. changeAssigner(type, uid) {
  474. const _this = this;
  475. if (type == 0 && !this.state.theTypes) {
  476. message.warning("请输入转交人姓名");
  477. return
  478. }
  479. let changeIds = "";
  480. if (type == 0 || type == 2) {
  481. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  482. let rowItem = this.state.selectedRows[idx];
  483. if (rowItem.id) {
  484. changeIds =
  485. this.state.selectedRows.length - 1 === idx
  486. ? changeIds + rowItem.id
  487. : changeIds + rowItem.id + ",";
  488. }
  489. }
  490. } else if (type == 1 || type == 3) {
  491. changeIds = uid
  492. }
  493. let loading = message.loading("加载中...");
  494. $.ajax({
  495. method: "post",
  496. dataType: "json",
  497. crossDomain: false,
  498. url: globalConfig.context + "/api/admin/userClue/transfer",
  499. data: {
  500. uid: changeIds,
  501. type,
  502. transferId: type == 0 ? this.state.theTypes : undefined,
  503. },
  504. }).done(
  505. function (data) {
  506. loading();
  507. this.setState({
  508. selList: [],
  509. })
  510. if (!data.error.length) {
  511. this.setState({
  512. auto: "",
  513. loading: false,
  514. selectedRowKeys: [],
  515. });
  516. if (data.data == 1) {
  517. message.success(["转交成功!", "退回成功!", "成功移至公共库!", "领取成功!"][type]);
  518. _this.loadData();
  519. } else {
  520. data.data.forEach(function (e) { message.warning(e) })
  521. }
  522. } else {
  523. message.warning(data.error[0].message);
  524. }
  525. }.bind(this)
  526. );
  527. },
  528. zhuanjiaoDetail(record) {
  529. this.setState({
  530. zhuanjiaoVisible: true,
  531. zhuanjiaoId: record.id,
  532. });
  533. },
  534. zhuanjiaoDetailCancel() {
  535. this.setState({
  536. zhuanjiaoVisible: false,
  537. });
  538. },
  539. tableRowClick(record, index) {
  540. this.state.visitModul = false;
  541. this.setState({
  542. modalVisible: true,
  543. basicState: true,
  544. contactState: true,
  545. modalName: record.name,
  546. RowData: record,
  547. });
  548. },
  549. closeDesc(e, s) {
  550. this.state.basicState = e;
  551. this.state.visitModul = e;
  552. this.state.modalVisible = e;
  553. this.state.visitModuls = e;
  554. this.state.showDesc = e;
  555. this.setState({
  556. tabsKey: "",
  557. });
  558. if (s) {
  559. this.loadData(this.state.ispage);
  560. }
  561. },
  562. //查看跟进记录列表
  563. loadVisit(pageNo) {
  564. this.setState({
  565. loading: true
  566. });
  567. $.ajax({
  568. method: "get",
  569. dataType: "json",
  570. crossDomain: false,
  571. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  572. data: {
  573. pageNo: pageNo || 1,
  574. pageSize: this.state.paginations.pageSize,
  575. uid: this.state.RowData.id, //名称1
  576. },
  577. success: function (data) {
  578. let theArr = [];
  579. if (data.error.length || data.data.list == "") {
  580. if (data.error && data.error.length) {
  581. message.warning(data.error[0].message);
  582. };
  583. } else {
  584. for (let i = 0; i < data.data.list.length; i++) {
  585. let thisdata = data.data.list[i];
  586. theArr.push(thisdata);
  587. };
  588. this.state.paginations.current = data.data.pageNo;
  589. this.state.paginations.total = data.data.totalCount;
  590. this.setState({
  591. ispage: data.data.pageNo
  592. })
  593. };
  594. if (data.data.list && !data.data.list.length) {
  595. this.state.paginations.current = 0;
  596. this.state.paginations.total = 0;
  597. };
  598. this.setState({
  599. visitArrList: theArr,
  600. paginations: this.state.paginations
  601. });
  602. }.bind(this),
  603. }).always(function () {
  604. this.setState({
  605. loading: false
  606. });
  607. }.bind(this));
  608. },
  609. // 模版下载
  610. exportExec() {
  611. message.config({
  612. duration: 20,
  613. });
  614. let loading = message.loading("下载中...");
  615. this.setState({
  616. exportPendingLoading: true,
  617. });
  618. $.ajax({
  619. method: "get",
  620. dataType: "json",
  621. crossDomain: false,
  622. url: globalConfig.context + "/api/admin/userClue/exportTemplate",
  623. data: {},
  624. success: function (data) {
  625. if (data.error.length === 0) {
  626. this.download(data.data);
  627. } else {
  628. message.warning(data.error[0].message);
  629. }
  630. }.bind(this),
  631. }).always(
  632. function () {
  633. loading();
  634. this.setState({
  635. exportPendingLoading: false,
  636. });
  637. }.bind(this)
  638. );
  639. },
  640. download(fileName) {
  641. window.location.href =
  642. globalConfig.context + "/open/download?fileName=" + fileName;
  643. },
  644. followUp(e) {
  645. const { searchValues } = this.state;
  646. this.setState({
  647. searchValues: Object.assign(searchValues, {
  648. belongname: e,
  649. }),
  650. });
  651. $.ajax({
  652. method: "get",
  653. dataType: "json",
  654. crossDomain: false,
  655. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  656. data: {
  657. adminName: e,
  658. },
  659. success: function (data) {
  660. let thedata = data.data;
  661. if (!thedata) {
  662. if (data.error && data.error.length) {
  663. message.warning(data.error[0].message);
  664. }
  665. thedata = {};
  666. }
  667. this.setState({
  668. fjlist: thedata,
  669. });
  670. }.bind(this),
  671. }).always(
  672. function () {
  673. this.setState({
  674. loading: false,
  675. });
  676. }.bind(this)
  677. );
  678. },
  679. selectF(value) {
  680. const { searchValues, fjlist } = this.state;
  681. const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
  682. this.setState({
  683. searchValues: Object.assign(searchValues, {
  684. belongName: newdataSources.find((item) => item.name == value).id,
  685. }),
  686. });
  687. },
  688. render() {
  689. const { searchValues, } = this.state
  690. const rowSelection = {
  691. selectedRowKeys: this.state.selectedRowKeys,
  692. onChange: (selectedRowKeys, selectedRows) => {
  693. this.setState({
  694. modalVisible: false,
  695. selectedRows: selectedRows,
  696. selectedRowKeys: selectedRowKeys,
  697. });
  698. },
  699. onSelect: (recordt, selected, selectedRows) => {
  700. this.setState({
  701. modalVisible: false,
  702. });
  703. },
  704. };
  705. const hasSelected = this.state.selectedRowKeys.length > 0;
  706. const dataSources = this.state.customerArr || [];
  707. const options = dataSources.map((group) => (
  708. <Select.Option key={group.id} value={group.name}>
  709. {group.name}
  710. </Select.Option>
  711. ));
  712. const newdataSources =
  713. JSON.stringify(this.state.fjlist) == "{}" ? [] : this.state.fjlist;
  714. const newoptions = newdataSources.map((group) => (
  715. <Select.Option key={group.id} value={group.name}>
  716. {group.name}
  717. </Select.Option>
  718. ));
  719. return (
  720. <div className="user-content clue">
  721. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  722. <div className="content-title" style={{ marginBottom: 10 }}>
  723. <span style={{ fontWeight: 900, fontSize: 16 }}>线索客户</span>
  724. </div>
  725. <div className="user-search">
  726. <Tabs defaultActiveKey="1" className="test">
  727. <TabPane tab="搜索" key="1">
  728. <div className="user-search" style={{ marginLeft: 10 }}>
  729. <Input
  730. placeholder="客户名称"
  731. value={searchValues["userName"]
  732. ? searchValues["userName"]
  733. : ""}
  734. onChange={(e) => {
  735. searchValues["userName"] = e.target.value;
  736. this.setState({
  737. searchValues: searchValues,
  738. });
  739. }}
  740. />
  741. <AutoComplete
  742. className="certain-category-search"
  743. dropdownClassName="certain-category-search-dropdown"
  744. dropdownMatchSelectWidth={false}
  745. style={{ width: "150px" }}
  746. dataSource={newoptions}
  747. placeholder="所属人"
  748. value={searchValues["belongname"] || undefined}
  749. onChange={this.followUp.bind(this)}
  750. filterOption={true}
  751. onSelect={this.selectF.bind(this)}
  752. >
  753. <Input />
  754. </AutoComplete>
  755. <Select
  756. style={{ width: 140 }}
  757. placeholder=""
  758. value={searchValues["clueProcess"]
  759. ? searchValues["clueProcess"]
  760. : ""}
  761. onChange={(e) => {
  762. searchValues["clueProcess"] = e;
  763. this.setState({
  764. searchValues: searchValues,
  765. });
  766. }}
  767. >
  768. <Option value="">全部</Option>
  769. <Option value="0">待分配</Option>
  770. <Option value="1">已分配</Option>
  771. <Option value="2">已回退</Option>
  772. <Option value="3">已移除</Option>
  773. <Option value="4">已领取</Option>
  774. </Select>
  775. <RangePicker
  776. style={{ width: 300 }}
  777. value={[
  778. searchValues.startTime ? moment(searchValues.startTime) : null,
  779. searchValues.endTime ? moment(searchValues.endTime) : null,
  780. ]}
  781. onChange={(data, dataString) => {
  782. this.setState({
  783. searchValues: Object.assign(searchValues, {
  784. startTime: dataString[0],
  785. endTime: dataString[1],
  786. }),
  787. });
  788. }}
  789. />
  790. <Button
  791. type="primary"
  792. onClick={this.search}
  793. style={{ margin: "0 10px" }}
  794. >搜索</Button>
  795. <Button onClick={this.reset}>重置</Button>
  796. </div>
  797. </TabPane>
  798. <TabPane tab="更改表格显示数据" key="2">
  799. <div style={{ marginLeft: 10 }}>
  800. <ChooseList
  801. columns={this.state.columns}
  802. changeFn={this.changeList}
  803. changeList={this.state.changeList}
  804. top={55}
  805. margin={11}
  806. />
  807. </div>
  808. </TabPane>
  809. {this.props.intentionState == 1
  810. ? <TabPane tab="操作" key="3">
  811. <div className="user-search" >
  812. <AutoComplete
  813. className="certain-category-search"
  814. dropdownClassName="certain-category-search-dropdown"
  815. dropdownMatchSelectWidth={false}
  816. style={{ width: "120px" }}
  817. dataSource={options}
  818. placeholder="输入转交人姓名"
  819. value={this.state.auto}
  820. onChange={this.httpChange}
  821. filterOption={true}
  822. onBlur={this.blurChange}
  823. onSelect={this.selectAuto}
  824. disabled={!hasSelected}
  825. >
  826. <Input />
  827. </AutoComplete>
  828. <Button
  829. type="primary"
  830. onClick={(e) => {
  831. e.stopPropagation();
  832. this.showConfirm();
  833. }}
  834. disabled={!hasSelected}
  835. style={{ marginRight: 10 }}
  836. >
  837. 批量转交
  838. </Button>
  839. <Button
  840. style={{ marginLeft: 10 }}
  841. onClick={(e) => {
  842. e.stopPropagation();
  843. this.showConfirms();
  844. }}
  845. type="primary"
  846. disabled={!hasSelected}
  847. >
  848. 批量移至公共库
  849. </Button>
  850. <Upload {...this.state.upLoad} disabled={this.state.upLoadFileLoading}>
  851. <Button
  852. loading={this.state.upLoadFileLoading}
  853. type="primary"
  854. style={{ marginLeft: 10 }}
  855. >
  856. 批量上传
  857. </Button>
  858. </Upload>
  859. <Button
  860. style={{ marginLeft: 10 }}
  861. onClick={(e) => {
  862. this.exportExec()
  863. }}
  864. type="primary"
  865. >
  866. 下载模板
  867. </Button>
  868. </div>
  869. </TabPane> : ""}
  870. </Tabs>
  871. </div>
  872. <div className="patent-table">
  873. <Spin spinning={this.state.loading}>
  874. <Table
  875. size="middle"
  876. bordered
  877. columns={
  878. this.state.changeList == undefined
  879. ? this.state.columns
  880. : this.state.changeList
  881. }
  882. dataSource={this.state.dataSource}
  883. rowSelection={rowSelection}
  884. pagination={this.state.pagination}
  885. // onRowDoubleClick={this.tableRowClick}
  886. />
  887. </Spin>
  888. </div>
  889. {
  890. this.state.zhuanjiaoVisible &&
  891. <ZhuanjiaoDetail
  892. cancel={this.zhuanjiaoDetailCancel}
  893. visible={this.state.zhuanjiaoVisible}
  894. id={this.state.zhuanjiaoId}
  895. />
  896. }
  897. {
  898. this.state.modalVisible &&
  899. <IntentionDetail
  900. isLimit={true}
  901. isCustomerAdmin={true}
  902. tabsKey={this.state.tabsKey}
  903. categoryArr={this.state.categoryArr}
  904. detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
  905. IntentionData={this.state.RowData}
  906. modalVisible={this.state.modalVisible}
  907. name={this.state.modalName}
  908. closeDesc={this.closeDesc}
  909. basicState={this.state.basicState}
  910. contactState={this.state.contactState}
  911. />
  912. }
  913. </div>
  914. );
  915. },
  916. });
  917. export default LimitedProject;