渠道管理:当选择物流公司,选择性质为挂靠时,账户信息不必录

思路:在“发起渠道审核”这个按钮的函数中,根据物流公司的性质对其进行过滤;

发起渠道审核”这个按钮的函数----udsDealerAcctSubmit

function udsDealerAcctSubmit(RootFrameService,hdsapiSubmitDealerAcctInfoZYResource){

  debugger;
      var event = arguments[0];
      var scope = arguments[1];
    var bpId = scope.root.dealerBpDTO.dealerBaseInfoDTO.bpId;
    var approvalStatus = scope.root.dealerBpDTO.dealerBaseInfoDTO.approvalStatus;
    var businessPartnerId = scope.root.dealerBpDTO.dealerBaseInfoDTO.businessPartnerId;
    var size= scope.root.dealerBpDTO.dealerAcctDTOList.length;
          var natureOfLogisticsCompany = scope.root.dealerBpDTO.dealerBaseInfoDTO.natureOfLogisticsCompany;
    if(businessPartnerId == null){
    RootFrameService.alert('请保存渠道基本信息!');
    return;
    }
          //  if(size == 0&&channelType=='306500000020'){//经销商
        //        RootFrameService.alert('请添加账户信息!');
//    return;
        //   }

           if (size == 0&&natureOfLogisticsCompany!='309300000020'){ //物流公司  natureOfLogisticsCompany(挂靠--309300000020;)

    RootFrameService.alert('请添加账户信息!');
    return;
    }

    if( approvalStatus== '422300000030'|| approvalStatus== '422300000040'|| approvalStatus== '422300000070'){
  RootFrameService.alert('流程已经发起!');
  return;
        }
        hdsapiSubmitDealerAcctInfoZYResource.save({bpId:bpId},null).$promise.then(function(resp) {
        RootFrameService.alert('提交成功'); 
        RootFrameService.close();
        },function (resp){
          RootFrameService.alert(resp);
      });    

    RootFrameService.alert('请添加账户信息!');
    return;
    }

    if( approvalStatus== '422300000030'|| approvalStatus== '422300000040'|| approvalStatus== '422300000070'){
  RootFrameService.alert('流程已经发起!');
  return;
        }
        hdsapiSubmitDealerAcctInfoZYResource.save({bpId:bpId},null).$promise.then(function(resp) {
        RootFrameService.alert('提交成功'); 
        RootFrameService.close();
        },function (resp){
          RootFrameService.alert(resp);
      });    

}

数据字典值:物流公司的性质---3093


猜你喜欢

转载自blog.csdn.net/nancy1018/article/details/80969597