Explorar o código

签单客户汇总客户跟进列表

dev01 %!s(int64=2) %!d(string=hai) anos
pai
achega
6bb9789de6

+ 14 - 10
js/component/manageCenter/channelList/channelunit/detail/visit.jsx

@@ -312,22 +312,26 @@ const Visit = React.createClass({
     });
   },
   render() {
+    const { addbt = true } = this.props
     return (
       <div className="clearfix">
         <Alert
           message="注:面谈公出补充,沟通完后记录今天交流的情况。计划下一次什么时候再面谈?该如何面谈?该如何跟进?"
           banner
         />
-        <Button
-          onClick={(e) => {
-            e.stopPropagation();
-            this.visit();
-          }}
-          type="primary"
-          style={{ marginTop: "10px", float: "right" }}
-        >
-          渠道跟进
-        </Button>
+        {
+          addbt &&
+          <Button
+            onClick={(e) => {
+              e.stopPropagation();
+              this.visit();
+            }}
+            type="primary"
+            style={{ marginTop: "10px", float: "right" }}
+          >
+            渠道跟进
+          </Button>
+        }
         <Spin spinning={this.state.loading}>
           <Table
             size="middle"

+ 0 - 38
js/component/manageCenter/customer/signcustomer/detaillist.jsx

@@ -251,44 +251,6 @@ class DetailList extends Component {
       }
     );
   }
-  // 导出Excel
-  exportExec() {
-    this.setState({
-      exportPendingLoading: true,
-    });
-    message.config({
-      duration: 20,
-    });
-    let loading = message.loading("下载中...");
-    let data = this.state.searchInfor;
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      crossDomain: false,
-      url:
-        globalConfig.context + "/api/admin/release/publicReleaseDtails/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;
-  }
   // 整行点击
   tableRowClick(record) {
     this.state.orderData = record;

+ 58 - 14
js/component/manageCenter/customer/signcustomer/index.jsx

@@ -22,6 +22,7 @@ import moment from "moment";
 import ChannelLog from "../../channelList/channelunit/channellog"; //转交日志
 import ChangeLog from "../../channelList/channelunit/changelog"; //更名日志
 import DetailList from "./detaillist";//客户订单列表
+import Visit from "../../channelList/channelunit/detail/visit"
 
 const { TabPane } = Tabs;
 const { RangePicker } = DatePicker;
@@ -56,10 +57,24 @@ class SignCustomer extends Component {
           title: "签单次数",
           dataIndex: "signNumber",
           key: "signNumber",
+          onCellClick: (r) => {
+            let rows = {};
+            rows["nickname"] = r.nickname
+            rows["uid"] = r.id
+            this.setState({
+              rowData: rows,
+              showDetail: true,
+            });
+          },
           render: (text) =>
-            <span style={{ color: "#58A3FF", textDecoration: "underline" }}>
+            <div
+              style={{
+                color: "#58A3FF",
+                textDecoration: "underline",
+                cursor: "pointer"
+              }}>
               {text}
-            </span>
+            </div>
         },
         {
           title: "总金额(万元)",
@@ -117,6 +132,24 @@ class SignCustomer extends Component {
           title: "次数",
           dataIndex: "followNumber",
           key: "followNumber",
+          onCellClick: (r) => {
+            let rows = {};
+            rows["nickname"] = r.nickname
+            rows["id"] = r.id
+            this.setState({
+              rowData: rows,
+              followup: true,
+            });
+          },
+          render: (text) =>
+            <div
+              style={{
+                color: "#58A3FF",
+                textDecoration: "underline",
+                cursor: "pointer"
+              }}>
+              {text}
+            </div>
         },
         {
           title: "最新跟进时间",
@@ -145,6 +178,8 @@ class SignCustomer extends Component {
       dataSource: [],
       searchInfor: {},
       mvisible: "",
+      showDetail: false,
+      followup: false,
     };
     this.loadData = this.loadData.bind(this);
     this.resetAll = this.resetAll.bind(this);
@@ -429,19 +464,11 @@ class SignCustomer extends Component {
     this.setState({
       mvisible: "",
       showDetail: false,
+      followup: false,
+      rowData: {}
     });
     this.loadData(this.state.pageNo);
   }
-  // 点击行
-  tableRowClick(record) {
-    let rows ={};
-    rows["nickname"]=record.nickname
-    rows["uid"]=record.id
-    this.setState({
-      rowData: rows,
-      showDetail: true,
-    });
-  }
 
   componentWillMount() {
     this.loadData();
@@ -449,7 +476,7 @@ class SignCustomer extends Component {
   }
 
   render() {
-    const { searchInfor, selectedRowKeys, selectedRows, showDetail, rowData } = this.state
+    const { searchInfor, selectedRowKeys, selectedRows, showDetail, followup, rowData } = this.state
     const dataSources = this.state.customerArr || [];
     const options = dataSources.map((group) => (
       <Select.Option key={group.id} value={group.name}>
@@ -825,7 +852,6 @@ class SignCustomer extends Component {
                 dataSource={this.state.dataSource}
                 pagination={this.state.pagination}
                 rowSelection={rowSelection}
-                onRowDoubleClick={this.tableRowClick.bind(this)}
               />
             </Spin>
           </div>
@@ -862,6 +888,24 @@ class SignCustomer extends Component {
             />
           </Modal>
         }
+        {
+          followup &&
+          <Modal
+            visible={followup}
+            title={<div>
+              <span style={{ marginRight: 20 }}>客户跟进列表</span>
+              <span style={{ color: "red" }}>客户名称:{rowData.nickname}</span>
+            </div>}
+            width="90%"
+            footer={null}
+            onCancel={this.closeDesc.bind(this)}
+          >
+            <Visit
+              data={rowData}
+              addbt={false}
+            />
+          </Modal>
+        }
       </div>
     );
   }

+ 28 - 65
js/component/manageCenter/customer/signcustomer/statistics.jsx

@@ -36,29 +36,11 @@ class SignStatistics extends Component {
           title: "营销员",
           dataIndex: "name",
           key: "name",
-          onCellClick: (r) => {
-            let cellData = {};
-            cellData["aid"] = r.id
-            cellData["aname"] = r.name
-            this.setState({
-              showDetail: true,
-              rowData: cellData,
-            })
-          },
         },
         {
           title: "签单客户",
           dataIndex: "userCount",
           key: "userCount",
-          onCellClick: (r) => {
-            let cellData = {};
-            cellData["aid"] = r.id
-            cellData["aname"] = r.name
-            this.setState({
-              showDetail: true,
-              rowData: cellData,
-            })
-          },
         },
         {
           title: "签单个数",
@@ -74,23 +56,19 @@ class SignStatistics extends Component {
             })
           },
           render: (text) =>
-            <span style={{ color: "#58A3FF", textDecoration: "underline" }}>
+            <div
+              style={{
+                color: "#58A3FF",
+                textDecoration: "underline",
+                cursor: "pointer"
+              }}>
               {text}
-            </span>
+            </div>
         },
         {
           title: "签单总金额(万元)",
           dataIndex: "totalAmount",
           key: "totalAmount",
-          onCellClick: (r) => {
-            let cellData = {};
-            cellData["aid"] = r.id
-            cellData["aname"] = r.name
-            this.setState({
-              showDetail: true,
-              rowData: cellData,
-            })
-          },
         },
         {
           title: "新签数",
@@ -107,24 +85,19 @@ class SignStatistics extends Component {
             })
           },
           render: (text) =>
-            <span style={{ color: "#58A3FF", textDecoration: "underline" }}>
+            <div
+              style={{
+                color: "#58A3FF",
+                textDecoration: "underline",
+                cursor: "pointer"
+              }}>
               {text}
-            </span>
+            </div>
         },
         {
           title: "新签率",
           dataIndex: "newRatio",
           key: "newRatio",
-          onCellClick: (r) => {
-            let cellData = {};
-            cellData["aid"] = r.id
-            cellData["aname"] = r.name
-            cellData["orderType"] = "1"
-            this.setState({
-              showDetail: true,
-              rowData: cellData,
-            })
-          },
           render: (text) =>
             <span >
               {getPercentage(text)}
@@ -145,24 +118,19 @@ class SignStatistics extends Component {
             })
           },
           render: (text) =>
-            <span style={{ color: "#58A3FF", textDecoration: "underline" }}>
+            <div
+              style={{
+                color: "#58A3FF",
+                textDecoration: "underline",
+                cursor: "pointer"
+              }}>
               {text}
-            </span>
+            </div>
         },
         {
           title: "复购率",
           dataIndex: "repeatRatio",
           key: "repeatRatio",
-          onCellClick: (r) => {
-            let cellData = {};
-            cellData["aid"] = r.id
-            cellData["aname"] = r.name
-            cellData["orderType"] = "2"
-            this.setState({
-              showDetail: true,
-              rowData: cellData,
-            })
-          },
           render: (text) =>
             <span >
               {getPercentage(text)}
@@ -183,24 +151,19 @@ class SignStatistics extends Component {
             })
           },
           render: (text) =>
