signCustomer.jsx 28 KB

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