intentionCustomer.jsx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913
  1. import React from 'react';
  2. import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form,Tabs,Modal } from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import moment from 'moment';
  6. import { citySelect, provinceList } from '@/NewDicProvinceList';
  7. import AddIntention from './addIntention.jsx';
  8. import { socialAttribute, industry, auditStatusL, lvl, currentMember } from '@/dataDic.js';
  9. import ZhuanjiaoDetail from "@/zhuanjiaoDetail.jsx";
  10. import {
  11. getSocialAttribute,
  12. beforeUploadFile,
  13. getLevel,
  14. ShowModal
  15. } from "@/tools.js";
  16. import FollowDetail from './followDetail.jsx'
  17. import IntentionDetail from './intentionDetail/intentionDetail.jsx'
  18. import ShowModalDiv from "@/showModal.jsx";
  19. import './customer.less';
  20. const {TabPane} = Tabs
  21. const IntentionCustomer = Form.create()(
  22. React.createClass({
  23. loadData(pageNo, apiUrl) {
  24. this.setState({
  25. visitModul: false,
  26. loading: true,
  27. ispage: pageNo,
  28. modalVisible: false,
  29. });
  30. let api = apiUrl ? apiUrl : this.props.ApiUrl;
  31. $.ajax({
  32. method: "post",
  33. dataType: "json",
  34. crossDomain: false,
  35. url: globalConfig.context + api,
  36. data: {
  37. pageNo: pageNo || 1,
  38. pageSize: this.state.pagination.pageSize,
  39. level: this.state.level ? this.state.level : undefined,
  40. name: this.state.nameSearch,
  41. province: !this.state.addressSearch.length
  42. ? this.state.provinceSearch
  43. : this.state.addressSearch[0],
  44. city: !this.state.addressSearch.length
  45. ? ""
  46. : this.state.addressSearch[1],
  47. startDate: this.state.releaseDate[0],
  48. endDate: this.state.releaseDate[1],
  49. },
  50. success: function (data) {
  51. ShowModal(this);
  52. let theArr = [];
  53. if (data.error.length || data.data.list == "") {
  54. if (data.error && data.error.length) {
  55. message.warning(data.error[0].message);
  56. }
  57. } else {
  58. for (let i = 0; i < data.data.list.length; i++) {
  59. let thisdata = data.data.list[i];
  60. let diqu =
  61. (thisdata.province == null ? "" : thisdata.province) +
  62. (thisdata.city == null ? "" : "-" + thisdata.city) +
  63. (thisdata.area == null ? "" : "-" + thisdata.area);
  64. theArr.push({
  65. key: i,
  66. id: thisdata.uid,
  67. aid: thisdata.aid,
  68. name: thisdata.name,
  69. contacts: thisdata.contacts,
  70. contactMobile: thisdata.contactMobile,
  71. industry: thisdata.industry,
  72. societyTag: thisdata.societyTag,
  73. lastFollowTime:
  74. thisdata.lastFollowTime &&
  75. thisdata.lastFollowTime.split(" ")[0],
  76. transferTime:
  77. thisdata.transferTime && thisdata.transferTime.split(" ")[0],
  78. surplusFollowTime:
  79. thisdata.surplusFollowTime &&
  80. thisdata.surplusFollowTime.split(" ")[0],
  81. surplusSignTime:
  82. thisdata.surplusSignTime &&
  83. thisdata.surplusSignTime.split(" ")[0],
  84. locationProvince: diqu,
  85. level: thisdata.level,
  86. });
  87. }
  88. this.state.pagination.current = data.data.pageNo;
  89. this.state.pagination.total = data.data.totalCount;
  90. }
  91. if (data.data && data.data.list && !data.data.list.length) {
  92. this.state.pagination.current = 0;
  93. this.state.pagination.total = 0;
  94. }
  95. this.setState({
  96. dataSource: theArr,
  97. pagination: this.state.pagination,
  98. selectedRowKeys: [],
  99. });
  100. }.bind(this),
  101. }).always(
  102. function () {
  103. this.setState({
  104. loading: false,
  105. });
  106. }.bind(this)
  107. );
  108. },
  109. //品类数据获取
  110. category() {
  111. $.ajax({
  112. method: "get",
  113. dataType: "json",
  114. crossDomain: false,
  115. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  116. data: {},
  117. success: function (data) {
  118. let thedata = data.data;
  119. let theArr = [];
  120. if (!thedata) {
  121. if (data.error && data.error.length) {
  122. message.warning(data.error[0].message);
  123. }
  124. thedata = {};
  125. } else {
  126. thedata.map(function (item, index) {
  127. theArr.push({
  128. value: item.id,
  129. key: item.cname,
  130. });
  131. });
  132. }
  133. this.setState({
  134. categoryArr: theArr,
  135. });
  136. }.bind(this),
  137. });
  138. },
  139. getInitialState() {
  140. return {
  141. addressSearch: [],
  142. orgCodeUrl: [],
  143. companyLogoUrl: [],
  144. visible: false,
  145. zhuanjiaoVisible: false,
  146. searchMore: true,
  147. releaseDate: [],
  148. categoryArr: [],
  149. visitModul: false,
  150. keys: false,
  151. detailApi: "",
  152. followData: {},
  153. selectedRowKeys: [],
  154. selectedRowKey: [],
  155. selectedRows: [],
  156. loading: false,
  157. modalVisible: false,
  158. pagination: {
  159. defaultCurrent: 1,
  160. defaultPageSize: 10,
  161. showQuickJumper: true,
  162. pageSize: 10,
  163. onChange: function (page) {
  164. this.loadData(page);
  165. }.bind(this),
  166. showTotal: function (total) {
  167. return "共" + total + "条数据";
  168. },
  169. },
  170. columns: [
  171. {
  172. title: "客户名称",
  173. dataIndex: "name",
  174. key: "name",
  175. },
  176. {
  177. title: "地区",
  178. dataIndex: "locationProvince",
  179. key: "locationProvince",
  180. },
  181. {
  182. title: "联系人",
  183. dataIndex: "contacts",
  184. key: "contacts",
  185. },
  186. {
  187. title: "联系电话",
  188. dataIndex: "contactMobile",
  189. key: "contactMobile",
  190. },
  191. {
  192. title: "社会性质",
  193. dataIndex: "societyTag",
  194. key: "societyTag",
  195. render: (text) => {
  196. return getSocialAttribute(text);
  197. },
  198. },
  199. {
  200. title: "客户初始时间",
  201. dataIndex: "transferTime",
  202. key: "transferTime",
  203. },
  204. {
  205. title: "剩余私有天数",
  206. dataIndex: "surplusFollowTime",
  207. key: "surplusFollowTime",
  208. },
  209. {
  210. title: "最新跟进时间",
  211. dataIndex: "lastFollowTime",
  212. key: "lastFollowTime",
  213. },
  214. {
  215. title: "客户等级",
  216. dataIndex: "level",
  217. key: "level",
  218. render: (text) => {
  219. return getLevel(text);
  220. },
  221. },
  222. {
  223. title: "跟进操作",
  224. dataIndex: "abc",
  225. key: "abc",
  226. render: (text, record, index) => {
  227. return (
  228. <div>
  229. <Button
  230. onClick={(e) => {
  231. e.stopPropagation(), this.visit(record);
  232. }}
  233. type="primary"
  234. >
  235. 客户跟进
  236. </Button>
  237. </div>
  238. );
  239. },
  240. },
  241. ],
  242. data: [],
  243. dataman: [],
  244. dataSource: [],
  245. visitArrList: [],
  246. searchTime: [,],
  247. };
  248. },
  249. rankO(rank) {
  250. let deletedIds;
  251. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  252. let rowItem = this.state.selectedRows[idx];
  253. if (rowItem.id) {
  254. deletedIds = rowItem.id;
  255. }
  256. }
  257. $.ajax({
  258. method: "get",
  259. dataType: "json",
  260. crossDomain: false,
  261. url: globalConfig.context + "/api/admin/customer/updateUserLevel",
  262. data: {
  263. id: deletedIds, //客户的ID
  264. level: rank,
  265. },
  266. }).done(
  267. function (data) {
  268. if (!data.error.length) {
  269. message.success("操作成功!");
  270. this.setState({
  271. loading: false,
  272. });
  273. } else {
  274. message.warning(data.error[0].message);
  275. }
  276. this.loadData(this.state.ispage);
  277. }.bind(this)
  278. );
  279. },
  280. //进入新增拜访记录
  281. visit(e) {
  282. this.setState({
  283. followData: e,
  284. visitModul: true,
  285. modalVisible: false,
  286. });
  287. },
  288. //列表删除功能
  289. delectRow() {
  290. let deletedIds;
  291. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  292. let rowItem = this.state.selectedRows[idx];
  293. if (rowItem.id) {
  294. deletedIds = rowItem.id;
  295. }
  296. }
  297. this.setState({
  298. loading: true,
  299. selectedRowKeys: [],
  300. });
  301. $.ajax({
  302. method: "get",
  303. dataType: "json",
  304. crossDomain: false,
  305. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  306. data: {
  307. uid: deletedIds, //删除的ID
  308. },
  309. }).done(
  310. function (data) {
  311. if (!data.error.length) {
  312. message.success("删除成功!");
  313. this.setState({
  314. loading: false,
  315. });
  316. } else {
  317. message.warning(data.error[0].message);
  318. }
  319. this.loadData(this.state.ispage);
  320. }.bind(this)
  321. );
  322. },
  323. componentWillMount() {
  324. //城市
  325. let Province = [];
  326. provinceList.map(function (item) {
  327. var id = String(item.id);
  328. Province.push(
  329. <Select.Option value={id} key={item.name}>
  330. {item.name}
  331. </Select.Option>
  332. );
  333. });
  334. //行业
  335. let intentionalArr = [];
  336. industry.map(function (item) {
  337. intentionalArr.push(
  338. <Select.Option value={item.value} key={item.key}>
  339. {item.key}
  340. </Select.Option>
  341. );
  342. });
  343. //会员等级
  344. let lvlArr = [];
  345. lvl.map(function (item) {
  346. lvlArr.push(
  347. <Select.Option value={item.value} key={item.key}>
  348. {item.key}
  349. </Select.Option>
  350. );
  351. });
  352. //会员状态customerStatus
  353. let currentMemberArr = [];
  354. currentMember.map(function (item) {
  355. currentMemberArr.push(
  356. <Select.Option value={item.value} key={item.key}>
  357. {item.key}
  358. </Select.Option>
  359. );
  360. });
  361. this.state.Provinces = Province;
  362. this.state.intentionalOption = intentionalArr;
  363. this.state.lvlArrOption = lvlArr;
  364. this.state.currentMemberArrOption = currentMemberArr;
  365. this.loadData();
  366. this.category();
  367. },
  368. addClick() {
  369. this.state.RowData = {};
  370. this.setState({
  371. detailApi: this.props.detailApi,
  372. showDesc: true,
  373. modalVisible: false,
  374. visitModul: false,
  375. });
  376. },
  377. closeDesc(e, s) {
  378. this.state.basicState = e;
  379. this.state.visitModul = e;
  380. this.state.modalVisible = e;
  381. this.state.showDesc = e;
  382. if (s) {
  383. this.loadData(this.state.ispage);
  384. }
  385. },
  386. search() {
  387. this.loadData();
  388. },
  389. reset() {
  390. this.state.nameSearch = "";
  391. this.state.level = undefined;
  392. this.state.addressSearch = [];
  393. this.state.provinceSearch = undefined;
  394. this.state.citySearch = undefined;
  395. this.state.releaseDate[0] = undefined;
  396. this.state.releaseDate[1] = undefined;
  397. this.loadData();
  398. },
  399. searchSwitch() {
  400. this.setState({
  401. visitModul: false,
  402. searchMore: !this.state.searchMore,
  403. });
  404. },
  405. //整行点击
  406. tableRowClick(record, index) {
  407. this.state.visitModul = false;
  408. this.state.RowData = record;
  409. this.setState({
  410. selectedRowKeys: [],
  411. modalVisible: true,
  412. basicState: true,
  413. contactState: true,
  414. });
  415. },
  416. //指定转交人自动补全
  417. supervisor(e) {
  418. $.ajax({
  419. method: "get",
  420. dataType: "json",
  421. crossDomain: false,
  422. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  423. data: {
  424. adminName: e,
  425. },
  426. success: function (data) {
  427. let thedata = data.data;
  428. if (!thedata) {
  429. if (data.error && data.error.length) {
  430. message.warning(data.error[0].message);
  431. }
  432. thedata = {};
  433. }
  434. this.setState({
  435. customerArr: thedata,
  436. });
  437. }.bind(this),
  438. }).always(
  439. function () {
  440. this.setState({
  441. loading: false,
  442. });
  443. }.bind(this)
  444. );
  445. },
  446. //上级主管输入框失去焦点是判断客户是否存在
  447. selectAuto(value, options) {
  448. this.setState({
  449. auto: value,
  450. });
  451. },
  452. blurChange(e) {
  453. let theType = "";
  454. let contactLists = this.state.customerArr || [];
  455. if (e) {
  456. contactLists.map(function (item) {
  457. if (item.name == e.toString()) {
  458. theType = item.id;
  459. }
  460. });
  461. }
  462. this.setState({
  463. theTypes: theType,
  464. });
  465. },
  466. //值改变时请求客户名称
  467. httpChange(e) {
  468. if (e.length >= 1) {
  469. this.supervisor(e);
  470. }
  471. this.setState({
  472. auto: e,
  473. });
  474. },
  475. //转交
  476. changeAssigner() {
  477. if (this.state.theTypes) {
  478. this.setState({
  479. selectedRowKeys: [],
  480. });
  481. let changeIds, oldAid;
  482. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  483. let rowItem = this.state.selectedRows[idx];
  484. if (rowItem.id) {
  485. oldAid = rowItem.aid;
  486. changeIds = rowItem.id;
  487. }
  488. }
  489. $.ajax({
  490. method: "get",
  491. dataType: "json",
  492. crossDomain: false,
  493. url: globalConfig.context + "/api/admin/customer/transferToOther",
  494. data: {
  495. uid: changeIds, //这一行数据的ID
  496. aid: this.state.theTypes, //指定转交人的ID
  497. oldAid: oldAid,
  498. },
  499. }).done(
  500. function (data) {
  501. if (!data.error.length) {
  502. message.success("转交成功!");
  503. this.setState({
  504. auto: "",
  505. loading: false,
  506. });
  507. } else {
  508. message.warning(data.error[0].message);
  509. }
  510. this.loadData(
  511. Math.min(
  512. this.state.ispage == undefined ? 1 : this.state.ispage,
  513. Math.ceil((this.state.pagination.total - 1) / 10)
  514. )
  515. );
  516. }.bind(this)
  517. );
  518. } else {
  519. message.warning("请输入转交人姓名");
  520. }
  521. },
  522. //导出
  523. exportExec() {
  524. let departmentName = "",
  525. depart = this.state.departmentArr || [];
  526. depart.map((item) => {
  527. if (this.state.departmentId == item.id) {
  528. departmentName = item.name;
  529. return;
  530. }
  531. });
  532. let data = {
  533. name: this.state.nameSearch,
  534. province: this.state.provinceSearch,
  535. city: this.state.addressSearch,
  536. level: this.state.level,
  537. startDate: this.state.releaseDate[0],
  538. endDate: this.state.releaseDate[1],
  539. };
  540. window.location.href =
  541. globalConfig.context +
  542. "/api/admin/customer/privateUnitCustomerOutXls?" +
  543. $.param(data);
  544. },
  545. componentWillReceiveProps(nextProps) {
  546. if (nextProps.ApiUrl != this.props.ApiUrl) {
  547. if (!this.state.searchMore) {
  548. this.state.searchMore = true;
  549. }
  550. this.state.nameSearch = "";
  551. this.state.addressSearch = [];
  552. this.state.provinceSearch = undefined;
  553. this.state.citySearch = undefined;
  554. this.state.releaseDate[0] = undefined;
  555. this.state.releaseDate[1] = undefined;
  556. this.loadData(null, nextProps.ApiUrl);
  557. }
  558. },
  559. zhuanjiaoDetail(record) {
  560. this.setState({
  561. zhuanjiaoVisible: true,
  562. zhuanjiaoId: record.id,
  563. });
  564. },
  565. zhuanjiaoDetailCancel() {
  566. this.setState({
  567. zhuanjiaoVisible: false,
  568. });
  569. },
  570. showConfirm(fn, record) {
  571. Modal.confirm({
  572. title: "提示",
  573. content: (
  574. <span style={{ color: "red" }}>
  575. 确定转交此客户?
  576. </span>
  577. ),
  578. onOk() {
  579. fn(record);
  580. },
  581. onCancel() {},
  582. });
  583. },
  584. showConfirms(fn, record) {
  585. Modal.confirm({
  586. title: "您确定将当前客户移至公共客户吗?",
  587. content: (
  588. <span style={{ color: "red" }}>移除后,此客户将被别人领取!</span>
  589. ),
  590. onOk() {
  591. fn(record);
  592. },
  593. onCancel() {},
  594. });
  595. },
  596. release() {
  597. this.setState({
  598. loading: true
  599. })
  600. $.ajax({
  601. method: "get",
  602. dataType: "json",
  603. crossDomain: false,
  604. url: globalConfig.context + "/api/admin/customer/pushReleaseUser",
  605. data: {
  606. id: this.state.selectedRows[0].id,
  607. },
  608. success: function (data) {
  609. let thedata = data.data;
  610. if (!thedata) {
  611. if (data.error && data.error.length) {
  612. message.warning(data.error[0].message);
  613. }
  614. thedata = {};
  615. }else {
  616. message.success("移除成功");
  617. this.loadData()
  618. }
  619. }.bind(this),
  620. }).always(
  621. function () {
  622. this.setState({
  623. loading: false,
  624. });
  625. }.bind(this)
  626. );
  627. },
  628. render() {
  629. const FormItem = Form.Item;
  630. const rowSelection = {
  631. selectedRowKeys: this.state.selectedRowKeys,
  632. onChange: (selectedRowKeys, selectedRows) => {
  633. this.setState({
  634. modalVisible: false,
  635. selectedRows: selectedRows.slice(-1),
  636. selectedRowKeys: selectedRowKeys.slice(-1),
  637. });
  638. },
  639. onSelect: (recordt, selected, selectedRows) => {
  640. this.setState({
  641. modalVisible: false,
  642. recordt: recordt.id,
  643. });
  644. },
  645. };
  646. const hasSelected = this.state.selectedRowKeys.length > 0;
  647. const { RangePicker } = DatePicker;
  648. const dataSources = this.state.customerArr || [];
  649. const options = dataSources.map((group) => (
  650. <Select.Option key={group.id} value={group.name}>
  651. {group.name}
  652. </Select.Option>
  653. ));
  654. const intentionState = this.props.intentionState || "";
  655. return (
  656. <div className="user-content">
  657. <ShowModalDiv ShowModal={this.state.showModal} />
  658. <div className="content-title">
  659. <span>{!intentionState ? "私有单位客户" : "私有专家客户"}</span>
  660. </div>
  661. <div className="user-search">
  662. <Tabs
  663. defaultActiveKey="1"
  664. onChange={this.callback}
  665. className="test"
  666. >
  667. <TabPane tab="搜索" key="1">
  668. <Input
  669. placeholder="客户名称"
  670. value={this.state.nameSearch}
  671. style={{ width: 150, marginRight: 10, marginLeft: 10 }}
  672. onChange={(e) => {
  673. this.setState({ nameSearch: e.target.value });
  674. }}
  675. />
  676. <Select
  677. placeholder="省"
  678. style={{ width: 80 }}
  679. value={this.state.provinceSearch}
  680. onChange={(e) => {
  681. this.setState({ provinceSearch: e });
  682. }}
  683. >
  684. {this.state.Provinces}
  685. </Select>
  686. <span style={{ marginRight: "10px" }}>
  687. <Cascader
  688. options={citySelect()}
  689. value={this.state.addressSearch}
  690. placeholder="选择城市"
  691. onChange={(e, pre) => {
  692. this.setState({ addressSearch: e });
  693. }}
  694. />
  695. </span>
  696. <Select
  697. style={{ width: 120 }}
  698. value={this.state.level}
  699. onChange={(e) => {
  700. this.setState({ level: e });
  701. }}
  702. placeholder="请选择客户等级"
  703. >
  704. <Select.Option value="0">一般客户</Select.Option>
  705. <Select.Option value="1">意向客户</Select.Option>
  706. <Select.Option value="2">重点客户</Select.Option>
  707. </Select>
  708. <RangePicker
  709. value={[
  710. this.state.releaseDate[0]
  711. ? moment(this.state.releaseDate[0])
  712. : null,
  713. this.state.releaseDate[1]
  714. ? moment(this.state.releaseDate[1])
  715. : null,
  716. ]}
  717. onChange={(data, dataString) => {
  718. this.setState({ releaseDate: dataString });
  719. }}
  720. />
  721. <Button
  722. type="primary"
  723. style={{ marginLeft: "10px", marginRight: 10 }}
  724. onClick={this.search}
  725. >
  726. 搜索
  727. </Button>
  728. <Button onClick={this.reset}>重置</Button>
  729. </TabPane>
  730. {/*<Button onClick={() => { window.open(globalConfig.context + '/api/admin/customer/downloadTemplate?type=1') }}>下载批量导入模板</Button>
  731. <Upload
  732. name="file"
  733. action={globalConfig.context + "/api/admin/customer/uploadExcel"}
  734. beforeUpload={beforeUploadFile}
  735. showUploadList={false}
  736. onChange={(info) => {
  737. if (info.file.status !== 'uploading') {
  738. console.log(info.file, info.fileList);
  739. }
  740. if (info.file.status === 'done') {
  741. if (!info.file.response.error.length) {
  742. message.success(`${info.file.name} 文件上传成功!`);
  743. this.loadData();
  744. } else {
  745. message.warning(info.file.response.error[0].message);
  746. return;
  747. };
  748. } else if (info.file.status === 'error') {
  749. message.error(`${info.file.name} 文件上传失败。`);
  750. };
  751. }} >
  752. <Button>上传批量内容</Button>
  753. </Upload>
  754. {adminData.isSuperAdmin?<Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  755. <Button type="danger" style={{marginLeft:'10px'}}
  756. disabled={!hasSelected}
  757. >删除<Icon type="minus" />
  758. </Button>
  759. </Popconfirm>:''
  760. }*/}
  761. <TabPane tab="操作" key="2">
  762. <AutoComplete
  763. className="certain-category-search"
  764. dropdownClassName="certain-category-search-dropdown"
  765. dropdownMatchSelectWidth={false}
  766. dropdownStyle={{ width: 120 }}
  767. style={{ width: "120px" }}
  768. dataSource={options}
  769. placeholder="输入转交人姓名"
  770. value={this.state.auto}
  771. onChange={this.httpChange}
  772. filterOption={true}
  773. onBlur={this.blurChange}
  774. onSelect={this.selectAuto}
  775. disabled={!hasSelected}
  776. >
  777. <Input />
  778. </AutoComplete>
  779. <Button
  780. type="primary"
  781. // onClick={this.changeAssigner}
  782. onClick={(e) => {
  783. e.stopPropagation();
  784. this.showConfirm(this.changeAssigner);
  785. }}
  786. disabled={!hasSelected}
  787. style={{ marginRight: 10 }}
  788. >
  789. 转交
  790. </Button>
  791. <Button
  792. type="primary"
  793. style={{
  794. float: "right",
  795. marginTop: 10,
  796. marginLeft: 10,
  797. marginRight: 10,
  798. }}
  799. onClick={this.addClick}
  800. >
  801. 新增客户
  802. <Icon type="plus" />
  803. </Button>
  804. {/*<Button type="default" className="addButton" onClick={this.exportExec}>导出excel<Icon type="plus" /></Button>*/}
  805. {/* <div className="clearfix" style={{ marginTop: "5px" }}> */}
  806. <Button
  807. onClick={(e) => {
  808. e.stopPropagation(), this.rankO(0);
  809. }}
  810. type="primary"
  811. style={{ marginRight: "10px" }}
  812. disabled={!hasSelected}
  813. >
  814. 一般客户
  815. </Button>
  816. <Button
  817. onClick={(e) => {
  818. e.stopPropagation(), this.rankO(1);
  819. }}
  820. type="primary"
  821. style={{ marginRight: "10px" }}
  822. disabled={!hasSelected}
  823. >
  824. 意向客户
  825. </Button>
  826. <Button
  827. onClick={(e) => {
  828. e.stopPropagation(), this.rankO(2);
  829. }}
  830. type="primary"
  831. disabled={!hasSelected}
  832. >
  833. 重点客户
  834. </Button>
  835. <Button
  836. style={{ marginLeft: 10 }}
  837. onClick={(e) => {
  838. e.stopPropagation(),
  839. this.zhuanjiaoDetail(this.state.selectedRows[0]);
  840. }}
  841. type="primary"
  842. disabled={!hasSelected}
  843. >
  844. 转交记录
  845. </Button>
  846. <Button
  847. style={{ marginLeft: 10 }}
  848. onClick={(e) => {
  849. e.stopPropagation(), this.showConfirms(this.release);
  850. }}
  851. type="primary"
  852. disabled={!hasSelected}
  853. >
  854. 移除客户
  855. </Button>
  856. </TabPane>
  857. </Tabs>
  858. </div>
  859. <div className="patent-table">
  860. <Spin spinning={this.state.loading}>
  861. <Table
  862. columns={this.state.columns}
  863. dataSource={this.state.dataSource}
  864. rowSelection={rowSelection}
  865. pagination={this.state.pagination}
  866. onRowClick={this.tableRowClick}
  867. />
  868. </Spin>
  869. </div>
  870. <AddIntention
  871. api={this.state.detailApi}
  872. showDesc={this.state.showDesc}
  873. closeDesc={this.closeDesc}
  874. />
  875. <FollowDetail
  876. categoryArr={this.state.categoryArr}
  877. followData={this.state.followData}
  878. visitModul={this.state.visitModul}
  879. closeDesc={this.closeDesc}
  880. />
  881. <IntentionDetail
  882. categoryArr={this.state.categoryArr}
  883. detailApi={this.props.detailApi}
  884. IntentionData={this.state.RowData}
  885. modalVisible={this.state.modalVisible}
  886. closeDesc={this.closeDesc}
  887. basicState={this.state.basicState}
  888. contactState={this.state.contactState}
  889. />
  890. {this.state.zhuanjiaoVisible ? (
  891. <ZhuanjiaoDetail
  892. cancel={this.zhuanjiaoDetailCancel}
  893. visible={this.state.zhuanjiaoVisible}
  894. id={this.state.zhuanjiaoId}
  895. />
  896. ) : (
  897. ""
  898. )}
  899. </div>
  900. );
  901. },
  902. })
  903. );
  904. export default IntentionCustomer;