index.jsx 26 KB

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