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. const _this = this
  399. Modal.confirm({
  400. title: "您确定将以下渠道移至公共渠道吗??",
  401. content: (
  402. <span style={{ color: "red" }}>
  403. 移除后,以下客户将被别人领取!
  404. <div style={{ marginTop: "5px", color: "#000" }}>
  405. {dataSource[selectedRowKeys[0]].name}
  406. </div>
  407. </span>
  408. ),
  409. onOk() {
  410. let deletedIds = dataSource[selectedRowKeys[0]].id;
  411. $.ajax({
  412. method: "get",
  413. dataType: "json",
  414. crossDomain: false,
  415. url: globalConfig.context + "/api/admin/customer/pushReleaseUser",
  416. data: {
  417. id: deletedIds,
  418. },
  419. success: function (data) {
  420. let thedata = data.data;
  421. if (!thedata) {
  422. if (data.error && data.error.length) {
  423. message.warning(data.error[0].message);
  424. }
  425. thedata = {};
  426. } else {
  427. message.success("移除成功");
  428. }
  429. _this.loadData(
  430. dataSource.length === 1
  431. ? ispage === 1
  432. ? 1
  433. : ispage - 1
  434. : ispage
  435. )
  436. }.bind(this),
  437. }).always(
  438. function () {
  439. _this.setState({
  440. loading: false,
  441. });
  442. }.bind(this)
  443. );
  444. },
  445. onCancel() { },
  446. });
  447. }
  448. selectAuto(value, options) {
  449. this.setState({
  450. auto: value,
  451. });
  452. }
  453. // 跟进人查询
  454. followUp(e) {
  455. const { searchInfor } = this.state;
  456. this.setState({
  457. searchInfor: Object.assign(searchInfor, {
  458. aname: e,
  459. }),
  460. });
  461. $.ajax({
  462. method: "get",
  463. dataType: "json",
  464. crossDomain: false,
  465. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  466. data: {
  467. adminName: e,
  468. },
  469. success: function (data) {
  470. let thedata = data.data;
  471. if (!thedata) {
  472. if (data.error && data.error.length) {
  473. message.warning(data.error[0].message);
  474. }
  475. thedata = {};
  476. }
  477. this.setState({
  478. fjlist: thedata,
  479. });
  480. }.bind(this),
  481. }).always(
  482. function () {
  483. this.setState({
  484. loading: false,
  485. });
  486. }.bind(this)
  487. );
  488. }
  489. // 选中跟进人
  490. selectF(value) {
  491. const { searchInfor, fjlist } = this.state;
  492. const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
  493. this.setState({
  494. searchInfor: Object.assign(searchInfor, {
  495. aid: newdataSources.find((item) => item.name == value).id,
  496. }),
  497. });
  498. }
  499. //品类数据获取
  500. category() {
  501. $.ajax({
  502. method: "get",
  503. dataType: "json",
  504. crossDomain: false,
  505. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  506. data: {},
  507. success: function (data) {
  508. let thedata = data.data;
  509. let theArr = [];
  510. if (!thedata) {
  511. if (data.error && data.error.length) {
  512. message.warning(data.error[0].message);
  513. }
  514. thedata = {};
  515. } else {
  516. thedata.map(function (item, index) {
  517. theArr.push({
  518. value: item.id,
  519. key: item.cname,
  520. });
  521. });
  522. }
  523. this.setState({
  524. categoryArr: theArr,
  525. });
  526. }.bind(this),
  527. });
  528. }
  529. //查看跟进记录列表
  530. loadVisit(pageNo) {
  531. this.setState({
  532. loading: true,
  533. });
  534. $.ajax({
  535. method: "get",
  536. dataType: "json",
  537. crossDomain: false,
  538. url: globalConfig.context + "/api/admin/customer/listFollowHistory",
  539. data: {
  540. pageNo: pageNo || 1,
  541. pageSize: this.state.paginations.pageSize,
  542. uid: this.props.data.id, //名称1
  543. },
  544. success: function (data) {
  545. let theArr = [];
  546. if (data.error.length || data.data.list == "") {
  547. if (data.error && data.error.length) {
  548. message.warning(data.error[0].message);
  549. }
  550. } else {
  551. for (let i = 0; i < data.data.list.length; i++) {
  552. let thisdata = data.data.list[i];
  553. theArr.push(thisdata);
  554. }
  555. this.state.paginations.current = data.data.pageNo;
  556. this.state.paginations.total = data.data.totalCount;
  557. this.setState({
  558. ispage: data.data.pageNo,
  559. });
  560. }
  561. if (data.data.list && !data.data.list.length) {
  562. this.state.paginations.current = 0;
  563. this.state.paginations.total = 0;
  564. }
  565. this.setState({
  566. visitArrList: theArr,
  567. paginations: this.state.paginations,
  568. });
  569. }.bind(this),
  570. }).always(
  571. function () {
  572. this.setState({
  573. loading: false,
  574. });
  575. }.bind(this)
  576. );
  577. }
  578. close(e, s) {
  579. this.setState({
  580. visitModuls: false,
  581. });
  582. }
  583. render() {
  584. const {
  585. columns,
  586. selectedRowKeys,
  587. cityList,
  588. areaList,
  589. changeList,
  590. searchInfor,
  591. channeOb,
  592. dataSource,
  593. } = this.state;
  594. const rowSelection = {
  595. selectedRowKeys,
  596. onChange: this.onSelectChange.bind(this),
  597. hideDefaultSelections: true,
  598. type: "radio",
  599. };
  600. const hasSelected = this.state.selectedRowKeys.length > 0;
  601. const dataSources = this.state.customerArr || [];
  602. const options = dataSources.map((group) => (
  603. <Select.Option key={group.id} value={group.name}>
  604. {group.name}
  605. </Select.Option>
  606. ));
  607. const newdataSources =
  608. JSON.stringify(this.state.fjlist) == "{}" ? [] : this.state.fjlist;
  609. const newoptions = newdataSources.map((group) => (
  610. <Select.Option key={group.id} value={group.name}>
  611. {group.name}
  612. </Select.Option>
  613. ));
  614. return (
  615. <div className="user-content">
  616. <div className="content-title" style={{ marginBottom: 10 }}>
  617. <span style={{ fontWeight: 900, fontSize: 16 }}>公共渠道列表</span>
  618. </div>
  619. <Tabs defaultActiveKey="1" >
  620. <TabPane tab="搜索" key="1">
  621. <div>
  622. <Form layout="inline">
  623. <FormItem>
  624. <Input
  625. placeholder={"请输入渠道名称"}
  626. value={searchInfor.name || undefined}
  627. onChange={(e) => {
  628. this.setState({
  629. searchInfor: Object.assign(searchInfor, {
  630. name: e.target.value,
  631. }),
  632. });
  633. }}
  634. />
  635. </FormItem>
  636. <FormItem>
  637. <Select
  638. placeholder={"选择省份"}
  639. style={{ width: 100 }}
  640. value={this.getVal(provinceList, searchInfor.province)}
  641. onChange={(e) => {
  642. for (const items of provinceList) {
  643. if (items.id == e) {
  644. this.setState({
  645. cityList: items.cityList,
  646. areaList: [],
  647. searchInfor: Object.assign(searchInfor, {
  648. province: items.id,
  649. city: undefined,
  650. area: undefined,
  651. }),
  652. });
  653. }
  654. }
  655. }}
  656. >
  657. {provinceList.map((item, index) => (
  658. <Option key={item.id}>{item.name}</Option>
  659. ))}
  660. </Select>
  661. </FormItem>
  662. <FormItem>
  663. <Select
  664. placeholder={"选择城市"}
  665. style={{ width: 100 }}
  666. value={this.getVal(cityList, searchInfor.city)}
  667. onChange={(e) => {
  668. for (const items of cityList) {
  669. if (items.id == e) {
  670. this.setState({
  671. areaList: items.areaList,
  672. searchInfor: Object.assign(searchInfor, {
  673. city: items.id,
  674. area: undefined,
  675. }),
  676. });
  677. }
  678. }
  679. }}
  680. >
  681. {cityList.map((cit, cin) => (
  682. <Option key={cit.id}>{cit.name}</Option>
  683. ))}
  684. </Select>
  685. </FormItem>
  686. <FormItem>
  687. <Select
  688. placeholder={"选择地区"}
  689. style={{ width: 100 }}
  690. value={this.getVal(areaList, searchInfor.area)}
  691. onChange={(e) => {
  692. for (const items of areaList) {
  693. if (items.id == e) {
  694. this.setState({
  695. searchInfor: Object.assign(searchInfor, {
  696. area: items.id,
  697. }),
  698. });
  699. }
  700. }
  701. }}
  702. >
  703. {areaList.map((cit, cin) => (
  704. <Option key={cit.id}>{cit.name}</Option>
  705. ))}
  706. </Select>
  707. </FormItem>
  708. {/* <FormItem>
  709. <AutoComplete
  710. className="certain-category-search"
  711. dropdownClassName="certain-category-search-dropdown"
  712. dropdownMatchSelectWidth={false}
  713. style={{ width: "120px" }}
  714. dataSource={newoptions}
  715. placeholder="跟进人"
  716. value={searchInfor.aname || undefined}
  717. onChange={this.followUp.bind(this)}
  718. filterOption={true}
  719. onSelect={this.selectF.bind(this)}
  720. >
  721. <Input />
  722. </AutoComplete>
  723. </FormItem> */}
  724. <FormItem>
  725. <Select
  726. placeholder={"渠道类型"}
  727. style={{ width: 130 }}
  728. value={searchInfor.type || undefined}
  729. onChange={(e) => {
  730. this.setState({
  731. searchInfor: Object.assign(searchInfor, {
  732. type: e,
  733. }),
  734. });
  735. }}
  736. >
  737. {channeOb.map((it, ins) => (
  738. <Option key={it.val}>{it.name}</Option>
  739. ))}
  740. </Select>
  741. </FormItem>
  742. <FormItem>
  743. <RangePicker
  744. value={[
  745. searchInfor.startDate
  746. ? moment(searchInfor.startDate)
  747. : null,
  748. searchInfor.endDate ? moment(searchInfor.endDate) : null,
  749. ]}
  750. onChange={(data, dataString) => {
  751. this.setState({
  752. searchInfor: Object.assign(searchInfor, {
  753. startDate: dataString[0],
  754. endDate: dataString[1],
  755. }),
  756. });
  757. }}
  758. />
  759. </FormItem>
  760. <Button
  761. type="primary"
  762. onClick={() => {
  763. this.loadData();
  764. }}
  765. style={{ marginRight: "10px" }}
  766. >
  767. 搜索
  768. </Button>
  769. <Button
  770. onClick={this.resetAll.bind(this)}
  771. style={{ marginRight: "10px" }}
  772. >
  773. 重置
  774. </Button>
  775. </Form>
  776. </div>
  777. </TabPane>
  778. <TabPane tab="操作" key="2">
  779. <div
  780. style={{
  781. marginLeft: 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;