intentionCustomer.jsx 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. import React from 'react';
  2. import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form,Tabs } 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. render() {
  571. const FormItem = Form.Item;
  572. const rowSelection = {
  573. selectedRowKeys: this.state.selectedRowKeys,
  574. onChange: (selectedRowKeys, selectedRows) => {
  575. this.setState({
  576. modalVisible: false,
  577. selectedRows: selectedRows.slice(-1),
  578. selectedRowKeys: selectedRowKeys.slice(-1),
  579. });
  580. },
  581. onSelect: (recordt, selected, selectedRows) => {
  582. this.setState({
  583. modalVisible: false,
  584. recordt: recordt.id,
  585. });
  586. },
  587. };
  588. const hasSelected = this.state.selectedRowKeys.length > 0;
  589. const { RangePicker } = DatePicker;
  590. const dataSources = this.state.customerArr || [];
  591. const options = dataSources.map((group) => (
  592. <Select.Option key={group.id} value={group.name}>
  593. {group.name}
  594. </Select.Option>
  595. ));
  596. const intentionState = this.props.intentionState || "";
  597. return (
  598. <div className="user-content">
  599. <ShowModalDiv ShowModal={this.state.showModal} />
  600. <div className="content-title">
  601. <span>{!intentionState ? "私有单位客户" : "私有专家客户"}</span>
  602. </div>
  603. <div className="user-search">
  604. <Tabs
  605. defaultActiveKey="1"
  606. onChange={this.callback}
  607. className="test"
  608. >
  609. <TabPane tab="搜索" key="1">
  610. <Input
  611. placeholder="客户名称"
  612. value={this.state.nameSearch}
  613. style={{ width: 150, marginRight: 10, marginLeft: 10 }}
  614. onChange={(e) => {
  615. this.setState({ nameSearch: e.target.value });
  616. }}
  617. />
  618. <Select
  619. placeholder="省"
  620. style={{ width: 80 }}
  621. value={this.state.provinceSearch}
  622. onChange={(e) => {
  623. this.setState({ provinceSearch: e });
  624. }}
  625. >
  626. {this.state.Provinces}
  627. </Select>
  628. <span style={{ marginRight: "10px" }}>
  629. <Cascader
  630. options={citySelect()}
  631. value={this.state.addressSearch}
  632. placeholder="选择城市"
  633. onChange={(e, pre) => {
  634. this.setState({ addressSearch: e });
  635. }}
  636. />
  637. </span>
  638. <Select
  639. style={{ width: 120 }}
  640. value={this.state.level}
  641. onChange={(e) => {
  642. this.setState({ level: e });
  643. }}
  644. placeholder="请选择客户等级"
  645. >
  646. <Select.Option value="0">一般客户</Select.Option>
  647. <Select.Option value="1">意向客户</Select.Option>
  648. <Select.Option value="2">重点客户</Select.Option>
  649. </Select>
  650. <RangePicker
  651. value={[
  652. this.state.releaseDate[0]
  653. ? moment(this.state.releaseDate[0])
  654. : null,
  655. this.state.releaseDate[1]
  656. ? moment(this.state.releaseDate[1])
  657. : null,
  658. ]}
  659. onChange={(data, dataString) => {
  660. this.setState({ releaseDate: dataString });
  661. }}
  662. />
  663. <Button
  664. type="primary"
  665. style={{ marginLeft: "10px", marginRight: 10 }}
  666. onClick={this.search}
  667. >
  668. 搜索
  669. </Button>
  670. <Button onClick={this.reset}>重置</Button>
  671. </TabPane>
  672. {/*<Button onClick={() => { window.open(globalConfig.context + '/api/admin/customer/downloadTemplate?type=1') }}>下载批量导入模板</Button>
  673. <Upload
  674. name="file"
  675. action={globalConfig.context + "/api/admin/customer/uploadExcel"}
  676. beforeUpload={beforeUploadFile}
  677. showUploadList={false}
  678. onChange={(info) => {
  679. if (info.file.status !== 'uploading') {
  680. console.log(info.file, info.fileList);
  681. }
  682. if (info.file.status === 'done') {
  683. if (!info.file.response.error.length) {
  684. message.success(`${info.file.name} 文件上传成功!`);
  685. this.loadData();
  686. } else {
  687. message.warning(info.file.response.error[0].message);
  688. return;
  689. };
  690. } else if (info.file.status === 'error') {
  691. message.error(`${info.file.name} 文件上传失败。`);
  692. };
  693. }} >
  694. <Button>上传批量内容</Button>
  695. </Upload>
  696. {adminData.isSuperAdmin?<Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  697. <Button type="danger" style={{marginLeft:'10px'}}
  698. disabled={!hasSelected}
  699. >删除<Icon type="minus" />
  700. </Button>
  701. </Popconfirm>:''
  702. }*/}
  703. <TabPane tab="操作" key="2">
  704. <AutoComplete
  705. className="certain-category-search"
  706. dropdownClassName="certain-category-search-dropdown"
  707. dropdownMatchSelectWidth={false}
  708. dropdownStyle={{ width: 120 }}
  709. style={{ width: "120px" }}
  710. dataSource={options}
  711. placeholder="输入转交人姓名"
  712. value={this.state.auto}
  713. onChange={this.httpChange}
  714. filterOption={true}
  715. onBlur={this.blurChange}
  716. onSelect={this.selectAuto}
  717. disabled={!hasSelected}
  718. >
  719. <Input />
  720. </AutoComplete>
  721. <Button
  722. type="primary"
  723. onClick={this.changeAssigner}
  724. disabled={!hasSelected}
  725. style={{ marginRight: 10 }}
  726. >
  727. 转交
  728. </Button>
  729. <Button
  730. type="primary"
  731. style={{
  732. float: "right",
  733. marginTop: 10,
  734. marginLeft: 10,
  735. marginRight: 10,
  736. }}
  737. onClick={this.addClick}
  738. >
  739. 新增客户
  740. <Icon type="plus" />
  741. </Button>
  742. {/*<Button type="default" className="addButton" onClick={this.exportExec}>导出excel<Icon type="plus" /></Button>*/}
  743. {/* <div className="clearfix" style={{ marginTop: "5px" }}> */}
  744. <Button
  745. onClick={(e) => {
  746. e.stopPropagation(), this.rankO(0);
  747. }}
  748. type="primary"
  749. style={{ marginRight: "10px" }}
  750. disabled={!hasSelected}
  751. >
  752. 一般客户
  753. </Button>
  754. <Button
  755. onClick={(e) => {
  756. e.stopPropagation(), this.rankO(1);
  757. }}
  758. type="primary"
  759. style={{ marginRight: "10px" }}
  760. disabled={!hasSelected}
  761. >
  762. 意向客户
  763. </Button>
  764. <Button
  765. onClick={(e) => {
  766. e.stopPropagation(), this.rankO(2);
  767. }}
  768. type="primary"
  769. disabled={!hasSelected}
  770. >
  771. 重点客户
  772. </Button>
  773. <Button
  774. style={{ marginLeft: 10 }}
  775. onClick={(e) => {
  776. e.stopPropagation(),
  777. this.zhuanjiaoDetail(this.state.selectedRows[0]);
  778. }}
  779. type="primary"
  780. disabled={!hasSelected}
  781. >
  782. 转交记录
  783. </Button>
  784. {/* </div> */}
  785. </TabPane>
  786. </Tabs>
  787. </div>
  788. <div className="patent-table">
  789. <Spin spinning={this.state.loading}>
  790. <Table
  791. columns={this.state.columns}
  792. dataSource={this.state.dataSource}
  793. rowSelection={rowSelection}
  794. pagination={this.state.pagination}
  795. onRowClick={this.tableRowClick}
  796. />
  797. </Spin>
  798. </div>
  799. <AddIntention
  800. api={this.state.detailApi}
  801. showDesc={this.state.showDesc}
  802. closeDesc={this.closeDesc}
  803. />
  804. <FollowDetail
  805. categoryArr={this.state.categoryArr}
  806. followData={this.state.followData}
  807. visitModul={this.state.visitModul}
  808. closeDesc={this.closeDesc}
  809. />
  810. <IntentionDetail
  811. categoryArr={this.state.categoryArr}
  812. detailApi={this.props.detailApi}
  813. IntentionData={this.state.RowData}
  814. modalVisible={this.state.modalVisible}
  815. closeDesc={this.closeDesc}
  816. basicState={this.state.basicState}
  817. contactState={this.state.contactState}
  818. />
  819. {this.state.zhuanjiaoVisible ? (
  820. <ZhuanjiaoDetail
  821. cancel={this.zhuanjiaoDetailCancel}
  822. visible={this.state.zhuanjiaoVisible}
  823. id={this.state.zhuanjiaoId}
  824. />
  825. ) : (
  826. ""
  827. )}
  828. </div>
  829. );
  830. },
  831. })
  832. );
  833. export default IntentionCustomer;