intentionCustomer.jsx 27 KB

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