index.jsx 29 KB

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