signCustomer.jsx 27 KB

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