index.jsx 29 KB

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