dev01 2 years ago
parent
commit
891a267a7c

+ 4 - 1
js/component/dataDic.js

@@ -3962,7 +3962,10 @@ module.exports = {
     },{
       value:14,
       label:'离职签单业务转交',
-    },
+    },{
+      value:15,
+      label:'领取为私有渠道',
+    }
   ],
   //消息提醒状态
   //状态 0 未提醒 1 剩余90天 2剩余30天 3剩余20天 4剩余10天 5剩余3天 6剩余2天 7剩余1天

+ 15 - 8
js/component/manageCenter/channelList/channelunit/index.jsx

@@ -1,4 +1,4 @@
-// 渠道列表
+// 私有渠道列表
 import React, { Component } from "react";
 import {
   Form,
@@ -306,7 +306,7 @@ class ChannelUnit extends Component {
     this.setState({
       mvisible: "",
     });
-    this.loadData();
+    this.loadData(this.pageNo);
   }
   // 转交提示
   showConfirm() {
@@ -385,7 +385,7 @@ class ChannelUnit extends Component {
           }
           this.loadData(
             Math.min(
-              this.state.ispage == undefined ? 1 : this.state.ispage,
+              this.state.pageNo == undefined ? 1 : this.state.pageNo,
               Math.ceil((this.state.pagination.total - 1) / 10)
             )
           );
@@ -397,7 +397,7 @@ class ChannelUnit extends Component {
   }
   // 移出渠道
   remove() {
-    const { dataSource, selectedRows, ispage } = this.state;
+    const { dataSource, selectedRows, pageNo } = this.state;
     const _this = this
     Modal.confirm({
       title: "您确定将以下渠道移至公共渠道吗??",
@@ -448,10 +448,10 @@ class ChannelUnit extends Component {
             }
             _this.loadData(
               dataSource.length === 1
-                ? ispage === 1
+                ? pageNo === 1
                   ? 1
-                  : ispage - 1
-                : ispage
+                  : pageNo - 1
+                : pageNo
             )
           }.bind(this),
         }).always(
@@ -575,7 +575,7 @@ class ChannelUnit extends Component {
           this.state.paginations.current = data.data.pageNo;
           this.state.paginations.total = data.data.totalCount;
           this.setState({
-            ispage: data.data.pageNo,
+            pageNo: data.data.pageNo,
           });
         }
         if (data.data.list && !data.data.list.length) {
@@ -797,6 +797,13 @@ class ChannelUnit extends Component {
                 >
                   重置
                 </Button>
+                <Button
+                  type="primary"
+                  onClick={this.addClick.bind(this)}
+                  style={{ display: "float", float: "right" }}
+                >
+                  新增渠道
+                </Button>
               </Form>
             </div>
           </TabPane>

+ 3 - 3
js/component/manageCenter/channelList/channelunit/publist.jsx

@@ -1,4 +1,4 @@
-// 渠道列表
+// 公共渠道列表
 import React, { Component } from "react";
 import {
   Form,
@@ -144,7 +144,7 @@ class ChannelUnit extends Component {
         } else {
           message.warning(data.error[0].message);
         }
-        this.loadData(this.state.ispage);
+        this.loadData(this.state.pageNo);
       }.bind(this)
     );
   }
@@ -248,7 +248,7 @@ class ChannelUnit extends Component {
     this.setState({
       mvisible: "",
     });
-    this.loadData();
+    this.loadData(this.state.pageNo);
   }
 
   render() {

+ 4 - 6
js/component/manageCenter/order/orderNew/reject.jsx

@@ -880,7 +880,7 @@ const IntentionCustomer = Form.create()(
             this.xiangmu(this.state.orderNo);
             this.jiedianNew(this.state.orderNo);
             this.jiedian(this.state.orderNo);
-            this.loadData();
+            this.loadData(this.state.pageNo);
           } else {
             message.warning(data.error[0].message);
           }
@@ -1576,8 +1576,7 @@ const IntentionCustomer = Form.create()(
               visible: false,
               flag: false,
             });
-            this.resets();
-            this.loadData();
+            this.loadData(this.state.pageNo);
           }
         }.bind(this),
       }).always(
@@ -1613,8 +1612,7 @@ const IntentionCustomer = Form.create()(
               visible: false,
               flag: false,
             });
-            this.resets();
-            this.loadData();
+            this.loadData(this.state.pageNo);
           }
         }.bind(this),
       }).always(
@@ -1770,7 +1768,7 @@ const IntentionCustomer = Form.create()(
         addFlag: false,
         boFlag: false,
       });
-      this.resets();
+      this.loadData(this.state.pageNo);
     },
     visitOk() {
       this.setState({

+ 15 - 10
js/component/manageCenter/order/orderNew/updatesales.jsx

@@ -90,7 +90,7 @@ class UpdateSales extends Component {
       }.bind(this)
     );
   }
-
+  // 选中回调
   goSelect(value) {
     let channelid;
     let fwList = this.state.channelArr;
@@ -104,7 +104,7 @@ class UpdateSales extends Component {
       channelid: channelid,
     });
   }
-  //渠道名称自动补全
+  // 渠道名称自动补全
   channelChange(e) {
     this.setState({
       channelName: e
@@ -152,17 +152,20 @@ class UpdateSales extends Component {
     }
     return false
   }
-  // 
+  // 点击修改处理
   update() {
     const { updatas } = this.props;
     let defaults = JSON.parse(JSON.stringify(updatas));
-    if (updatas.userType == null && updatas.salesType == null) {//无客户所属类型 无销售类型则可选取所有销售类型
+    // if (updatas.userType == null && updatas.salesType == null) {//无客户所属类型 无销售类型则可选取所有销售类型
+    //   defaults.userType = 2
+    // } else {
+    //   if (updatas.salesType != null) {
+    //     this.isArray(ssalesType, updatas.salesType, "value") && (defaults.userType = 0);//有销售类型(私有客户)
+    //     this.isArray(qsalesType, updatas.salesType, "value") && (defaults.userType = 1);//有销售类型(以签单客户)
+    //   }
+    // }
+    if (updatas.userType == null) {//无客户所属类型时--可让其选择所有销售类型
       defaults.userType = 2
-    } else {
-      if (updatas.salesType != null) {
-        this.isArray(ssalesType, updatas.salesType, "value") && (defaults.userType = 0);//有销售类型(私有客户)
-        this.isArray(qsalesType, updatas.salesType, "value") && (defaults.userType = 1);//有销售类型(以签单客户)
-      }
     }
     this.setState({
       datas: defaults,
@@ -196,7 +199,7 @@ class UpdateSales extends Component {
           >
             <Form>
               {
-                datas.userType != null &&
+                (datas.userType != null && datas.userType != 2) &&
                 <FormItem {...formItemLayout} label="客户所属类型">
                   <Select
                     placeholder="请选择客户所属类型"
@@ -223,6 +226,8 @@ class UpdateSales extends Component {
                     this.setState({
                       datas: Object.assign(datas, {
                         salesType: e,
+                        other: "",
+                        channelName: "",
                       }),
                     });
                   }}