|
@@ -1,5 +1,5 @@
|
|
import React, { Component } from "react";
|
|
import React, { Component } from "react";
|
|
-import { Button, DatePicker, Icon, Input, message, Select, Spin, Table, Tabs, Tag, Tooltip } from "antd";
|
|
|
|
|
|
+import { Button, DatePicker, Icon, Input, message, Select, Spin, Table, Tabs, Tag, Tooltip, Switch } from "antd";
|
|
import { ChooseList } from "../../order/orderNew/chooseList";
|
|
import { ChooseList } from "../../order/orderNew/chooseList";
|
|
import FollowUpDetails from './followUpDetails';
|
|
import FollowUpDetails from './followUpDetails';
|
|
import CorrespondingDetails from './correspondingDetails';
|
|
import CorrespondingDetails from './correspondingDetails';
|
|
@@ -7,6 +7,7 @@ import OrderItemStatus from '../../../../component/common/orderItemStatus';
|
|
import $ from "jquery";
|
|
import $ from "jquery";
|
|
import { ShowModal } from "@/tools";
|
|
import { ShowModal } from "@/tools";
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
|
|
+import './index.less';
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
import Cascaders from "../../../../component/common/cascaders";
|
|
import Cascaders from "../../../../component/common/cascaders";
|
|
|
|
|
|
@@ -166,6 +167,26 @@ class FollowUp extends Component {
|
|
key: "adminName",
|
|
key: "adminName",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ title: "是否入群",
|
|
|
|
+ dataIndex: "addGroupChat",
|
|
|
|
+ key: "addGroupChat",
|
|
|
|
+ onCellClick: (record, e) => {
|
|
|
|
+ e.stopPropagation()
|
|
|
|
+ },
|
|
|
|
+ render: (text, record) => {
|
|
|
|
+ return (
|
|
|
|
+ <div>
|
|
|
|
+ <Switch checked={text == 1}
|
|
|
|
+ onChange={() => {
|
|
|
|
+ this.upAddGroupChat(record.uid, text == 0 ? 1 : 0)
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ <div>{record.addGroupChatTime}</div>
|
|
|
|
+ </div>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
title: "是否已添微信",
|
|
title: "是否已添微信",
|
|
dataIndex: "addWechat",
|
|
dataIndex: "addWechat",
|
|
key: "addWechat",
|
|
key: "addWechat",
|
|
@@ -298,6 +319,7 @@ class FollowUp extends Component {
|
|
customerName: '',
|
|
customerName: '',
|
|
releaseDate: [],
|
|
releaseDate: [],
|
|
signTimes: [],
|
|
signTimes: [],
|
|
|
|
+ addGroupChatTimes: [],
|
|
}
|
|
}
|
|
this.changeList = this.changeList.bind(this);
|
|
this.changeList = this.changeList.bind(this);
|
|
this.loadData = this.loadData.bind(this);
|
|
this.loadData = this.loadData.bind(this);
|
|
@@ -308,7 +330,8 @@ class FollowUp extends Component {
|
|
}
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
- this.loadData();
|
|
|
|
|
|
+ this.selectSuperId();
|
|
|
|
+ // this.loadData();
|
|
}
|
|
}
|
|
|
|
|
|
search() {
|
|
search() {
|
|
@@ -317,6 +340,7 @@ class FollowUp extends Component {
|
|
|
|
|
|
reset() {
|
|
reset() {
|
|
this.setState({
|
|
this.setState({
|
|
|
|
+ addGroupChat: undefined,
|
|
customerName: undefined,
|
|
customerName: undefined,
|
|
contractNo: undefined,
|
|
contractNo: undefined,
|
|
depId: undefined,
|
|
depId: undefined,
|
|
@@ -324,6 +348,7 @@ class FollowUp extends Component {
|
|
renewal: undefined,
|
|
renewal: undefined,
|
|
releaseDate: [],
|
|
releaseDate: [],
|
|
signTimes: [],
|
|
signTimes: [],
|
|
|
|
+ addGroupChatTimes: [],
|
|
}, () => {
|
|
}, () => {
|
|
this.Cascaders.empty();
|
|
this.Cascaders.empty();
|
|
this.loadData();
|
|
this.loadData();
|
|
@@ -351,6 +376,9 @@ class FollowUp extends Component {
|
|
startSignTimes: this.state.signTimes[0] || undefined,
|
|
startSignTimes: this.state.signTimes[0] || undefined,
|
|
endSignTimes: this.state.signTimes[1] || undefined,
|
|
endSignTimes: this.state.signTimes[1] || undefined,
|
|
contractNo: this.state.contractNo || undefined,
|
|
contractNo: this.state.contractNo || undefined,
|
|
|
|
+ addGroupChat: this.state.addGroupChat,
|
|
|
|
+ addGroupChatTimeStart: this.state.addGroupChatTimes[0] || undefined,
|
|
|
|
+ addGroupChatTimeEnd: this.state.addGroupChatTimes[1] || undefined,
|
|
},
|
|
},
|
|
success: function (data) {
|
|
success: function (data) {
|
|
ShowModal(this);
|
|
ShowModal(this);
|
|
@@ -445,6 +473,73 @@ class FollowUp extends Component {
|
|
window.location.href =
|
|
window.location.href =
|
|
globalConfig.context + "/open/download?fileName=" + fileName;
|
|
globalConfig.context + "/open/download?fileName=" + fileName;
|
|
}
|
|
}
|
|
|
|
+ // 入群
|
|
|
|
+ upAddGroupChat(uid, addGroupChat) {
|
|
|
|
+ this.setState({
|
|
|
|
+ listLoading: true,
|
|
|
|
+ });
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "post",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: "/api/admin/updateUseService",
|
|
|
|
+ data: {
|
|
|
|
+ uid,
|
|
|
|
+ addGroupChat
|
|
|
|
+ },
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data.error.length === 0) {
|
|
|
|
+ this.loadData(this.state.page)
|
|
|
|
+ this.setState({
|
|
|
|
+ listLoading: false,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(
|
|
|
|
+ function () {
|
|
|
|
+ this.setState({
|
|
|
|
+ listLoading: false,
|
|
|
|
+ });
|
|
|
|
+ }.bind(this)
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ // 获取部门数据
|
|
|
|
+ selectSuperId() {
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "get",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ url: globalConfig.context + "/api/admin/organization/getAllDep",
|
|
|
|
+ data: {},
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data.error && data.error.length === 0) {
|
|
|
|
+ let list = data.data || []
|
|
|
|
+ let ids = []
|
|
|
|
+ for (var i = 0; i < list.length; i++) {
|
|
|
|
+ if (list[i].name.includes("湖南") || list[i].name.includes("内蒙古")) {
|
|
|
|
+ ids.push(list[i].id)
|
|
|
|
+ if (list[i].list.length > 0) {
|
|
|
|
+ for (var j = 0; j < list[i].list.length; j++) {
|
|
|
|
+ ids.push(list[i].list[j].id)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.Cascaders.setDefault(ids)
|
|
|
|
+ this.setState({
|
|
|
|
+ depId: ids.length == 0 ? undefined : JSON.stringify(ids)
|
|
|
|
+ }, () => {
|
|
|
|
+ this.loadData();
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ // message.warning(data.error[0].message);
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(
|
|
|
|
+
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
|
|
render() {
|
|
render() {
|
|
return (
|
|
return (
|
|
@@ -457,7 +552,7 @@ class FollowUp extends Component {
|
|
<TabPane tab="搜索" key="1" style={{ padding: '10px 0' }}>
|
|
<TabPane tab="搜索" key="1" style={{ padding: '10px 0' }}>
|
|
<Input
|
|
<Input
|
|
placeholder="客户名称"
|
|
placeholder="客户名称"
|
|
- style={{ width: "150px", marginRight: 10, marginBottom: "10px" }}
|
|
|
|
|
|
+ style={{ width: "160px", marginRight: 10, marginBottom: "10px" }}
|
|
value={this.state.customerName}
|
|
value={this.state.customerName}
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
this.setState({ customerName: e.target.value });
|
|
this.setState({ customerName: e.target.value });
|
|
@@ -465,7 +560,7 @@ class FollowUp extends Component {
|
|
/>
|
|
/>
|
|
<Input
|
|
<Input
|
|
placeholder="合同编号"
|
|
placeholder="合同编号"
|
|
- style={{ width: "150px", marginRight: 10, marginBottom: "10px" }}
|
|
|
|
|
|
+ style={{ width: "160px", marginRight: 10, marginBottom: "10px" }}
|
|
value={this.state.contractNo}
|
|
value={this.state.contractNo}
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
this.setState({ contractNo: e.target.value });
|
|
this.setState({ contractNo: e.target.value });
|
|
@@ -483,7 +578,7 @@ class FollowUp extends Component {
|
|
/>
|
|
/>
|
|
<Select
|
|
<Select
|
|
placeholder="是否已添微信"
|
|
placeholder="是否已添微信"
|
|
- style={{ width: 120, marginRight: 10, marginBottom: "10px" }}
|
|
|
|
|
|
+ style={{ width: 150, marginRight: 10, marginBottom: "10px" }}
|
|
value={this.state.addWechat}
|
|
value={this.state.addWechat}
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
this.setState({ addWechat: e });
|
|
this.setState({ addWechat: e });
|
|
@@ -494,7 +589,7 @@ class FollowUp extends Component {
|
|
</Select>
|
|
</Select>
|
|
<Select
|
|
<Select
|
|
placeholder="续签情况"
|
|
placeholder="续签情况"
|
|
- style={{ width: 220, marginRight: 10, marginBottom: "10px" }}
|
|
|
|
|
|
+ style={{ width: 210, marginRight: 10, marginBottom: "10px" }}
|
|
value={this.state.renewal}
|
|
value={this.state.renewal}
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
this.setState({ renewal: e });
|
|
this.setState({ renewal: e });
|
|
@@ -510,7 +605,7 @@ class FollowUp extends Component {
|
|
</Select>
|
|
</Select>
|
|
<span style={{ marginRight: "10px", marginBottom: "10px" }}>跟进时间 :</span>
|
|
<span style={{ marginRight: "10px", marginBottom: "10px" }}>跟进时间 :</span>
|
|
<RangePicker
|
|
<RangePicker
|
|
- style={{ marginBottom: "10px", width: '187px' }}
|
|
|
|
|
|
+ style={{ marginBottom: "10px", width: '200px' }}
|
|
value={[
|
|
value={[
|
|
this.state.releaseDate[0]
|
|
this.state.releaseDate[0]
|
|
? moment(this.state.releaseDate[0])
|
|
? moment(this.state.releaseDate[0])
|
|
@@ -525,7 +620,7 @@ class FollowUp extends Component {
|
|
/>
|
|
/>
|
|
<span style={{ marginRight: "10px", marginLeft: "10px", marginBottom: "10px" }}>下单时间 :</span>
|
|
<span style={{ marginRight: "10px", marginLeft: "10px", marginBottom: "10px" }}>下单时间 :</span>
|
|
<RangePicker
|
|
<RangePicker
|
|
- style={{ marginBottom: "10px", width: '187px' }}
|
|
|
|
|
|
+ style={{ marginBottom: "10px", width: '200px' }}
|
|
value={[
|
|
value={[
|
|
this.state.signTimes[0]
|
|
this.state.signTimes[0]
|
|
? moment(this.state.signTimes[0])
|
|
? moment(this.state.signTimes[0])
|
|
@@ -538,6 +633,34 @@ class FollowUp extends Component {
|
|
this.setState({ signTimes: dataString });
|
|
this.setState({ signTimes: dataString });
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
|
|
+ <span style={{ marginRight: "10px", marginLeft: "10px", marginBottom: "10px" }}>入群 :</span>
|
|
|
|
+ <Select
|
|
|
|
+ placeholder="是否入群"
|
|
|
|
+ style={{ width: 120, marginBottom: "10px" }}
|
|
|
|
+ value={this.state.addGroupChat}
|
|
|
|
+ onChange={(e) => {
|
|
|
|
+ this.setState({ addGroupChat: e });
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <Option value={null}>全部</Option>
|
|
|
|
+ <Option value={0}>未入群</Option>
|
|
|
|
+ <Option value={1}>已入群</Option>
|
|
|
|
+ </Select>
|
|
|
|
+ <span style={{ marginRight: "10px", marginLeft: "10px", marginBottom: "10px" }}>入群时间 :</span>
|
|
|
|
+ <RangePicker
|
|
|
|
+ style={{ marginBottom: "10px", width: '200px' }}
|
|
|
|
+ value={[
|
|
|
|
+ this.state.addGroupChatTimes[0]
|
|
|
|
+ ? moment(this.state.addGroupChatTimes[0])
|
|
|
|
+ : null,
|
|
|
|
+ this.state.addGroupChatTimes[1]
|
|
|
|
+ ? moment(this.state.addGroupChatTimes[1])
|
|
|
|
+ : null,
|
|
|
|
+ ]}
|
|
|
|
+ onChange={(data, dataString) => {
|
|
|
|
+ this.setState({ addGroupChatTimes: dataString });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
<Button
|
|
<Button
|
|
type="primary"
|
|
type="primary"
|
|
onClick={this.search}
|
|
onClick={this.search}
|