index.jsx 29 KB

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