index.jsx 28 KB

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