index.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. import React, { Component } from "react";
  2. import {
  3. AutoComplete,
  4. Button,
  5. DatePicker,
  6. Input,
  7. message,
  8. Modal,
  9. Select,
  10. Spin,
  11. Table,
  12. Tabs,
  13. Tag,
  14. Tooltip,
  15. } from "antd";
  16. import { ShowModal, getContactType } from "@/tools";
  17. import { salesList, } from "@/dataDic"
  18. import { ChooseList } from "../../order/orderNew/chooseList";
  19. import $ from "jquery/src/ajax";
  20. import "./index.less";
  21. import moment from "moment";
  22. import ChannelLog from "../../channelList/channelunit/channellog"; //转交日志
  23. import ChangeLog from "../../channelList/channelunit/changelog"; //更名日志
  24. import DetailList from "./detaillist";//客户订单列表
  25. import Visit from "../../channelList/channelunit/detail/visit"
  26. const { TabPane } = Tabs;
  27. const { RangePicker } = DatePicker;
  28. class SignCustomer extends Component {
  29. constructor(props) {
  30. super(props);
  31. this.state = {
  32. pageNo: 1,
  33. loading: false,
  34. changeList: undefined,
  35. selectedRowKeys: [],
  36. columns: [
  37. {
  38. title: "客户名称",
  39. dataIndex: "nickname",
  40. key: "nickname",
  41. fixed: "left",
  42. width: 200,
  43. render: (text, record) => {
  44. return (
  45. <div>
  46. {text}
  47. {record.member == 1 && <Tag color="#1E90FF">会员</Tag>}
  48. {record.chargeback == 1 && <Tag color="#F21212">退</Tag>}
  49. {record.bigCustomer == 1 && <Tag color="#F21212">大客户</Tag>}
  50. </div>
  51. );
  52. },
  53. },
  54. {
  55. title: "签单次数",
  56. dataIndex: "signNumber",
  57. key: "signNumber",
  58. onCellClick: (r) => {
  59. let rows = {};
  60. rows["nickname"] = r.nickname
  61. rows["uid"] = r.id
  62. this.setState({
  63. rowData: rows,
  64. showDetail: true,
  65. });
  66. },
  67. render: (text) =>
  68. <div
  69. style={{
  70. color: "#58A3FF",
  71. textDecoration: "underline",
  72. cursor: "pointer"
  73. }}>
  74. {text}
  75. </div>
  76. },
  77. {
  78. title: "总金额(万元)",
  79. dataIndex: "signAmount",
  80. key: "signAmount",
  81. },
  82. {
  83. title: "首次签单时间",
  84. dataIndex: "firstSigningTime",
  85. key: "firstSigningTime",
  86. },
  87. {
  88. title: "最新签单时间",
  89. dataIndex: "lastSigningTime",
  90. key: "lastSigningTime",
  91. },
  92. {
  93. title: "签单类型",
  94. dataIndex: "lastSalesType",
  95. key: "lastSalesType",
  96. render: (text) => (
  97. <div>{salesList[text]}</div>
  98. )
  99. },
  100. {
  101. title: "归属人",
  102. dataIndex: "name",
  103. key: "name",
  104. },
  105. {
  106. title: "归属部门",
  107. dataIndex: "depName",
  108. key: "depName",
  109. },
  110. {
  111. title: "跟进人",
  112. dataIndex: "followAname",
  113. key: "followAname",
  114. },
  115. {
  116. title: "跟进方式",
  117. dataIndex: "lastFollowType",
  118. key: "lastFollowType",
  119. render: (text) => (
  120. <div>{getContactType(text)}</div>
  121. )
  122. },
  123. {
  124. title: "跟进说明",
  125. dataIndex: "followExplain",
  126. key: "followExplain",
  127. width: 200,
  128. },
  129. {
  130. title: "次数",
  131. dataIndex: "followNumber",
  132. key: "followNumber",
  133. onCellClick: (r) => {
  134. let rows = {};
  135. rows["nickname"] = r.nickname
  136. rows["id"] = r.id
  137. this.setState({
  138. rowData: rows,
  139. followup: true,
  140. });
  141. },
  142. render: (text) =>
  143. <div
  144. style={{
  145. color: "#58A3FF",
  146. textDecoration: "underline",
  147. cursor: "pointer"
  148. }}>
  149. {text}
  150. </div>
  151. },
  152. {
  153. title: "最新跟进时间",
  154. dataIndex: "lastFollowTime",
  155. key: "lastFollowTime",
  156. },
  157. {
  158. title: "已签项目",
  159. dataIndex: "taskNames",
  160. key: "taskNames",
  161. width: "15%",
  162. },
  163. ],
  164. pagination: {
  165. defaultCurrent: 1,
  166. defaultPageSize: 10,
  167. showQuickJumper: true,
  168. pageSize: 10,
  169. onChange: function (page) {
  170. this.loadData(page);
  171. }.bind(this),
  172. showTotal: function (total) {
  173. return "共" + total + "条数据";
  174. },
  175. },
  176. dataSource: [],
  177. searchInfor: {},
  178. mvisible: "",
  179. showDetail: false,
  180. followup: false,
  181. };
  182. this.loadData = this.loadData.bind(this);
  183. this.resetAll = this.resetAll.bind(this);
  184. this.changeList = this.changeList.bind(this);
  185. this.selectSuperId = this.selectSuperId.bind(this);
  186. this.supervisor = this.supervisor.bind(this);
  187. this.supervisor1 = this.supervisor1.bind(this);
  188. this.httpChange = this.httpChange.bind(this);
  189. this.httpChange1 = this.httpChange1.bind(this);
  190. this.selectAuto = this.selectAuto.bind(this);
  191. this.selectAuto1 = this.selectAuto1.bind(this);
  192. this.blurChange = this.blurChange.bind(this);
  193. this.blurChange1 = this.blurChange1.bind(this);
  194. this.exportExec = this.exportExec.bind(this);
  195. }
  196. //获取上级组织
  197. selectSuperId() {
  198. $.ajax({
  199. method: "get",
  200. dataType: "json",
  201. crossDomain: false,
  202. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  203. data: {},
  204. success: function (data) {
  205. let theArr = [];
  206. if (data.error && data.error.length === 0) {
  207. for (let i = 0; i < data.data.length; i++) {
  208. let theData = data.data[i];
  209. theArr.push(
  210. <Select.Option value={theData.id} key={theData.id}>
  211. {theData.name}
  212. </Select.Option>
  213. );
  214. }
  215. this.setState({
  216. contactsOption: theArr,
  217. });
  218. } else {
  219. message.warning(data.error[0].message);
  220. }
  221. }.bind(this),
  222. }).always(
  223. function () {
  224. this.setState({
  225. // loading: false,
  226. });
  227. }.bind(this)
  228. );
  229. }
  230. changeList(arr) {
  231. const newArr = [];
  232. this.state.columns.forEach((item) => {
  233. arr.forEach((val) => {
  234. if (val === item.title) {
  235. newArr.push(item);
  236. }
  237. });
  238. });
  239. this.setState({
  240. changeList: newArr,
  241. });
  242. }
  243. loadData(pageNo) {
  244. const { searchInfor, pagination } = this.state;
  245. this.setState({
  246. loading: true,
  247. });
  248. let datas = Object.assign(searchInfor, {
  249. pageNo: pageNo || 1,
  250. pageSize: pagination.pageSize,
  251. });
  252. $.ajax({
  253. method: "get",
  254. dataType: "json",
  255. crossDomain: false,
  256. url: globalConfig.context + "/api/admin/statistis/signSummary",
  257. data: datas,
  258. success: function (data) {
  259. ShowModal(this);
  260. if (data.error && data.error.length === 0) {
  261. if (data.data.list) {
  262. pagination.current = data.data.pageNo;
  263. pagination.total = data.data.totalCount;
  264. if (data.data && data.data.list && !data.data.list.length) {
  265. pagination.current = 0;
  266. pagination.total = 0;
  267. }
  268. this.setState({
  269. dataSource: data.data.list,
  270. pagination: this.state.pagination,
  271. pageNo: data.data.pageNo,
  272. });
  273. } else {
  274. this.setState({
  275. dataSource: data.data,
  276. pagination: false,
  277. });
  278. }
  279. } else {
  280. message.warning(data.error[0].message);
  281. }
  282. }.bind(this),
  283. }).always(
  284. function () {
  285. this.setState({
  286. loading: false,
  287. });
  288. }.bind(this)
  289. );
  290. }
  291. resetAll() {
  292. this.setState(
  293. {
  294. searchInfor: JSON.parse(JSON.stringify({})),
  295. selectedRowKeys: [],
  296. },
  297. () => {
  298. this.loadData();
  299. }
  300. );
  301. }
  302. supervisor(e) {
  303. $.ajax({
  304. method: "get",
  305. dataType: "json",
  306. crossDomain: false,
  307. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  308. data: {
  309. adminName: e,
  310. status: "2",
  311. },
  312. success: function (data) {
  313. if (data.error && data.error.length === 0) {
  314. this.setState({
  315. customerArr: data.data,
  316. });
  317. } else {
  318. message.warning(data.error[0].message);
  319. }
  320. }.bind(this),
  321. }).always(function () { }.bind(this));
  322. }
  323. supervisor1(e) {
  324. $.ajax({
  325. method: "get",
  326. dataType: "json",
  327. crossDomain: false,
  328. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  329. data: {
  330. adminName: e,
  331. status: "2",
  332. },
  333. success: function (data) {
  334. if (data.error && data.error.length === 0) {
  335. this.setState({
  336. customerArr1: data.data,
  337. });
  338. } else {
  339. message.warning(data.error[0].message);
  340. }
  341. }.bind(this),
  342. }).always(function () { }.bind(this));
  343. }
  344. httpChange(e) {
  345. if (e.length >= 1) {
  346. this.supervisor(e);
  347. }
  348. this.setState({
  349. followAname: e,
  350. });
  351. }
  352. httpChange1(e) {
  353. if (e.length >= 1) {
  354. this.supervisor1(e);
  355. }
  356. this.setState({
  357. adminName: e,
  358. });
  359. }
  360. selectAuto(value, options) {
  361. this.setState({
  362. followAname: value,
  363. });
  364. }
  365. selectAuto1(value, options) {
  366. this.setState({
  367. adminName: value,
  368. });
  369. }
  370. blurChange(e) {
  371. const { searchInfor } = this.state
  372. let theType = undefined;
  373. let contactLists = this.state.customerArr || [];
  374. if (e) {
  375. contactLists.map(function (item) {
  376. if (item.name == e.toString()) {
  377. theType = item.id;
  378. }
  379. });
  380. }
  381. this.setState({
  382. searchInfor: Object.assign(searchInfor, {
  383. followAid: theType,
  384. }),
  385. });
  386. }
  387. blurChange1(e) {
  388. const { searchInfor } = this.state
  389. let theType = undefined;
  390. let contactLists = this.state.customerArr1 || [];
  391. if (e) {
  392. contactLists.map(function (item) {
  393. if (item.name == e.toString()) {
  394. theType = item.id;
  395. }
  396. });
  397. }
  398. this.setState({
  399. searchInfor: Object.assign(searchInfor, {
  400. aid: theType,
  401. }),
  402. });
  403. }
  404. // 导出Excel
  405. exportExec() {
  406. this.setState({
  407. exportPendingLoading: true,
  408. });
  409. message.config({
  410. duration: 20,
  411. });
  412. let loading = message.loading("下载中...");
  413. let data = this.state.searchInfor;
  414. $.ajax({
  415. method: "get",
  416. dataType: "json",
  417. crossDomain: false,
  418. url:
  419. globalConfig.context + "/api/admin/statistis/signSummary/export",
  420. data,
  421. success: function (data) {
  422. if (data.error.length === 0) {
  423. this.download(data.data);
  424. } else {
  425. message.warning(data.error[0].message);
  426. }
  427. }.bind(this),
  428. }).always(
  429. function () {
  430. loading();
  431. this.setState({
  432. exportPendingLoading: false,
  433. });
  434. }.bind(this)
  435. );
  436. }
  437. // 下载
  438. download(fileName) {
  439. window.location.href =
  440. globalConfig.context + "/open/download?fileName=" + fileName;
  441. }
  442. // 选择行
  443. onSelectChange(selectedRowKeys, selectedRows) {
  444. this.setState({
  445. selectedRowKeys,
  446. selectedRows,
  447. });
  448. }
  449. // 关闭弹窗
  450. closeDesc() {
  451. this.setState({
  452. mvisible: "",
  453. showDetail: false,
  454. followup: false,
  455. rowData: {}
  456. });
  457. this.loadData(this.state.pageNo);
  458. }
  459. componentWillMount() {
  460. this.loadData();
  461. this.selectSuperId();
  462. }
  463. render() {
  464. const { searchInfor, selectedRowKeys, selectedRows, showDetail, followup, rowData } = this.state
  465. const dataSources = this.state.customerArr || [];
  466. const options = dataSources.map((group) => (
  467. <Select.Option key={group.id} value={group.name}>
  468. {group.name}
  469. </Select.Option>
  470. ));
  471. const dataSources1 = this.state.customerArr1 || [];
  472. const options1 = dataSources1.map((group) => (
  473. <Select.Option key={group.id} value={group.name}>
  474. {group.name}
  475. </Select.Option>
  476. ));
  477. const rowSelection = {
  478. hideDefaultSelections: true,
  479. selectedRowKeys,
  480. onChange: this.onSelectChange.bind(this),
  481. };
  482. return (
  483. <div>
  484. <div className="user-content">
  485. <div className="content-title">
  486. <span style={{ fontWeight: 900, fontSize: 16 }}>签单客户汇总</span>
  487. </div>
  488. <Tabs defaultActiveKey="1" className="test">
  489. <TabPane tab="搜索" key="1">
  490. <div
  491. className="user-search"
  492. style={{
  493. marginTop: "10px",
  494. marginLeft: "10px",
  495. marginRight: "10px",
  496. }}
  497. >
  498. <span style={{ marginRight: "10px" }}>
  499. <Input
  500. style={{ width: 160 }}
  501. placeholder="输入客户名称"
  502. value={searchInfor.userName}
  503. onChange={e => {
  504. this.setState({
  505. searchInfor: Object.assign(searchInfor, {
  506. userName: e.target.value,
  507. }),
  508. });
  509. }}
  510. />
  511. </span>
  512. <span style={{ marginRight: "10px" }}>
  513. <AutoComplete
  514. className="certain-category-search"
  515. dropdownClassName="certain-category-search-dropdown"
  516. dropdownMatchSelectWidth={false}
  517. style={{ width: 160 }}
  518. dataSource={options}
  519. placeholder="跟进人姓名"
  520. value={this.state.followAname}
  521. onChange={this.httpChange}
  522. filterOption={true}
  523. onBlur={this.blurChange}
  524. onSelect={this.selectAuto}
  525. >
  526. <Input />
  527. </AutoComplete>
  528. </span>
  529. <span style={{ marginRight: "10px" }}>
  530. <AutoComplete
  531. className="certain-category-search"
  532. dropdownClassName="certain-category-search-dropdown"
  533. dropdownMatchSelectWidth={false}
  534. style={{ width: 160 }}
  535. dataSource={options1}
  536. placeholder="所属人姓名"
  537. value={this.state.adminName}
  538. onChange={this.httpChange1}
  539. filterOption={true}
  540. onBlur={this.blurChange1}
  541. onSelect={this.selectAuto1}
  542. >
  543. <Input />
  544. </AutoComplete>
  545. </span>
  546. <span style={{ marginRight: "10px" }}>
  547. <Select
  548. style={{ width: 160 }}
  549. placeholder="会员状态"
  550. value={searchInfor.member}
  551. onChange={(e) => {
  552. this.setState({
  553. searchInfor: Object.assign(searchInfor, {
  554. member: e,
  555. }),
  556. });
  557. }}
  558. >
  559. <Option value={undefined}>全部</Option>
  560. <Option value="0">非会员</Option>
  561. <Option value="1">会员</Option>
  562. </Select>
  563. </span>
  564. <span style={{ marginRight: "10px" }}>
  565. <Select
  566. style={{ width: 160 }}
  567. placeholder="有无退单"
  568. value={searchInfor.chargeback}
  569. onChange={(e) => {
  570. this.setState({
  571. searchInfor: Object.assign(searchInfor, {
  572. chargeback: e,
  573. }),
  574. });
  575. }}
  576. >
  577. <Option value={undefined}>全部</Option>
  578. <Option value="0">无退单</Option>
  579. <Option value="1">有退单</Option>
  580. </Select>
  581. </span>
  582. <span style={{ marginRight: "10px" }}>
  583. <Select
  584. style={{ width: 160 }}
  585. placeholder="选择跟进方式"
  586. value={searchInfor.lastFollowType}
  587. onChange={(e) => {
  588. this.setState({
  589. searchInfor: Object.assign(searchInfor, {
  590. lastFollowType: e,
  591. }),
  592. });
  593. }}
  594. >
  595. <Option value={undefined}>全部</Option>
  596. <Option value="0">外出</Option>
  597. <Option value="1">电话</Option>
  598. <Option value="2">QQ</Option>
  599. <Option value="3">微信</Option>
  600. <Option value="4">邮件</Option>
  601. <Option value="5">公出打卡</Option>
  602. </Select>
  603. </span>
  604. <span style={{ marginRight: "10px" }}>
  605. <Select
  606. style={{ width: 160 }}
  607. placeholder="是否大客户"
  608. value={searchInfor.bigCustomer}
  609. onChange={(e) => {
  610. this.setState({
  611. searchInfor: Object.assign(searchInfor, {
  612. bigCustomer: e,
  613. }),
  614. });
  615. }}
  616. >
  617. <Option value={undefined}>全部</Option>
  618. <Option value="0">非大客户</Option>
  619. <Option value="1">大客户</Option>
  620. </Select>
  621. </span>
  622. <span style={{ marginRight: "10px" }}>
  623. <Select
  624. style={{ width: 160 }}
  625. placeholder="签单次数"
  626. value={searchInfor.signNumber}
  627. onChange={(e) => {
  628. this.setState({
  629. searchInfor: Object.assign(searchInfor, {
  630. signNumber: e,
  631. }),
  632. });
  633. }}
  634. >
  635. <Option value={undefined}>全部</Option>
  636. <Option value="1">1次</Option>
  637. <Option value="2">2次</Option>
  638. <Option value="3">3次</Option>
  639. <Option value="4">3次以上</Option>
  640. </Select>
  641. </span>
  642. <span style={{ marginRight: "10px" }}>
  643. <Select
  644. style={{ width: 160 }}
  645. placeholder="最新签单类型"
  646. value={searchInfor.lastSalesType}
  647. onChange={(e) => {
  648. this.setState({
  649. searchInfor: Object.assign(searchInfor, {
  650. lastSalesType: e,
  651. }),
  652. });
  653. }}
  654. >
  655. {
  656. salesList.map((item, index) =>
  657. <Option value={index}>{item}</Option>
  658. )
  659. }
  660. </Select>
  661. </span>
  662. <span style={{ marginRight: "10px" }}>
  663. <Select
  664. placeholder="选择归属部门"
  665. style={{ width: 200 }}
  666. value={searchInfor.depId}
  667. onChange={(e) => {
  668. this.setState({
  669. searchInfor: Object.assign(searchInfor, {
  670. depId: e,
  671. }),
  672. });
  673. }}
  674. notFoundContent="未获取到上级组织列表"
  675. >
  676. {this.state.contactsOption}
  677. </Select>
  678. </span>
  679. <span style={{ marginRight: "10px" }}>
  680. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  681. 跟进时间 :
  682. </span>
  683. <RangePicker
  684. style={{ marginRight: "10px", marginBottom: "10px" }}
  685. value={[
  686. searchInfor.lastFollowTimeStart
  687. ? moment(searchInfor.lastFollowTimeStart)
  688. : null,
  689. searchInfor.lastFollowTimeEnd ? moment(searchInfor.lastFollowTimeEnd) : null,
  690. ]}
  691. onChange={(data, dataString) => {
  692. this.setState({
  693. searchInfor: Object.assign(searchInfor, {
  694. lastFollowTimeStart: dataString[0],
  695. lastFollowTimeEnd: dataString[1],
  696. }),
  697. });
  698. }}
  699. />
  700. </span>
  701. <span style={{ marginRight: "10px" }}>
  702. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  703. 首次签单 :
  704. </span>
  705. <RangePicker
  706. style={{ marginRight: "10px", marginBottom: "10px" }}
  707. value={[
  708. searchInfor.firstSigningTimeStart
  709. ? moment(searchInfor.firstSigningTimeStart)
  710. : null,
  711. searchInfor.firstSigningTimeEnd ? moment(searchInfor.firstSigningTimeEnd) : null,
  712. ]}
  713. onChange={(data, dataString) => {
  714. this.setState({
  715. searchInfor: Object.assign(searchInfor, {
  716. firstSigningTimeStart: dataString[0],
  717. firstSigningTimeEnd: dataString[1],
  718. }),
  719. });
  720. }}
  721. />
  722. </span>
  723. <span style={{ marginRight: "10px" }}>
  724. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  725. 最新签单 :
  726. </span>
  727. <RangePicker
  728. style={{ marginRight: "10px", marginBottom: "10px" }}
  729. value={[
  730. searchInfor.lastSigningTimeStart
  731. ? moment(searchInfor.lastSigningTimeStart)
  732. : null,
  733. searchInfor.lastSigningTimeEnd ? moment(searchInfor.lastSigningTimeEnd) : null,
  734. ]}
  735. onChange={(data, dataString) => {
  736. this.setState({
  737. searchInfor: Object.assign(searchInfor, {
  738. lastSigningTimeStart: dataString[0],
  739. lastSigningTimeEnd: dataString[1],
  740. }),
  741. });
  742. }}
  743. />
  744. </span>
  745. <Button
  746. type="primary"
  747. onClick={() => {
  748. this.loadData();
  749. }}
  750. style={{ marginRight: "10px", marginBottom: "10px" }}
  751. >
  752. 搜索
  753. </Button>
  754. <Button
  755. onClick={this.resetAll}
  756. style={{ marginRight: "10px", marginBottom: "10px" }}
  757. >
  758. 重置
  759. </Button>
  760. </div>
  761. </TabPane>
  762. <TabPane tab="更改表格显示数据" key="2">
  763. <div style={{ marginLeft: 10 }}>
  764. <Spin spinning={this.state.loading}>
  765. <ChooseList
  766. columns={this.state.columns}
  767. changeFn={this.changeList}
  768. changeList={this.state.changeList}
  769. top={55}
  770. margin={11}
  771. />
  772. </Spin>
  773. </div>
  774. </TabPane>
  775. <TabPane tab="操作" key="3">
  776. <div style={{ float: "left" }}>
  777. <Button
  778. type="primary"
  779. loading={this.state.exportPendingLoading}
  780. onClick={this.exportExec}
  781. style={{ margin: 10 }}
  782. >
  783. 导出Excel
  784. </Button>
  785. </div>
  786. <div style={{ float: "left" }}>
  787. <Button
  788. type="primary"
  789. onClick={() => {
  790. this.setState({
  791. mvisible: "changelog",
  792. });
  793. }}
  794. style={{ margin: 10 }}
  795. disabled={this.state.selectedRowKeys.length !== 1}
  796. >
  797. 客户日志
  798. </Button>
  799. </div>
  800. <div style={{ float: "left" }}>
  801. <Button
  802. type="primary"
  803. onClick={() => {
  804. this.setState({
  805. mvisible: "channellog",
  806. });
  807. }}
  808. style={{ margin: 10 }}
  809. disabled={this.state.selectedRowKeys.length !== 1}
  810. >
  811. 转交日志
  812. </Button>
  813. </div>
  814. </TabPane>
  815. </Tabs>
  816. <div className="patent-table">
  817. <Spin spinning={this.state.loading}>
  818. <Table
  819. bordered
  820. size="middle"
  821. scroll={{ x: "110%" }}
  822. columns={
  823. this.state.changeList
  824. ? this.state.changeList
  825. : this.state.columns
  826. }
  827. dataSource={this.state.dataSource}
  828. pagination={this.state.pagination}
  829. rowSelection={rowSelection}
  830. />
  831. </Spin>
  832. </div>
  833. </div>
  834. {this.state.mvisible == "channellog" && (
  835. <ChannelLog
  836. cancel={this.closeDesc.bind(this)}
  837. visible={this.state.mvisible}
  838. id={selectedRows[0].id}
  839. />
  840. )}
  841. {this.state.mvisible == "changelog" && (
  842. <ChangeLog
  843. cancel={this.closeDesc.bind(this)}
  844. visible={this.state.mvisible}
  845. id={selectedRows[0].id}
  846. />
  847. )}
  848. {
  849. showDetail &&
  850. <Modal
  851. visible={showDetail}
  852. title={<div>
  853. <span style={{ marginRight: 20 }}>客户订单列表</span>
  854. <span style={{ color: "red" }}>客户名称:{rowData.nickname}</span>
  855. </div>}
  856. width="90%"
  857. footer={null}
  858. onCancel={this.closeDesc.bind(this)}
  859. >
  860. <DetailList
  861. // data={Object.assign(rowData, params)}
  862. data={rowData}
  863. />
  864. </Modal>
  865. }
  866. {
  867. followup &&
  868. <Modal
  869. visible={followup}
  870. title={<div>
  871. <span style={{ marginRight: 20 }}>客户跟进列表</span>
  872. <span style={{ color: "red" }}>客户名称:{rowData.nickname}</span>
  873. </div>}
  874. width="90%"
  875. footer={null}
  876. onCancel={this.closeDesc.bind(this)}
  877. >
  878. <Visit
  879. data={rowData}
  880. addbt={false}
  881. />
  882. </Modal>
  883. }
  884. </div>
  885. );
  886. }
  887. }
  888. export default SignCustomer;