Bläddra i källkod

客户类型、客服入群

dev01 1 vecka sedan
förälder
incheckning
588d1264cf

+ 6 - 0
js/component/common/cascaders/index.jsx

@@ -120,6 +120,12 @@ class Cascaders extends Component {
       isFous: true,
     })
   }
+  // 设置默认选项
+  setDefault(list) {
+    this.setState({
+      checkedList: list
+    })
+  }
   // 代码二级联动
   itemHandle(iD, checked = true) {
     const { id = "id", children = "list" } = this.props

+ 14 - 0
js/component/common/enterpriseNameChange/index.jsx

@@ -153,6 +153,20 @@ class EnterpriseNameChange extends Component {
                     loading={this.state.loading}
                     style={this.props.style}
                     onClick={() => {
+                      if (!this.props.data.level && this.props.data.level != 0) {
+                        Modal.warning({
+                          title: '系统提示',
+                          content: (
+                            <div>
+                              <p>请先设置客户类型。操作位置:</p>
+                              <p>1.勾选客户名称</p>
+                              <p>2.点击切换至“操作”项</p>
+                              <p>3.选择相应的客户类型即可。</p>
+                            </div>
+                          ),
+                        });
+                        return
+                      }
                         if (this.props.type === 'journal') {
                             this.loadData();
                         }

+ 14 - 0
js/component/common/enterpriseNameChange/inforChange.jsx

@@ -82,6 +82,20 @@ class InforChange extends Component {
   }
 
   onChange(type) {
+    if (!this.props.data.level && this.props.data.level != 0) {
+      Modal.warning({
+        title: '系统提示',
+        content: (
+          <div>
+            <p>请先设置客户类型。操作位置:</p>
+            <p>1.勾选客户名称</p>
+            <p>2.点击切换至“操作”项</p>
+            <p>3.选择相应的客户类型即可。</p>
+          </div>
+        ),
+      });
+      return
+    }
     this.setState({
       visible: true,
       changeType: type,

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 746 - 723
js/component/manageCenter/customer/NEW/intentionCustomer/addIntention.jsx


+ 20 - 8
js/component/manageCenter/customer/NEW/intentionCustomer/intentionCustomer.jsx

@@ -276,13 +276,13 @@ const IntentionCustomer = Form.create()(
             title: "客户等级",
             dataIndex: "level",
             key: "level",
-            render: (text) => {
+            render: (text, record) => {
               if (text == 0) {
-                return <Tag color="#87d068">一般客户</Tag>;
+                return <Tag color="#87d068">一般客户(一年以上预签)</Tag>;
               } else if (text == 1) {
-                return <Tag color="#D2691E">意向客户</Tag>;
+                return <Tag color="#D2691E">意向客户(半年内预签)</Tag>;
               } else if (text == 2) {
-                return <Tag color="#FF0000">重点客户</Tag>;
+                return <Tag color="#FF0000">重点客户(一个月内预签)</Tag>;
               } else {
                 return "";
               }
@@ -316,6 +316,18 @@ const IntentionCustomer = Form.create()(
                           },
                           onCancel() { },
                         });
+                      } else if (!record.level && record.level != 0) {
+                        Modal.warning({
+                          title: '系统提示',
+                          content: (
+                            <div>
+                              <p>请先设置客户类型。操作位置:</p>
+                              <p>1.勾选客户名称</p>
+                              <p>2.点击切换至“操作”项</p>
+                              <p>3.选择相应的客户类型即可。</p>
+                            </div>
+                          ),
+                        });
                       } else {
                         this.visit(record);
                       }
@@ -1005,16 +1017,16 @@ const IntentionCustomer = Form.create()(
                   />
                 </span>
                 <Select
-                  style={{ width: 120 }}
+                  style={{ width: 180 }}
                   value={this.state.level}
                   onChange={(e) => {
                     this.setState({ level: e });
                   }}
                   placeholder="请选择客户等级"
                 >
-                  <Select.Option value="0">一般客户</Select.Option>
-                  <Select.Option value="1">意向客户</Select.Option>
-                  <Select.Option value="2">重点客户</Select.Option>
+                  <Select.Option value="0">一般客户(一年以上预签)</Select.Option>
+                  <Select.Option value="1">意向客户(半年内预签)</Select.Option>
+                  <Select.Option value="2">重点客户(一个月内预签)</Select.Option>
                 </Select>
                 <RangePicker
                   value={[

+ 14 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visit.jsx

@@ -449,6 +449,20 @@ const Visit = React.createClass({
           <Button
             onClick={(e) => {
               e.stopPropagation();
+              if(!this.props.data.level && this.props.data.level != 0){
+                Modal.warning({
+                  title: '系统提示',
+                  content: (
+                    <div>
+                      <p>请先设置客户类型。操作位置:</p>
+                      <p>1.勾选客户名称</p>
+                      <p>2.点击切换至“操作”项</p>
+                      <p>3.选择相应的客户类型即可。</p>
+                    </div>
+                  ),
+                });
+                return
+              }
               // 是限定项目
               if (!isLimit) {
                 if (!this.props.data.orgCode) {

+ 87 - 0
js/component/manageCenter/customer/statistics/departmentStatistics/index.jsx

@@ -264,6 +264,36 @@ class DepartmentStatistics extends Component {
             );
           },
         },
+        {
+          title: <div style={{ color: 'red' }}>
+            <div>重点客户</div>
+            <div>(一个月内预签)</div>
+          </div>,
+          dataIndex: "keynoteCount",
+          key: "keynoteCount",
+          className: 'tableRowStyle',
+          width: 120,
+        },
+        {
+          title: <div style={{ color: 'orange' }}>
+            <div>意向客户</div>
+            <div>(半年内预签)</div>
+          </div>,
+          dataIndex: "intentionCount",
+          key: "intentionCount",
+          className: 'tableRowStyle',
+          width: 120,
+        },
+        {
+          title: <div style={{ color: 'green' }}>
+            <div>一般客户</div>
+            <div>(一年以上预签)</div>
+          </div>,
+          dataIndex: "generalCount",
+          key: "generalCount",
+          className: 'tableRowStyle',
+          width: 120,
+        },
       ],
       contactsOption: null,
       loading: false,
@@ -271,11 +301,13 @@ class DepartmentStatistics extends Component {
       aid: '',
       type: '',
       visible: false,
+      exportPendingLoading: false,
     };
     this.loadData = this.loadData.bind(this);
     this.reset = this.reset.bind(this);
     this.selectSuperId = this.selectSuperId.bind(this);
     this.changeList = this.changeList.bind(this);
+    this.exportExec = this.exportExec.bind(this);
   }
 
   componentDidMount() {
@@ -336,6 +368,49 @@ class DepartmentStatistics extends Component {
     );
   };
 
+  exportExec() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
+
+    let data = {
+      depId: this.state.superId,
+      aName: this.state.nameSearch,
+      startTime: this.state.releaseDate[0],
+      endTime: this.state.releaseDate[1],
+    }
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: '/api/admin/customer/selectAllUser/export',
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  }
+
+  download(fileName) {
+    window.location.href =
+      globalConfig.context + "/open/download?fileName=" + fileName;
+  }
+
   //表格数据处理
   handleTabsInfor(infor) {
     for (let i = 0; i < infor.length; i++) {
@@ -512,6 +587,18 @@ class DepartmentStatistics extends Component {
               />
             </div>
           </TabPane>
+          <TabPane tab="导出" key="3">
+            <div style={{ float: "left" }}>
+              <Button
+                type='primary'
+                loading={this.state.exportPendingLoading}
+                onClick={this.exportExec}
+                style={{ margin: 10 }}
+              >
+                导出excel
+              </Button>
+            </div>
+          </TabPane>
         </Tabs>
         <div className="patent-table">
           <Spin spinning={this.state.loading}>

+ 131 - 8
js/component/manageCenter/customerService/administration/followUp.jsx

@@ -1,5 +1,5 @@
 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 FollowUpDetails from './followUpDetails';
 import CorrespondingDetails from './correspondingDetails';
@@ -7,6 +7,7 @@ import OrderItemStatus from '../../../../component/common/orderItemStatus';
 import $ from "jquery";
 import { ShowModal } from "@/tools";
 import ShowModalDiv from "@/showModal.jsx";
+import './index.less';
 import moment from "moment";
 import Cascaders from "../../../../component/common/cascaders";
 
@@ -166,6 +167,26 @@ class FollowUp extends Component {
           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: "是否已添微信",
           dataIndex: "addWechat",
           key: "addWechat",
@@ -298,6 +319,7 @@ class FollowUp extends Component {
       customerName: '',
       releaseDate: [],
       signTimes: [],
+      addGroupChatTimes: [],
     }
     this.changeList = this.changeList.bind(this);
     this.loadData = this.loadData.bind(this);
@@ -308,7 +330,8 @@ class FollowUp extends Component {
   }
 
   componentDidMount() {
-    this.loadData();
+    this.selectSuperId();
+    // this.loadData();
   }
 
   search() {
@@ -317,6 +340,7 @@ class FollowUp extends Component {
 
   reset() {
     this.setState({
+      addGroupChat: undefined,
       customerName: undefined,
       contractNo: undefined,
       depId: undefined,
@@ -324,6 +348,7 @@ class FollowUp extends Component {
       renewal: undefined,
       releaseDate: [],
       signTimes: [],
+      addGroupChatTimes: [],
     }, () => {
       this.Cascaders.empty();
       this.loadData();
@@ -351,6 +376,9 @@ class FollowUp extends Component {
         startSignTimes: this.state.signTimes[0] || undefined,
         endSignTimes: this.state.signTimes[1] || 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) {
         ShowModal(this);
@@ -445,6 +473,73 @@ class FollowUp extends Component {
     window.location.href =
       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() {
     return (
@@ -457,7 +552,7 @@ class FollowUp extends Component {
           <TabPane tab="搜索" key="1" style={{ padding: '10px 0' }}>
             <Input
               placeholder="客户名称"
-              style={{ width: "150px", marginRight: 10, marginBottom: "10px" }}
+              style={{ width: "160px", marginRight: 10, marginBottom: "10px" }}
               value={this.state.customerName}
               onChange={(e) => {
                 this.setState({ customerName: e.target.value });
@@ -465,7 +560,7 @@ class FollowUp extends Component {
             />
             <Input
               placeholder="合同编号"
-              style={{ width: "150px", marginRight: 10, marginBottom: "10px" }}
+              style={{ width: "160px", marginRight: 10, marginBottom: "10px" }}
               value={this.state.contractNo}
               onChange={(e) => {
                 this.setState({ contractNo: e.target.value });
@@ -483,7 +578,7 @@ class FollowUp extends Component {
             />
             <Select
               placeholder="是否已添微信"
-              style={{ width: 120, marginRight: 10, marginBottom: "10px" }}
+              style={{ width: 150, marginRight: 10, marginBottom: "10px" }}
               value={this.state.addWechat}
               onChange={(e) => {
                 this.setState({ addWechat: e });
@@ -494,7 +589,7 @@ class FollowUp extends Component {
             </Select>
             <Select
               placeholder="续签情况"
-              style={{ width: 220, marginRight: 10, marginBottom: "10px" }}
+              style={{ width: 210, marginRight: 10, marginBottom: "10px" }}
               value={this.state.renewal}
               onChange={(e) => {
                 this.setState({ renewal: e });
@@ -510,7 +605,7 @@ class FollowUp extends Component {
             </Select>
             <span style={{ marginRight: "10px", marginBottom: "10px" }}>跟进时间 :</span>
             <RangePicker
-              style={{ marginBottom: "10px", width: '187px' }}
+              style={{ marginBottom: "10px", width: '200px' }}
               value={[
                 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>
             <RangePicker
-              style={{ marginBottom: "10px", width: '187px' }}
+              style={{ marginBottom: "10px", width: '200px' }}
               value={[
                 this.state.signTimes[0]
                   ? moment(this.state.signTimes[0])
@@ -538,6 +633,34 @@ class FollowUp extends Component {
                 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
               type="primary"
               onClick={this.search}

+ 7 - 0
js/component/manageCenter/customerService/administration/index.less

@@ -0,0 +1,7 @@
+.ant-switch {
+  background-color: red
+}
+
+.ant-switch-checked {
+  background-color: #87D068;
+}

+ 1 - 1
js/component/manageCenter/financialManage/account/accountlist.jsx

@@ -253,7 +253,7 @@ const AccountList = React.createClass({
       pageNo: pageNo || 1,
       pageSize: pagination.pageSize,
       expenseMain: 0,
-      processStatus: this.props.isOperate ? 1 : 2,
+      // processStatus: this.props.isOperate ? 1 : 2,
     });
     $.ajax({
       method: "get",

+ 2 - 2
js/component/manageCenter/project/project/score.jsx

@@ -204,7 +204,7 @@ const ProjecScore = Form.create()(React.createClass({
               name: item.name,
               id: item.id,
             });
-            if (item.name.includes("研发服务事业部")) {
+            if (item.name == "科德-研发服务事业部") {
               searchValues["depId"] = item.id
             }
           });
@@ -337,7 +337,7 @@ const ProjecScore = Form.create()(React.createClass({
       <div className="user-content">
         <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
         <div className="content-title" style={{ marginBottom: 10 }}>
-          <span style={{ fontWeight: 900, fontSize: 16 }}>评分列表</span>
+          <span style={{ fontWeight: 900, fontSize: 16 }}>科德研发服务评价系统</span>
         </div>
         <div className="user-search">
           <Tabs

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.3.26",
+  "version": "1.3.27",
   "description": "",
   "main": "index.js",
   "scripts": {