index.jsx 28 KB

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