index.jsx 28 KB

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