HW 3 years ago
parent
commit
43780fa645

+ 23 - 7
js/component/manageCenter/customer/NEW/intentionCustomer/channel.jsx

@@ -42,7 +42,8 @@ class Channel extends Component{
     constructor(props) {
         super(props);
         this.state={
-            isEditLv:false,
+            isGuidance:false,
+            isEditGuidance: true,
             upLoadFileLoading:false,
             channelAllocationStatusList : channelAllocationStatus.slice(0,channelAllocationStatus.length-2),
             columns: [
@@ -240,7 +241,7 @@ class Channel extends Component{
                             alignItems:'center',
                         }}>
                             <Button
-                                disabled={record.status === 2 && this.props.isEditGuidanceLv}
+                                disabled={this.props.deliver === 2 && record.status === 2 && this.props.isEditGuidanceLv}
                                 onClick={(e) => {
                                     e.stopPropagation();
                                     if(this.props.isEditGuidanceLv){
@@ -493,12 +494,24 @@ class Channel extends Component{
     }
 
     tableRowClick(record) {
-        if(record.status === 2 && this.props.isEditGuidanceLv){
+        if(this.props.deliver === 2 && record.status === 2 && this.props.isEditGuidanceLv){
             this.setState({
-                isEditLv: true,
+                isGuidance: true,
                 tabsKey:"4",
             })
         }
+        //营销经理人员 取消指导自己的操作
+        if(this.props.deliver === 2 && record.status === 1 && this.props.isEditGuidanceLv){
+            this.setState({
+                isEditGuidance: false,
+            })
+        }
+        //营销人员 取消指导的操作
+        if(this.props.deliver === 0 && record.status === 2 && this.props.isEditGuidanceLv){
+            this.setState({
+                isEditGuidance: false,
+            })
+        }
         this.setState({
             rowData:record,
             modalVisible: true,
@@ -515,8 +528,11 @@ class Channel extends Component{
             basicState: false,
             contactState: false,
             modalName: '',
-            isEditLv: false,
+            isGuidance: false,
+            isEditGuidance: true,
             tabsKey: '',
+        },()=>{
+            this.loadData(this.state.pageNo);
         })
     }
 
@@ -929,8 +945,8 @@ class Channel extends Component{
                     closeDesc={this.detailCloseDesc}
                     basicState={this.state.basicState}
                     contactState={this.state.contactState}
-                    isGuidanceLv={this.props.isGuidanceLv || this.state.isEditLv}
-                    isEditGuidanceLv={this.props.isEditGuidanceLv}
+                    isGuidanceLv={this.props.isGuidanceLv || this.state.isGuidance}
+                    isEditGuidanceLv={this.props.isEditGuidanceLv && this.state.isEditGuidance}
                 />
                 {this.state.duplicateDataVisible ? <DuplicateData
                     duplicateData={this.state.duplicateData || []}

+ 1 - 1
js/component/manageCenter/customer/content.jsx

@@ -344,7 +344,7 @@ class Content extends Component {
                             deliver={0}                   //是否能转交或分配  0不能 1总监分配 2经理分配
                             followUp={true}               //是否能跟进
                             isGuidanceLv={false}          //是否可查看指导  也用于判断是否为跟进管理页面
-                            isEditGuidanceLv={false}      //是否可以编辑指导
+                            isEditGuidanceLv={true}      //是否可以编辑指导
                             recovery={true}               //是否可以回收
                             detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
                         />

+ 8 - 3
js/component/manageCenter/order/orderNew/addService.jsx

@@ -4333,10 +4333,10 @@ const NewService = Form.create()(
         //   content: <span>{this.state.depName}</span>
         // }
       ];
-      const dataSources = this.state.customerArr || [];
+      let dataSources = this.state.customerArr || [];
       const cuiDataList = this.state.contactList || [];
       let departmentArr = this.state.departmentArr || [];
-      const options = this.state.states
+      let options = this.state.states
         ? dataSources.map((group) => (
             <Select.Option key={group.id} value={group.name}>
               {group.name}
@@ -4408,7 +4408,12 @@ const NewService = Form.create()(
                           style={{ width: "200px" }}
                           value={this.state.customType}
                           onChange={(e) => {
-                            this.setState({ customType: e });
+                            this.setState({
+                              customType: e,
+                              customerArr:[],
+                              autoId: '',
+                              customerName: '',
+                            });
                           }}
                         >
                           {customerType.map(function (item) {