clue.jsx 26 KB

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