channel.jsx 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. import React,{Component} from "react";
  2. import {
  3. AutoComplete,
  4. Button,
  5. Cascader,
  6. DatePicker,
  7. Icon,
  8. Input,
  9. message, Modal,
  10. Select,
  11. Spin,
  12. Table,
  13. Tabs,
  14. Upload
  15. } from "antd";
  16. import {ChooseList} from "../../../order/orderNew/chooseList";
  17. import $ from "jquery/src/ajax";
  18. import {
  19. getSocialAttribute,
  20. ShowModal
  21. } from "@/tools.js";
  22. import { citySelect, provinceList } from '@/NewDicProvinceList';
  23. import moment from "moment";
  24. import FollowDetail from "./followDetail";
  25. import IntentionDetail from "./intentionDetail/intentionDetail";
  26. import TransferRecords from './transferRecords';
  27. import DuplicateData from './duplicateData';
  28. const {TabPane} = Tabs;
  29. const { RangePicker } = DatePicker;
  30. class Channel extends Component{
  31. constructor(props) {
  32. super(props);
  33. this.state={
  34. columns: [
  35. {
  36. title: "客户名称",
  37. dataIndex: "userName",
  38. key: "userName",
  39. },
  40. {
  41. title: "地区",
  42. dataIndex: "locationProvince",
  43. key: "locationProvince",
  44. },
  45. {
  46. title: "社会性质",
  47. dataIndex: "societyTag",
  48. key: "societyTag",
  49. render: (text) => {
  50. return getSocialAttribute(text);
  51. },
  52. },
  53. {
  54. title: "渠道专员",
  55. dataIndex: "aName",
  56. key: "aName",
  57. },
  58. {
  59. title: "客户联系人",
  60. dataIndex: "contacts",
  61. key: "contacts",
  62. },
  63. {
  64. title: "联系电话",
  65. dataIndex: "contactMobile",
  66. key: "contactMobile",
  67. },
  68. {
  69. title: "渠道初始时间",
  70. dataIndex: "createTimes",
  71. key: "createTimes",
  72. },
  73. {
  74. title: "分配状态",
  75. dataIndex: "status",
  76. key: "status",
  77. render: (text) => (
  78. text === 0 ? '未分配' :
  79. text === 1 ? '已存在' :
  80. text === 2 ? '已分配' : ''
  81. )
  82. },
  83. ],
  84. changeList:[],
  85. dataSource:[],
  86. pagination: {
  87. defaultCurrent: 1,
  88. defaultPageSize: 10,
  89. showQuickJumper: true,
  90. pageSize: 10,
  91. onChange: function (page) {
  92. this.loadData(page);
  93. }.bind(this),
  94. showTotal: function (total) {
  95. return "共" + total + "条数据";
  96. },
  97. },
  98. pageNo:1,
  99. listLoading:false,
  100. selectedRowKeys:[],
  101. selectedRows:[],
  102. modalVisible:false,
  103. recordt:'',
  104. nameSearch:'',
  105. statusSearch:undefined,
  106. provinceSearch:undefined,
  107. addressSearch:[],
  108. releaseDate:[],
  109. upLoad: {
  110. name: "file",
  111. action: globalConfig.context + "/api/user/channel/import",
  112. headers: {
  113. authorization: "authorization-text"
  114. },
  115. onChange: info => {
  116. if (info.file.status === "done") {
  117. if (info.file.response && info.file.response.error.length === 0) {
  118. if(info.file.response.data.list.length > 0){
  119. this.setState({
  120. duplicateData: [],
  121. duplicateDataVisible: true
  122. })
  123. }else{
  124. message.success("导入成功!");
  125. this.loadData();
  126. }
  127. } else {
  128. message.warning(info.file.response.error[0].message);
  129. }
  130. }
  131. }
  132. },
  133. followData: '',
  134. visitModul: false,
  135. categoryArr:[],
  136. tabsKey:'',
  137. reasonsTransfer:''
  138. }
  139. this.loadData = this.loadData.bind(this);
  140. this.search = this.search.bind(this);
  141. this.reset = this.reset.bind(this);
  142. this.changeList = this.changeList.bind(this);
  143. this.download = this.download.bind(this);
  144. this.category = this.category.bind(this);
  145. this.closeDesc = this.closeDesc.bind(this);
  146. this.guidanceRead = this.guidanceRead.bind(this);
  147. this.tableRowClick = this.tableRowClick.bind(this);
  148. this.detailCloseDesc = this.detailCloseDesc.bind(this);
  149. this.supervisor = this.supervisor.bind(this);
  150. this.httpChange = this.httpChange.bind(this);
  151. this.blurChange = this.blurChange.bind(this);
  152. this.selectAuto = this.selectAuto.bind(this);
  153. this.changeAssigner = this.changeAssigner.bind(this);
  154. }
  155. componentDidMount() {
  156. //城市
  157. let provinces = [];
  158. provinceList.map(function (item) {
  159. var id = String(item.id);
  160. provinces.push(
  161. <Select.Option value={id} key={item.name}>
  162. {item.name}
  163. </Select.Option>
  164. );
  165. });
  166. this.setState({
  167. provinces
  168. })
  169. this.loadData();
  170. this.category();
  171. if(this.props.followUp){
  172. this.state.columns.push({
  173. title: "跟进操作",
  174. dataIndex: "abc",
  175. key: "abc",
  176. render: (text, record, index) => {
  177. return (
  178. <div style={{
  179. display: 'flex',
  180. flexFlow:'row',
  181. alignItems:'center',
  182. }}>
  183. <Button
  184. onClick={(e) => {
  185. e.stopPropagation();
  186. if(this.props.isEditGuidanceLv){
  187. this.visit(record);
  188. }else{
  189. this.tableRowClick(record);
  190. }
  191. }}
  192. type="primary"
  193. >
  194. {this.props.isEditGuidanceLv ? '客户跟进' : '查看指导'}
  195. </Button>
  196. </div>
  197. );
  198. },
  199. });
  200. this.state.columns.push({
  201. title: "指导意见",
  202. dataIndex: "guidance",
  203. key: "guidance",
  204. render: (text, record, index) => {
  205. return (
  206. <div style={{
  207. display: 'flex',
  208. flexFlow:'row',
  209. alignItems:'center',
  210. }}>
  211. {/*指导 0无 1未读 2已读*/}
  212. {text === 1 || text === 2 ? <Button
  213. style={text === 1 ? {
  214. background:'#F00000',
  215. borderColor:'#F00000'
  216. } : {}}
  217. onClick={(e)=>{
  218. e.stopPropagation();
  219. this.guidanceRead(record.uid).then(()=>{
  220. this.setState({
  221. tabsKey:"4",
  222. },()=>{
  223. this.tableRowClick(record)
  224. })
  225. })
  226. }}
  227. type="primary"
  228. >
  229. {text === 1 ? '未读' : '查看'}
  230. </Button> : <div>暂无指导</div>}
  231. </div>
  232. );
  233. },
  234. });
  235. this.setState({
  236. columns:this.state.columns
  237. })
  238. }
  239. }
  240. visit(e) {
  241. this.setState({
  242. followData: e,
  243. visitModul: true,
  244. });
  245. }
  246. loadData(pageNo) {
  247. this.setState({
  248. listLoading: true,
  249. });
  250. $.ajax({
  251. method: "post",
  252. dataType: "json",
  253. crossDomain: false,
  254. url: globalConfig.context + '/api/admin/customer/listChannelCustomer',
  255. data: {
  256. pageNo: pageNo || 1,
  257. pageSize: this.state.pagination.pageSize,
  258. name: this.state.nameSearch,
  259. status:this.state.statusSearch,
  260. province: !this.state.addressSearch.length
  261. ? this.state.provinceSearch
  262. : this.state.addressSearch[0],
  263. city: !this.state.addressSearch.length
  264. ? ""
  265. : this.state.addressSearch[1],
  266. startTime: this.state.releaseDate[0],
  267. endTime: this.state.releaseDate[1],
  268. },
  269. success: function (data) {
  270. ShowModal(this);
  271. let theArr = [];
  272. if (data.error.length > 0) {
  273. message.warning(data.error[0].message);
  274. } else {
  275. for (let i = 0; i < data.data.list.length; i++) {
  276. let thisdata = data.data.list[i];
  277. let diqu =
  278. (thisdata.province == null ? "" : thisdata.province) +
  279. (thisdata.city == null ? "" : "-" + thisdata.city) +
  280. (thisdata.area == null ? "" : "-" + thisdata.area);
  281. thisdata.key = i;
  282. thisdata.id = thisdata.uid;
  283. thisdata.lastFollowTime = thisdata.lastFollowTime &&
  284. thisdata.lastFollowTime.split(" ")[0];
  285. thisdata.transferTime= thisdata.transferTime && thisdata.transferTime.split(" ")[0];
  286. thisdata.surplusFollowTime = thisdata.surplusFollowTime && thisdata.surplusFollowTime.split(" ")[0];
  287. thisdata.surplusSignTime = thisdata.surplusSignTime && thisdata.surplusSignTime.split(" ")[0];
  288. thisdata.locationProvince = diqu;
  289. theArr.push(thisdata);
  290. }
  291. this.state.pagination.current = data.data.pageNo;
  292. this.state.pagination.total = data.data.totalCount;
  293. this.setState({
  294. pageNo: data.data.pageNo,
  295. dataSource: theArr,
  296. pagination: this.state.pagination,
  297. })
  298. }
  299. }.bind(this),
  300. }).always(
  301. function () {
  302. this.setState({
  303. listLoading: false,
  304. });
  305. }.bind(this)
  306. );
  307. }
  308. search(){
  309. this.loadData();
  310. }
  311. reset(){
  312. this.setState({
  313. nameSearch:'',
  314. provinceSearch:undefined,
  315. addressSearch:[],
  316. releaseDate:[],
  317. statusSearch:undefined,
  318. })
  319. }
  320. download() {
  321. window.location.href =
  322. globalConfig.context +
  323. "/api/user/channel/downloadTemplate?" +
  324. "sign=user_channel";
  325. }
  326. changeList(arr) {
  327. const newArr = [];
  328. this.state.columns.forEach(item => {
  329. arr.forEach(val => {
  330. if (val === item.title) {
  331. newArr.push(item);
  332. }
  333. });
  334. });
  335. this.setState({
  336. changeList: newArr
  337. });
  338. }
  339. category() {
  340. $.ajax({
  341. method: "get",
  342. dataType: "json",
  343. crossDomain: false,
  344. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  345. data: {},
  346. success: function (data) {
  347. let thedata = data.data;
  348. let theArr = [];
  349. if (!thedata) {
  350. if (data.error && data.error.length) {
  351. message.warning(data.error[0].message);
  352. }
  353. thedata = {};
  354. } else {
  355. thedata.map(function (item, index) {
  356. theArr.push({
  357. value: item.id,
  358. key: item.cname,
  359. });
  360. });
  361. }
  362. this.setState({
  363. categoryArr: theArr,
  364. });
  365. }.bind(this),
  366. });
  367. }
  368. closeDesc(){
  369. this.setState({
  370. categoryArr:[],
  371. followData:'',
  372. visitModul:false
  373. })
  374. }
  375. //已读指导记录
  376. guidanceRead(id) {
  377. return new Promise((resolve,reject)=>{
  378. $.ajax({
  379. method: "post",
  380. dataType: "json",
  381. crossDomain: false,
  382. url: globalConfig.context + "/api/admin/customer/pushGuidance",
  383. data: {
  384. uid: id,
  385. }
  386. }).done(function(data) {
  387. if(!data.error.length) {
  388. resolve();
  389. } else {
  390. message.warning(data.error[0].message);
  391. reject();
  392. };
  393. }.bind(this));
  394. })
  395. }
  396. tableRowClick(record) {
  397. this.setState({
  398. rowData:record,
  399. modalVisible: true,
  400. basicState: true,
  401. contactState: true,
  402. modalName: record.userName
  403. })
  404. }
  405. detailCloseDesc(){
  406. this.setState({
  407. rowData:'',
  408. modalVisible: false,
  409. basicState: false,
  410. contactState: false,
  411. modalName: ''
  412. })
  413. }
  414. supervisor(e) {
  415. $.ajax({
  416. method: "get",
  417. dataType: "json",
  418. crossDomain: false,
  419. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  420. data: {
  421. adminName: e,
  422. },
  423. success: function (data) {
  424. let thedata = data.data;
  425. if (!thedata) {
  426. if (data.error && data.error.length) {
  427. message.warning(data.error[0].message);
  428. }
  429. thedata = {};
  430. }
  431. this.setState({
  432. customerArr: thedata,
  433. });
  434. }.bind(this),
  435. }).always(
  436. function () {
  437. }.bind(this)
  438. );
  439. }
  440. httpChange(e) {
  441. if (e.length >= 1) {
  442. this.supervisor(e);
  443. }
  444. this.setState({
  445. auto: e,
  446. });
  447. }
  448. blurChange(e) {
  449. let theType = "";
  450. let contactLists = this.state.customerArr || [];
  451. if (e) {
  452. contactLists.map(function (item) {
  453. if (item.name == e.toString()) {
  454. theType = item.id;
  455. }
  456. });
  457. }
  458. this.setState({
  459. theTypes: theType,
  460. });
  461. }
  462. selectAuto(value, options) {
  463. this.setState({
  464. auto: value,
  465. });
  466. }
  467. showConfirm() {
  468. this.setState({
  469. visible:true
  470. })
  471. }
  472. changeAssigner() {
  473. if(!this.state.reasonsTransfer){
  474. message.warning("请输入转交原因");
  475. return;
  476. }
  477. if (this.state.theTypes) {
  478. let changeIds = '';
  479. let oldAid = '';
  480. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  481. let rowItem = this.state.selectedRows[idx];
  482. if (rowItem.id) {
  483. oldAid = rowItem.aid;
  484. changeIds = this.state.selectedRows.length-1 === idx ? changeIds +rowItem.id : changeIds + rowItem.id + ',' ;
  485. }
  486. }
  487. $.ajax({
  488. method: "post",
  489. dataType: "json",
  490. crossDomain: false,
  491. url: globalConfig.context + "/api/admin/customer/channelCustomerDeliver",
  492. data: {
  493. userIds: changeIds, //这一行数据的ID
  494. receiveId: this.state.theTypes, //指定转交人的ID
  495. remarks: this.state.reasonsTransfer,
  496. },
  497. }).done(
  498. function (data) {
  499. if (!data.error.length) {
  500. message.success("转交成功!");
  501. this.setState({
  502. auto: "",
  503. loading: false,
  504. selectedRowKeys: [],
  505. reasonsTransfer:'',
  506. visible:false
  507. },()=>{
  508. this.loadData(
  509. Math.min(
  510. this.state.ispage == undefined ? 1 : this.state.ispage,
  511. Math.ceil((this.state.pagination.total - 1) / 10)
  512. )
  513. );
  514. });
  515. } else {
  516. message.warning(data.error[0].message);
  517. }
  518. }.bind(this)
  519. );
  520. } else {
  521. message.warning("请输入转交人姓名");
  522. }
  523. }
  524. render() {
  525. const rowSelection = {
  526. hideDefaultSelections: true,
  527. selectedRowKeys: this.state.selectedRowKeys,
  528. onChange: (selectedRowKeys, selectedRows) => {
  529. this.setState({
  530. modalVisible: false,
  531. selectedRows: selectedRows,
  532. selectedRowKeys: selectedRowKeys,
  533. });
  534. },
  535. onSelect: (recordt, selected, selectedRows) => {
  536. this.setState({
  537. modalVisible: false,
  538. recordt: recordt.id,
  539. });
  540. },
  541. };
  542. const dataSources = this.state.customerArr || [];
  543. const options = dataSources.map((group) => (
  544. <Select.Option key={group.id} value={group.name}>
  545. {group.name}
  546. </Select.Option>
  547. ));
  548. const hasSelected = this.state.selectedRowKeys.length > 0;
  549. return (
  550. <div className="user-content">
  551. <div className="content-title">
  552. <span>渠道客户</span>
  553. </div>
  554. <div className="user-search">
  555. <Tabs
  556. defaultActiveKey="1"
  557. className="test"
  558. >
  559. <TabPane tab="搜索" key="1">
  560. <Input
  561. placeholder="请输入客户名称"
  562. value={this.state.nameSearch}
  563. style={{ width: 150, marginRight: 10, marginLeft: 10 }}
  564. onChange={(e) => {
  565. this.setState({ nameSearch: e.target.value });
  566. }}
  567. />
  568. {/*0未分配 1已存在 2已分配*/}
  569. <Select
  570. placeholder="状态"
  571. style={{ width: 80 }}
  572. value={this.state.statusSearch}
  573. onChange={(e) => {
  574. this.setState({ statusSearch: e });
  575. }}
  576. >
  577. <Select.Option value={0}>
  578. 未分配
  579. </Select.Option>
  580. <Select.Option value={1}>
  581. 已存在
  582. </Select.Option>
  583. <Select.Option value={2}>
  584. 已分配
  585. </Select.Option>
  586. </Select>
  587. <Select
  588. placeholder="省"
  589. style={{ width: 80 }}
  590. value={this.state.provinceSearch}
  591. onChange={(e) => {
  592. this.setState({ provinceSearch: e });
  593. }}
  594. >
  595. {this.state.provinces}
  596. </Select>
  597. <span style={{ marginRight: "10px" }}>
  598. <Cascader
  599. options={citySelect()}
  600. value={this.state.addressSearch}
  601. placeholder="选择城市"
  602. onChange={(e, pre) => {
  603. this.setState({ addressSearch: e });
  604. }}
  605. />
  606. </span>
  607. <RangePicker
  608. value={[
  609. this.state.releaseDate[0]
  610. ? moment(this.state.releaseDate[0])
  611. : null,
  612. this.state.releaseDate[1]
  613. ? moment(this.state.releaseDate[1])
  614. : null,
  615. ]}
  616. onChange={(data, dataString) => {
  617. this.setState({ releaseDate: dataString });
  618. }}
  619. />
  620. <Button
  621. type="primary"
  622. style={{ marginLeft: "10px", marginRight: 10 }}
  623. onClick={this.search}
  624. >
  625. 搜索
  626. </Button>
  627. <Button onClick={this.reset}>重置</Button>
  628. </TabPane>
  629. <TabPane tab="操作" key="2">
  630. <div style={{
  631. marginTop: 10,
  632. }}>
  633. {this.props.deliver ? <AutoComplete
  634. className="certain-category-search"
  635. dropdownClassName="certain-category-search-dropdown"
  636. dropdownMatchSelectWidth={false}
  637. dropdownStyle={{ width: 120 }}
  638. style={{ width: "120px" }}
  639. dataSource={options}
  640. placeholder={this.props.deliver === 1 ? '输入分配人姓名' : '输入转交人姓名'}
  641. value={this.state.auto}
  642. onChange={this.httpChange}
  643. filterOption={true}
  644. onBlur={this.blurChange}
  645. onSelect={this.selectAuto}
  646. disabled={!hasSelected}
  647. >
  648. <Input />
  649. </AutoComplete> : ''}
  650. {this.props.deliver ? <Button
  651. type="primary"
  652. onClick={(e) => {
  653. e.stopPropagation();
  654. this.showConfirm();
  655. }}
  656. disabled={!hasSelected}
  657. style={{ marginRight: 10 }}
  658. >
  659. {this.props.deliver === 1 ? '分配' : '转交'}
  660. </Button> : ''}
  661. {this.props.deliver === 2 ? <Button
  662. type="primary"
  663. onClick={(e) => {
  664. e.stopPropagation();
  665. this.setState({
  666. transferVisible:true,
  667. transferId: this.state.selectedRows[0].uid
  668. })
  669. }}
  670. disabled={!hasSelected || this.state.selectedRows.length > 1}
  671. style={{ marginRight: 10 }}
  672. >
  673. 转交记录
  674. </Button> : ''}
  675. {this.props.recovery ? <Button
  676. type="primary"
  677. onClick={(e) => {
  678. e.stopPropagation();
  679. }}
  680. disabled={!hasSelected}
  681. style={{ marginRight: 10 }}
  682. >
  683. 回收
  684. </Button> : ''}
  685. {this.props.channel ? <Upload {...this.state.upLoad}>
  686. <Button
  687. type="primary"
  688. style={{ marginRight: "10px" }}
  689. >
  690. +批量导入渠道客户
  691. </Button>
  692. </Upload> : null}
  693. {this.props.channel ? <Button
  694. onClick={(e) => {
  695. e.stopPropagation();
  696. this.download();
  697. }}
  698. type="primary"
  699. style={{
  700. marginRight: "10px",
  701. background:'#f49f36',
  702. borderColor:'#f49f36'
  703. }}
  704. >
  705. 下载渠道客户模板
  706. </Button> : ''}
  707. {this.props.channel ? <Button
  708. onClick={(e) => {
  709. e.stopPropagation();
  710. this.setState({
  711. duplicateData: [],
  712. duplicateDataVisible: true
  713. })
  714. }}
  715. type="primary"
  716. style={{
  717. marginRight: "10px",
  718. background:'#ff2f00',
  719. borderColor:'#ff2f00'
  720. }}
  721. >
  722. 查看导入失败列表
  723. </Button> : ''}
  724. </div>
  725. </TabPane>
  726. <TabPane tab="更改表格显示数据" key="3">
  727. <div style={{ marginLeft: 10 }}>
  728. <ChooseList
  729. columns={this.state.columns}
  730. changeFn={this.changeList}
  731. changeList={this.state.changeList}
  732. top={55}
  733. margin={11}
  734. />
  735. </div>
  736. </TabPane>
  737. </Tabs>
  738. </div>
  739. <div className="patent-table">
  740. <Spin spinning={this.state.listLoading}>
  741. <Table
  742. size="middle"
  743. className={'intentionCustomerTable'}
  744. columns={
  745. this.state.changeList.length !== 0
  746. ? this.state.changeList
  747. : this.state.columns
  748. }
  749. dataSource={this.state.dataSource}
  750. rowSelection={this.props.deliver ? rowSelection : ''}
  751. pagination={this.state.pagination}
  752. onRowDoubleClick={this.tableRowClick}
  753. />
  754. </Spin>
  755. </div>
  756. <FollowDetail
  757. categoryArr={this.state.categoryArr}
  758. followData={this.state.followData}
  759. visitModul={this.state.visitModul}
  760. closeDesc={this.closeDesc}
  761. />
  762. <IntentionDetail
  763. tabsKey={this.state.tabsKey}
  764. categoryArr={this.state.categoryArr}
  765. detailApi={this.props.detailApi}
  766. IntentionData={this.state.rowData}
  767. modalVisible={this.state.modalVisible}
  768. name={this.state.modalName}
  769. closeDesc={this.detailCloseDesc}
  770. basicState={this.state.basicState}
  771. contactState={this.state.contactState}
  772. isGuidanceLv={this.props.isGuidanceLv}
  773. isEditGuidanceLv={this.props.isEditGuidanceLv}
  774. />
  775. {this.state.duplicateDataVisible ? <DuplicateData
  776. duplicateData={this.state.duplicateData || []}
  777. visible={this.state.duplicateDataVisible}
  778. onCancel={()=>{
  779. this.setState({
  780. duplicateData:[],
  781. duplicateDataVisible: false
  782. })
  783. }}
  784. /> : null}
  785. {this.state.transferVisible ? <TransferRecords
  786. id={this.state.transferId}
  787. visible={this.state.transferVisible}
  788. cancel={()=>{
  789. this.setState({
  790. transferVisible:false,
  791. transferId:''
  792. })
  793. }}
  794. /> : '' }
  795. <Modal
  796. title="渠道客户转交"
  797. visible={this.state.visible}
  798. onOk={()=>{
  799. this.changeAssigner()
  800. }}
  801. onCancel={()=>{
  802. this.setState({
  803. reasonsTransfer:'',
  804. visible:false
  805. })
  806. }}
  807. >
  808. <span style={{ color: "red" }}>
  809. 确定要转交以下客户吗?
  810. {
  811. this.state.selectedRows.map((value,index)=>(
  812. <div key={index} style={{marginTop:'5px',color: "#000"}}>
  813. {value.userName}
  814. </div>
  815. ))
  816. }
  817. <div style={{marginTop:20}}>
  818. <span style={{marginRight:10,color:'#000'}}>转交原因:</span>
  819. <Input
  820. placeholder="转交原因"
  821. value={this.state.reasonsTransfer}
  822. style={{ width: 150 }}
  823. onChange={(e) => {
  824. this.setState({reasonsTransfer : e.target.value });
  825. }}
  826. />
  827. </div>
  828. </span>
  829. </Modal>
  830. </div>
  831. )
  832. }
  833. }
  834. export default Channel;