publist.jsx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  1. // 渠道列表
  2. import React, { Component } from "react";
  3. import {
  4. Form,
  5. Button,
  6. message,
  7. Spin,
  8. Input,
  9. DatePicker,
  10. Select,
  11. Tabs,
  12. Table,
  13. Modal,
  14. AutoComplete,
  15. } from "antd";
  16. import { ChooseList } from "../../../manageCenter/order/orderNew/chooseList";
  17. import { provinceList } from "../../../NewDicProvinceList";
  18. import $ from "jquery/src/ajax";
  19. import { ShowModal } from "@/tools";
  20. import moment from "moment";
  21. import AddChannel from "./addchannel"; //新增渠道
  22. import ChannelLog from "./channellog"; //转交日志
  23. import ChangeLog from "./changelog"; //更名日志
  24. import ChannelDetail from "./channeldetail"; //渠道详情
  25. import FollowDetail from "../../../../component/manageCenter/customer/NEW/intentionCustomer/followDetail";
  26. const { TabPane } = Tabs;
  27. const FormItem = Form.Item;
  28. const Option = Select.Option;
  29. const { RangePicker } = DatePicker;
  30. class ChannelUnit extends Component {
  31. constructor(props) {
  32. super(props);
  33. this.state = {
  34. query: { type: 1 },
  35. changeList: undefined,
  36. selectedRowKeys: [],
  37. columns: [
  38. {
  39. title: "渠道名称",
  40. dataIndex: "name",
  41. key: "name",
  42. },
  43. {
  44. title: "地区",
  45. dataIndex: "province",
  46. key: "province",
  47. render: (text, record) => {
  48. return record.province + "-" + record.city + "-" + record.area;
  49. },
  50. },
  51. {
  52. title: "渠道类别",
  53. dataIndex: "type",
  54. key: "type",
  55. render: (text) =>
  56. [
  57. "",
  58. "政府部门",
  59. "民主党派",
  60. "园区",
  61. "民间组织",
  62. "其他战略合作单位",
  63. ][text],
  64. },
  65. {
  66. title: "初始时间",
  67. dataIndex: "createTime",
  68. key: "createTime",
  69. },
  70. {
  71. title: "跟进人",
  72. dataIndex: "aName",
  73. key: "aName",
  74. },
  75. {
  76. title: "操作",
  77. dataIndex: "op",
  78. key: "op",
  79. render: (text, record) => (
  80. <Button
  81. type="primary"
  82. onClick={(e) => {
  83. e.stopPropagation(), this.receive(record);
  84. }}
  85. >
  86. 领取
  87. </Button>
  88. ),
  89. },
  90. ],
  91. dataSource: [],
  92. pagination: {
  93. defaultCurrent: 1,
  94. defaultPageSize: 10,
  95. showQuickJumper: true,
  96. pageSize: 10,
  97. onChange: function (page) {
  98. this.loadData(page);
  99. }.bind(this),
  100. showTotal: function (total) {
  101. return "共" + total + "条数据";
  102. },
  103. },
  104. channeOb: [
  105. { name: "政府部门", val: 1 },
  106. { name: "民主党派", val: 2 },
  107. { name: "园区", val: 3 },
  108. { name: "民间组织", val: 4 },
  109. { name: "其他战略合作单位", val: 5 },
  110. ],
  111. fjlist: [], // 查询到的更进人列表
  112. loading: false,
  113. cityList: [],
  114. areaList: [],
  115. searchInfor: {}, // 查询条件
  116. mvisible: "", //控制弹窗变量
  117. customerArr: [], //查询到的转交人列表
  118. rowdata: {}, //双击行数据
  119. categoryArr: [],
  120. visitModuls: false,
  121. };
  122. this.tabelContentRef = null;
  123. this.autoCompleteSearchRef = {};
  124. }
  125. componentWillMount() {
  126. this.loadData();
  127. this.category();
  128. }
  129. /*单个领取*/
  130. receive(e) {
  131. this.setState({
  132. loading: true,
  133. selectedRowKeys: [],
  134. });
  135. $.ajax({
  136. method: "get",
  137. dataType: "json",
  138. crossDomain: false,
  139. url: globalConfig.context + "/api/admin/customer/receiveCustomer",
  140. data: {
  141. uid: e.id,
  142. },
  143. }).done(
  144. function (data) {
  145. if (!data.error.length) {
  146. message.success("领取成功!");
  147. this.setState({
  148. loading: false,
  149. });
  150. } else {
  151. message.warning(data.error[0].message);
  152. }
  153. this.loadData(this.state.ispage);
  154. }.bind(this)
  155. );
  156. }
  157. //
  158. getVal(arr, val) {
  159. if (!val || arr.length == 0) {
  160. return undefined;
  161. } else {
  162. for (const items of arr) {
  163. if (items.id == val) {
  164. return items.name;
  165. }
  166. }
  167. }
  168. }
  169. changeList(arr) {
  170. const newArr = [];
  171. this.state.columns.forEach((item) => {
  172. arr.forEach((val) => {
  173. if (val === item.title) {
  174. newArr.push(item);
  175. }
  176. });
  177. });
  178. this.setState({
  179. changeList: newArr,
  180. });
  181. }
  182. // 重置
  183. resetAll() {
  184. this.setState(
  185. {
  186. searchInfor: JSON.parse(JSON.stringify({})),
  187. selectedRowKeys: [],
  188. },
  189. () => {
  190. this.loadData();
  191. }
  192. );
  193. }
  194. // 列表接口
  195. loadData(pageNo) {
  196. const { searchInfor, pagination } = this.state;
  197. this.setState({
  198. loading: true,
  199. });
  200. let datas = Object.assign(searchInfor, {
  201. pageNo: pageNo || 1,
  202. pageSize: pagination.pageSize,
  203. });
  204. // delete datas.aname
  205. $.ajax({
  206. method: "get",
  207. dataType: "json",
  208. crossDomain: false,
  209. url: globalConfig.context + "/api/admin/customer/publicChannelUserList",
  210. data: datas,
  211. success: function (data) {
  212. ShowModal(this);
  213. this.setState({
  214. loading: false,
  215. });
  216. if (data.error && data.error.length === 0) {
  217. if (data.data.list) {
  218. pagination.current = data.data.pageNo;
  219. pagination.total = data.data.totalCount;
  220. if (data.data && data.data.list && !data.data.list.length) {
  221. pagination.current = 0;
  222. pagination.total = 0;
  223. }
  224. this.setState({
  225. dataSource: data.data.list,
  226. pagination: this.state.pagination,
  227. pageNo: data.data.pageNo,
  228. });
  229. } else {
  230. this.setState({
  231. dataSource: data.data,
  232. pagination: false,
  233. });
  234. }
  235. } else {
  236. message.warning(data.error[0].message);
  237. }
  238. }.bind(this),
  239. }).always(
  240. function () {
  241. this.setState({
  242. loading: false,
  243. });
  244. }.bind(this)
  245. );
  246. }
  247. //值改变时请求客户名称
  248. httpChange(e) {
  249. if (e.length >= 1) {
  250. this.supervisor(e);
  251. }
  252. this.setState({
  253. auto: e,
  254. });
  255. }
  256. // 指定转交人自动补全
  257. supervisor(e) {
  258. $.ajax({
  259. method: "get",
  260. dataType: "json",
  261. crossDomain: false,
  262. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  263. data: {
  264. adminName: e,
  265. },
  266. success: function (data) {
  267. let thedata = data.data;
  268. if (!thedata) {
  269. if (data.error && data.error.length) {
  270. message.warning(data.error[0].message);
  271. }
  272. thedata = {};
  273. }
  274. this.setState({
  275. customerArr: thedata,
  276. });
  277. }.bind(this),
  278. }).always(
  279. function () {
  280. this.setState({
  281. loading: false,
  282. });
  283. }.bind(this)
  284. );
  285. }
  286. // 失去焦点
  287. blurChange(e) {
  288. let theType = "";
  289. let contactLists = this.state.customerArr || [];
  290. if (e) {
  291. contactLists.map(function (item) {
  292. if (item.name == e.toString()) {
  293. theType = item.id;
  294. }
  295. });
  296. }
  297. this.setState({
  298. theTypes: theType,
  299. });
  300. }
  301. // 选择行
  302. onSelectChange(selectedRowKeys) {
  303. this.setState({ selectedRowKeys });
  304. }
  305. //
  306. addClick() {
  307. this.setState({
  308. mvisible: "add",
  309. });
  310. }
  311. // 关闭弹窗
  312. closeDesc() {
  313. this.setState({
  314. mvisible: "",
  315. });
  316. this.loadData();
  317. }
  318. // 转交提示
  319. showConfirm() {
  320. const { dataSource, selectedRowKeys } = this.state;
  321. if (!this.state.theTypes) {
  322. message.warning("请输入转交人姓名");
  323. return;
  324. }
  325. let _this = this;
  326. Modal.confirm({
  327. title: "提示",
  328. content: (
  329. <span style={{ color: "red" }}>
  330. 确定要转交以下渠道吗?
  331. {/* {this.state.selectedRowKeys.map((value, index) => (
  332. <div key={index} style={{ marginTop: "5px", color: "#000" }}>
  333. {value.name}
  334. </div>
  335. ))} */}
  336. <div style={{ marginTop: "5px", color: "#000" }}>
  337. {dataSource[selectedRowKeys[0]].name}
  338. </div>
  339. </span>
  340. ),
  341. onOk() {
  342. _this.setState({
  343. informationTransferVisible: true,
  344. });
  345. },
  346. onCancel() {},
  347. });
  348. }
  349. //转交
  350. changeAssigner(infor) {
  351. const { dataSource, selectedRowKeys } = this.state;
  352. if (this.state.theTypes) {
  353. this.setState({
  354. informationTransferVisible: false,
  355. });
  356. let changeIds = dataSource[selectedRowKeys[0]].id;
  357. let oldAid = dataSource[selectedRowKeys[0]].aid;
  358. let loading = message.loading("加载中...");
  359. $.ajax({
  360. method: "get",
  361. dataType: "json",
  362. crossDomain: false,
  363. url: globalConfig.context + "/api/admin/customer/transferToOther",
  364. data: {
  365. uid: changeIds, //这一行数据的ID
  366. aid: this.state.theTypes, //指定转交人的ID
  367. oldAid: oldAid, //原跟进人ID
  368. data: infor, // 资料是否一并转交 0否 1是
  369. },
  370. }).done(
  371. function (data) {
  372. loading();
  373. if (!data.error.length) {
  374. message.success("转交成功!");
  375. this.setState({
  376. auto: "",
  377. loading: false,
  378. selectedRowKeys: [],
  379. });
  380. } else {
  381. message.warning(data.error[0].message);
  382. }
  383. this.loadData(
  384. Math.min(
  385. this.state.ispage == undefined ? 1 : this.state.ispage,
  386. Math.ceil((this.state.pagination.total - 1) / 10)
  387. )
  388. );
  389. }.bind(this)
  390. );
  391. } else {
  392. message.warning("请输入转交人姓名");
  393. }
  394. }
  395. // 移出渠道
  396. remove() {
  397. const { dataSource, selectedRowKeys, ispage } = this.state;
  398. Modal.confirm({
  399. title: "您确定将以下渠道移至公共渠道吗??",
  400. content: (
  401. <span style={{ color: "red" }}>
  402. 移除后,以下客户将被别人领取!
  403. <div style={{ marginTop: "5px", color: "#000" }}>
  404. {dataSource[selectedRowKeys[0]].name}
  405. </div>
  406. </span>
  407. ),
  408. onOk() {
  409. let deletedIds = dataSource[selectedRowKeys[0]].id;
  410. $.ajax({
  411. method: "get",
  412. dataType: "json",
  413. crossDomain: false,
  414. url: globalConfig.context + "/api/admin/customer/pushReleaseUser",
  415. data: {
  416. id: deletedIds,
  417. },
  418. success: function (data) {
  419. let thedata = data.data;
  420. if (!thedata) {
  421. if (data.error && data.error.length) {
  422. message.warning(data.error[0].message);
  423. }
  424. thedata = {};
  425. } else {
  426. message.success("移除成功");
  427. this.loadData(
  428. dataSource.length === 1
  429. ? ispage === 1
  430. ? 1
  431. : ispage - 1
  432. : ispage
  433. );
  434. }
  435. }.bind(this),
  436. }).always(
  437. function () {
  438. this.setState({
  439. loading: false,
  440. });
  441. }.bind(this)
  442. );
  443. },
  444. onCancel() {},
  445. });
  446. }
  447. selectAuto(value, options) {
  448. this.setState({
  449. auto: value,
  450. });
  451. }
  452. // 跟进人查询
  453. followUp(e) {
  454. const { searchInfor } = this.state;
  455. this.setState({
  456. searchInfor: Object.assign(searchInfor, {
  457. aname: e,
  458. }),
  459. });
  460. $.ajax({
  461. method: "get",
  462. dataType: "json",
  463. crossDomain: false,
  464. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  465. data: {
  466. adminName: e,
  467. },
  468. success: function (data) {
  469. let thedata = data.data;
  470. if (!thedata) {
  471. if (data.error && data.error.length) {
  472. message.warning(data.error[0].message);
  473. }
  474. thedata = {};
  475. }
  476. this.setState({
  477. fjlist: thedata,
  478. });
  479. }.bind(this),
  480. }).always(
  481. function () {
  482. this.setState({
  483. loading: false,
  484. });
  485. }.bind(this)
  486. );
  487. }
  488. // 选中跟进人
  489. selectF(value) {
  490. const { searchInfor, fjlist } = this.state;
  491. const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
  492. this.setState({
  493. searchInfor: Object.assign(searchInfor, {
  494. aid: newdataSources.find((item) => item.name == value).id,
  495. }),
  496. });
  497. }
  498. //品类数据获取
  499. category() {
  500. $.ajax({
  501. method: "get",
  502. dataType: "json",
  503. crossDomain: false,
  504. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  505. data: {},
  506. success: function (data) {
  507. let thedata = data.data;
  508. let theArr = [];
  509. if (!thedata) {
  510. if (data.error && data.error.length) {
  511. message.warning(data.error[0].message);
  512. }
  513. thedata = {};
  514. } else {
  515. thedata.map(function (item, index) {
  516. theArr.push({
  517. value: item.id,
  518. key: item.cname,
  519. });
  520. });
  521. }
  522. this.setState({
  523. categoryArr: theArr,
  524. });
  525. }.bind(this),
  526. });
  527. }
  528. //查看跟进记录列表
  529. loadVisit(pageNo) {
  530. this.setState({
  531. loading: true,
  532. });
  533. $.ajax({
  534. method: "get",
  535. dataType: "json",
  536. crossDomain: false,
  537. url: globalConfig.context + "/api/admin/customer/listFollowHistory",
  538. data: {
  539. pageNo: pageNo || 1,
  540. pageSize: this.state.paginations.pageSize,
  541. uid: this.props.data.id, //名称1
  542. },
  543. success: function (data) {
  544. let theArr = [];
  545. if (data.error.length || data.data.list == "") {
  546. if (data.error && data.error.length) {
  547. message.warning(data.error[0].message);
  548. }
  549. } else {
  550. for (let i = 0; i < data.data.list.length; i++) {
  551. let thisdata = data.data.list[i];
  552. theArr.push(thisdata);
  553. }
  554. this.state.paginations.current = data.data.pageNo;
  555. this.state.paginations.total = data.data.totalCount;
  556. this.setState({
  557. ispage: data.data.pageNo,
  558. });
  559. }
  560. if (data.data.list && !data.data.list.length) {
  561. this.state.paginations.current = 0;
  562. this.state.paginations.total = 0;
  563. }
  564. this.setState({
  565. visitArrList: theArr,
  566. paginations: this.state.paginations,
  567. });
  568. }.bind(this),
  569. }).always(
  570. function () {
  571. this.setState({
  572. loading: false,
  573. });
  574. }.bind(this)
  575. );
  576. }
  577. close(e, s) {
  578. this.setState({
  579. visitModuls: false,
  580. });
  581. }
  582. render() {
  583. const {
  584. columns,
  585. selectedRowKeys,
  586. cityList,
  587. areaList,
  588. changeList,
  589. searchInfor,
  590. channeOb,
  591. dataSource,
  592. } = this.state;
  593. const rowSelection = {
  594. selectedRowKeys,
  595. onChange: this.onSelectChange.bind(this),
  596. hideDefaultSelections: true,
  597. type: "radio",
  598. };
  599. const hasSelected = this.state.selectedRowKeys.length > 0;
  600. const dataSources = this.state.customerArr || [];
  601. const options = dataSources.map((group) => (
  602. <Select.Option key={group.id} value={group.name}>
  603. {group.name}
  604. </Select.Option>
  605. ));
  606. const newdataSources =
  607. JSON.stringify(this.state.fjlist) == "{}" ? [] : this.state.fjlist;
  608. const newoptions = newdataSources.map((group) => (
  609. <Select.Option key={group.id} value={group.name}>
  610. {group.name}
  611. </Select.Option>
  612. ));
  613. return (
  614. <div className="user-content">
  615. <div className="content-title" style={{ marginBottom: 10 }}>
  616. <span style={{ fontWeight: 900, fontSize: 16 }}>渠道单位</span>
  617. </div>
  618. <Tabs defaultActiveKey="1">
  619. <TabPane tab="搜索" key="1">
  620. <div style={{ padding: "10px 0" }}>
  621. <Form layout="inline">
  622. <FormItem>
  623. <Input
  624. placeholder={"请输入渠道名称"}
  625. value={searchInfor.name || undefined}
  626. onChange={(e) => {
  627. this.setState({
  628. searchInfor: Object.assign(searchInfor, {
  629. name: e.target.value,
  630. }),
  631. });
  632. }}
  633. />
  634. </FormItem>
  635. <FormItem>
  636. <Select
  637. placeholder={"选择省份"}
  638. style={{ width: 100 }}
  639. value={this.getVal(provinceList, searchInfor.province)}
  640. onChange={(e) => {
  641. for (const items of provinceList) {
  642. if (items.id == e) {
  643. this.setState({
  644. cityList: items.cityList,
  645. areaList: [],
  646. searchInfor: Object.assign(searchInfor, {
  647. province: items.id,
  648. city: undefined,
  649. area: undefined,
  650. }),
  651. });
  652. }
  653. }
  654. }}
  655. >
  656. {provinceList.map((item, index) => (
  657. <Option key={item.id}>{item.name}</Option>
  658. ))}
  659. </Select>
  660. </FormItem>
  661. <FormItem>
  662. <Select
  663. placeholder={"选择城市"}
  664. style={{ width: 100 }}
  665. value={this.getVal(cityList, searchInfor.city)}
  666. onChange={(e) => {
  667. for (const items of cityList) {
  668. if (items.id == e) {
  669. this.setState({
  670. areaList: items.areaList,
  671. searchInfor: Object.assign(searchInfor, {
  672. city: items.id,
  673. area: undefined,
  674. }),
  675. });
  676. }
  677. }
  678. }}
  679. >
  680. {cityList.map((cit, cin) => (
  681. <Option key={cit.id}>{cit.name}</Option>
  682. ))}
  683. </Select>
  684. </FormItem>
  685. <FormItem>
  686. <Select
  687. placeholder={"选择地区"}
  688. style={{ width: 100 }}
  689. value={this.getVal(areaList, searchInfor.area)}
  690. onChange={(e) => {
  691. for (const items of areaList) {
  692. if (items.id == e) {
  693. this.setState({
  694. searchInfor: Object.assign(searchInfor, {
  695. area: items.id,
  696. }),
  697. });
  698. }
  699. }
  700. }}
  701. >
  702. {areaList.map((cit, cin) => (
  703. <Option key={cit.id}>{cit.name}</Option>
  704. ))}
  705. </Select>
  706. </FormItem>
  707. <FormItem>
  708. <AutoComplete
  709. className="certain-category-search"
  710. dropdownClassName="certain-category-search-dropdown"
  711. dropdownMatchSelectWidth={false}
  712. style={{ width: "120px" }}
  713. dataSource={newoptions}
  714. placeholder="跟进人"
  715. value={searchInfor.aname || undefined}
  716. onChange={this.followUp.bind(this)}
  717. filterOption={true}
  718. onSelect={this.selectF.bind(this)}
  719. >
  720. <Input />
  721. </AutoComplete>
  722. </FormItem>
  723. <FormItem>
  724. <Select
  725. placeholder={"渠道类型"}
  726. style={{ width: 130 }}
  727. value={searchInfor.type || undefined}
  728. onChange={(e) => {
  729. this.setState({
  730. searchInfor: Object.assign(searchInfor, {
  731. type: e,
  732. }),
  733. });
  734. }}
  735. >
  736. {channeOb.map((it, ins) => (
  737. <Option key={it.val}>{it.name}</Option>
  738. ))}
  739. </Select>
  740. </FormItem>
  741. <FormItem>
  742. <RangePicker
  743. value={[
  744. searchInfor.startDate
  745. ? moment(searchInfor.startDate)
  746. : null,
  747. searchInfor.endDate ? moment(searchInfor.endDate) : null,
  748. ]}
  749. onChange={(data, dataString) => {
  750. this.setState({
  751. searchInfor: Object.assign(searchInfor, {
  752. startDate: dataString[0],
  753. endDate: dataString[1],
  754. }),
  755. });
  756. }}
  757. />
  758. </FormItem>
  759. <Button
  760. type="primary"
  761. onClick={() => {
  762. this.loadData();
  763. }}
  764. style={{ marginRight: "10px" }}
  765. >
  766. 搜索
  767. </Button>
  768. <Button
  769. onClick={this.resetAll.bind(this)}
  770. style={{ marginRight: "10px" }}
  771. >
  772. 重置
  773. </Button>
  774. </Form>
  775. </div>
  776. </TabPane>
  777. <TabPane tab="操作" key="2">
  778. <div
  779. style={{
  780. marginLeft: 10,
  781. marginTop: 10,
  782. paddingBottom: 10,
  783. display: "flex",
  784. }}
  785. >
  786. <div style={{ flex: 1 }}>
  787. {/* <AutoComplete
  788. className="certain-category-search"
  789. dropdownClassName="certain-category-search-dropdown"
  790. dropdownMatchSelectWidth={false}
  791. style={{ width: "120px" }}
  792. dataSource={options}
  793. placeholder="输入转交人姓名"
  794. value={this.state.auto}
  795. onChange={this.httpChange.bind(this)}
  796. filterOption={true}
  797. onBlur={this.blurChange.bind(this)}
  798. onSelect={this.selectAuto.bind(this)}
  799. disabled={!hasSelected}
  800. >
  801. <Input />
  802. </AutoComplete>
  803. <Button
  804. type="primary"
  805. onClick={this.showConfirm.bind(this)}
  806. style={{ marginLeft: 10 }}
  807. disabled={!hasSelected}
  808. >
  809. 转交
  810. </Button> */}
  811. <Button
  812. type="primary"
  813. onClick={() => {
  814. this.setState({
  815. mvisible: "channellog",
  816. });
  817. }}
  818. style={{ marginLeft: "10px" }}
  819. disabled={!hasSelected}
  820. >
  821. 渠道日志
  822. </Button>
  823. <Button
  824. type="primary"
  825. onClick={this.remove.bind(this)}
  826. style={{ marginLeft: "10px" }}
  827. disabled={!hasSelected}
  828. >
  829. 移出渠道
  830. </Button>
  831. <Button
  832. type="primary"
  833. onClick={() => {
  834. this.setState({
  835. mvisible: "changelog",
  836. });
  837. }}
  838. style={{ marginLeft: "10px" }}
  839. disabled={!hasSelected}
  840. >
  841. 更改日志
  842. </Button>
  843. </div>
  844. <Button
  845. type="primary"
  846. onClick={this.addClick.bind(this)}
  847. style={{ marginLeft: "10px" }}
  848. >
  849. 新增渠道
  850. </Button>
  851. </div>
  852. </TabPane>
  853. <TabPane tab="更改表格显示数据" key="3">
  854. <div style={{ marginLeft: 10 }}>
  855. <ChooseList
  856. columns={columns}
  857. changeFn={this.changeList.bind(this)}
  858. changeList={changeList}
  859. top={55}
  860. margin={11}
  861. />
  862. </div>
  863. </TabPane>
  864. </Tabs>
  865. <div className="patent-table">
  866. <Spin spinning={this.state.loading}>
  867. <Table
  868. bordered
  869. size="middle"
  870. // scroll={this.state.scroll}
  871. columns={changeList ? changeList : columns}
  872. onRowDoubleClick={(e) => {
  873. this.setState({
  874. mvisible: "detail",
  875. rowdata: e,
  876. });
  877. }}
  878. dataSource={this.state.dataSource}
  879. pagination={this.state.pagination}
  880. rowSelection={rowSelection}
  881. />
  882. </Spin>
  883. </div>
  884. {this.state.informationTransferVisible && (
  885. <Modal
  886. visible={this.state.informationTransferVisible}
  887. title="提醒"
  888. onCancel={() => {
  889. this.setState({
  890. informationTransferVisible: false,
  891. });
  892. }}
  893. footer={[
  894. <Button
  895. key="1"
  896. size="large"
  897. type={"primary"}
  898. onClick={() => {
  899. this.changeAssigner(1);
  900. }}
  901. >
  902. 需要
  903. </Button>,
  904. <Button
  905. key="2"
  906. size="large"
  907. type={"danger"}
  908. onClick={() => {
  909. this.changeAssigner(0);
  910. }}
  911. >
  912. 不需要
  913. </Button>,
  914. ]}
  915. >
  916. 请确定,是否将客户资料一并转交!选择“需要”,系统将全部客户资料一并转交!选择“不需要”,原客户资料保存您的客户资料中,请注意客户资料的更新维护,谢谢
  917. </Modal>
  918. )}
  919. {this.state.mvisible == "add" && (
  920. <AddChannel
  921. showDesc={this.state.mvisible}
  922. closeDesc={this.closeDesc.bind(this)}
  923. />
  924. )}
  925. {this.state.mvisible == "channellog" && (
  926. <ChannelLog
  927. cancel={this.closeDesc.bind(this)}
  928. visible={this.state.mvisible}
  929. id={dataSource[selectedRowKeys[0]].id}
  930. />
  931. )}
  932. {this.state.mvisible == "changelog" && (
  933. <ChangeLog
  934. cancel={this.closeDesc.bind(this)}
  935. visible={this.state.mvisible}
  936. id={dataSource[selectedRowKeys[0]].id}
  937. />
  938. )}
  939. {this.state.mvisible == "detail" && (
  940. <ChannelDetail
  941. cancel={this.closeDesc.bind(this)}
  942. visible={this.state.mvisible}
  943. IntentionData={this.state.rowdata}
  944. categoryArr={this.state.categoryArr}
  945. />
  946. )}
  947. <FollowDetail
  948. categoryArr={this.state.categoryArr}
  949. followData={this.state.followData}
  950. visitModul={this.state.visitModuls}
  951. closeDesc={this.close.bind(this)}
  952. loadData={this.loadVisit.bind(this)}
  953. />
  954. </div>
  955. );
  956. }
  957. }
  958. export default ChannelUnit;