signCustomer.jsx 26 KB

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