-            <span style={{ color: "#58A3FF", textDecoration: "underline" }}>
+            <div
+              style={{
+                color: "#58A3FF",
+                textDecoration: "underline",
+                cursor: "pointer"
+              }}>
               {text}
-            </span>
+            </div>
         },
         {
           title: "渠道签单率",
           dataIndex: "channelRatio",
           key: "channelRatio",
-          onCellClick: (r) => {
-            let cellData = {};
-            cellData["aid"] = r.id
-            cellData["aname"] = r.name
-            cellData["orderType"] = "3"
-            this.setState({
-              showDetail: true,
-              rowData: cellData,
-            })
-          },
           render: (text) =>
             <span >
               {getPercentage(text)}

+ 1 - 1
js/component/manageCenter/order/orderNew/addService.jsx

@@ -5078,7 +5078,7 @@ const NewService = Form.create()(
                             ? ssalesType : this.state.userType == "1"
                               ? qsalesType : []).map(function (item) {
                                 return (
-                                  <Select.Option key={item.value}>
+                                  <Select.Option key={item.value} disabled={item.value == "5"}>
                                     {item.key}
                                   </Select.Option>
                                 );

+ 1 - 1
js/component/manageCenter/order/orderNew/updatesales.jsx

@@ -237,7 +237,7 @@ class UpdateSales extends Component {
                       ? qsalesType : datas.userType == "2"
                         ? [...ssalesType, ...qsalesType] : []).map(function (item) {
                           return (
-                            <Select.Option key={item.value}>
+                            <Select.Option key={item.value} disabled={item.value == "5"}>
                               {item.key}
                             </Select.Option>
                           );