@ -211,8 +211,447 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
url : '/incremental_service' ,
templateUrl : 'static/payment/partner/templates/incremental_service.html' ,
controller : 'incrementalServiceCtrl'
} ) . state ( 'partners.edit' , {
url : '/{clientMoniker}/edit' ,
params : { "commitCardPayment" : false , "commitCrossBorderPayment" : false } ,
templateUrl : 'static/payment/partner/templates/partner_edit.html' ,
controller : 'partnerEditCtrl' ,
resolve : {
partner : [ '$http' , '$stateParams' , function ( $http , $stateParams ) {
return $http . get ( '/sys/partners/' + $stateParams . clientMoniker ) ;
} ]
}
} ) ;
} ] ) ;
app . controller ( 'partnerEditCtrl' , [ '$scope' , '$http' , '$state' , 'Upload' , 'commonDialog' , 'timezone' , 'partner' , 'upayIndustryMap' ,
function ( $scope , $http , $state , Upload , commonDialog , timezone , partner , upayIndustryMap ) {
$scope . upayIndustrys = upayIndustryMap . configs ( ) ;
$scope . timezones = timezone . configs ( ) ;
$scope . partner = partner . data ;
if ( ! $scope . partner . client _type ) {
$scope . partner . client _type = 'cross-border' ;
}
if ( $scope . partner . representativeInfo != null ) {
$scope . partner . registered _address = $scope . partner . representativeInfo . address ;
$scope . partner . registered _suburb = $scope . partner . representativeInfo . suburb ;
$scope . partner . registered _postcode = $scope . partner . representativeInfo . postcode ;
$scope . partner . registered _state = $scope . partner . representativeInfo . state ;
$scope . partner . legal _representative _person = $scope . partner . representativeInfo . representative _person ;
$scope . partner . legal _representative _phone = $scope . partner . representativeInfo . phone ;
$scope . partner . legal _representative _email = $scope . partner . representativeInfo . email ;
$scope . partner . legal _representative _job = $scope . partner . representativeInfo . job _title ;
$scope . partner . marketing _person = $scope . partner . representativeInfo . marketing _person ;
$scope . partner . marketing _phone = $scope . partner . representativeInfo . marketing _phone ;
$scope . partner . marketing _email = $scope . partner . representativeInfo . marketing _email ;
$scope . partner . marketing _job = $scope . partner . representativeInfo . marketing _job _title ;
$scope . partner . legal _representative _wechatid = $scope . partner . representativeInfo . legal _representative _wechatid ;
$scope . partner . marketing _wechatid = $scope . partner . representativeInfo . marketing _wechatid ;
}
$scope . enablePaymentType = function ( type ) {
$scope . partner [ type ] = ! $scope . partner [ type ] ;
} ;
if ( $state . params . commitCardPayment ) {
$scope . enablePaymentType ( 'enable_card_payment' ) ;
}
if ( $state . params . commitCrossBorderPayment ) {
$scope . enablePaymentType ( 'enable_cross_payment' ) ;
}
function hasRole ( ) {
var rolenum ;
switch ( sessionStorage . getItem ( 'role' ) ) {
case "administrator" :
rolenum = 1 ;
break ;
case "bduser" :
rolenum = 4 ;
break ;
case "salesmanager" :
rolenum = 8192 ;
break ;
case "accountant" :
rolenum = 8 ;
break ;
case "sitemanager" :
rolenum = 128 ;
break ;
case "director" :
rolenum = 64 ;
break ;
case "developer" :
rolenum = 256 ;
break ;
case "compliance" :
rolenum = 2 ;
break ;
case "guest" :
rolenum = 2048 ;
break ;
case "orgmanager" :
rolenum = 4096 ;
break ;
case "riskmanager" :
rolenum = 1024 ;
break ;
default :
break ;
}
if ( ( window . currentUser . role & rolenum ) > 0 ) {
return true ;
} else {
sessionStorage . removeItem ( 'role' ) ;
return false ;
}
}
if ( hasRole ( ) ) {
$scope . role = sessionStorage . getItem ( 'role' ) ;
}
var origin _referrer _id = angular . copy ( $scope . partner . referrer _id ) ;
var resetClientPayDescByTpey = function ( type ) {
type = parseInt ( type ) ;
if ( type == 1 ) {
removeClientPayDesc ( $scope . partner . client _pay _desc , '10' ) ;
}
if ( type == 2 ) {
removeClientPayDesc ( $scope . partner . client _pay _desc , '20' ) ;
}
} ;
var compare = function ( x , y ) {
x = parseInt ( x ) ;
y = parseInt ( y ) ;
if ( x < y ) {
return - 1 ;
} else if ( x > y ) {
return 1 ;
} else {
return 0 ;
}
}
$scope . toggleClientPayType = function ( type ) {
if ( ! $scope . partner . client _pay _type ) {
$scope . partner . client _pay _type = [ ] ;
}
var $idx = $scope . partner . client _pay _type . indexOf ( type ) ;
if ( $idx >= 0 ) {
$scope . partner . client _pay _type . splice ( $idx , 1 ) ;
resetClientPayDescByTpey ( type ) ;
} else {
$scope . partner . client _pay _type . push ( type ) ;
$scope . partner . client _pay _type . sort ( compare ) ;
}
} ;
$scope . toggleClientPayDesc = function ( type ) {
if ( ! $scope . partner . client _pay _desc ) {
$scope . partner . client _pay _desc = [ ] ;
}
var $idx = $scope . partner . client _pay _desc . indexOf ( type ) ;
if ( $idx >= 0 ) {
if ( type == '203' ) {
removeClientPayDesc ( $scope . partner . client _pay _desc , '2030' )
}
$scope . partner . client _pay _desc . splice ( $idx , 1 ) ;
} else {
$scope . partner . client _pay _desc . push ( type ) ;
$scope . partner . client _pay _desc . sort ( compare ) ;
}
} ;
$scope . partner . sameAsContactPerson = false ;
$scope . checkboxOnclick = function ( ) {
$scope . partner . sameAsContactPerson = ! ( $scope . partner . sameAsContactPerson ) ;
if ( $scope . partner . sameAsContactPerson ) {
$scope . partner . legal _representative _person = $scope . partner . contact _person ;
$scope . partner . legal _representative _phone = $scope . partner . contact _phone ;
$scope . partner . legal _representative _email = $scope . partner . contact _email ;
$scope . partner . legal _representative _job = $scope . partner . contact _job ;
$scope . partner . legal _representative _wechatid = $scope . partner . contact _wechatid ;
}
}
$scope . partner . marketingSameAsContact = false ;
$scope . checkMarketingSameAsContact = function ( ) {
$scope . partner . marketingSameAsContact = ! ( $scope . partner . marketingSameAsContact ) ;
if ( $scope . partner . marketingSameAsContact ) {
$scope . partner . marketing _person = $scope . partner . contact _person ;
$scope . partner . marketing _phone = $scope . partner . contact _phone ;
$scope . partner . marketing _email = $scope . partner . contact _email ;
$scope . partner . marketing _job = $scope . partner . contact _job ;
$scope . partner . marketing _wechatid = $scope . partner . contact _wechatid ;
}
}
$scope . partner . sameAsAddress = false ;
$scope . sameAddress = function ( ) {
$scope . partner . sameAsAddress = ! ( $scope . partner . sameAsAddress ) ;
if ( $scope . partner . sameAsAddress ) {
$scope . partner . registered _address = $scope . partner . address ;
$scope . partner . registered _suburb = $scope . partner . suburb ;
$scope . partner . registered _postcode = $scope . partner . postcode ;
$scope . partner . registered _state = $scope . partner . state ;
}
}
$scope . listReferrers = function ( ) {
$http . get ( '/sys/orgs/referrer' ) . then ( function ( resp ) {
$scope . referrers = resp . data ;
} )
} ;
$scope . listReferrers ( ) ;
$scope . loadAlipayCategory = function ( ) {
$http . get ( '/static/data/alipayMcc.json' ) . then ( function ( resp ) {
$scope . alipayMccCategory = resp . data ;
} )
} ;
$scope . loadAlipayCategory ( ) ;
$scope . loadJDindustry = function ( ) {
$http . get ( '/static/data/jdindustry.json' ) . then ( function ( resp ) {
$scope . jdindustry = resp . data ;
} )
} ;
$scope . loadJDindustry ( ) ;
$scope . loadLakalaPayindustry = function ( ) {
$http . get ( '/static/data/lakalapayindustry.json' ) . then ( function ( resp ) {
$scope . lakalapayindustry = resp . data ;
} )
} ;
$scope . loadLakalaPayindustry ( ) ;
$scope . loadLakalaPaySettle = function ( ) {
$http . get ( '/static/data/lakalapaysettle.json' ) . then ( function ( resp ) {
$scope . lakalapaysettle = resp . data ;
} )
} ;
$scope . loadLakalaPaySettle ( ) ;
$scope . loadLakalaPayGoods = function ( ) {
$http . get ( '/static/data/lakalapaygoods.json' ) . then ( function ( resp ) {
$scope . lakalapaygoods = resp . data ;
} )
} ;
$scope . loadLakalaPayGoods ( ) ;
$scope . loadRoyalpayindustry = function ( ) {
$http . get ( '/static/data/royalpayindustry.json' ) . then ( function ( resp ) {
$scope . royalpayindustry = resp . data ;
} )
} ;
$scope . loadRoyalpayindustry ( ) ;
$scope . loadHfindustry = function ( ) {
$http . get ( '/static/data/hfindustry.json' ) . then ( function ( resp ) {
$scope . hfindustry = resp . data ;
} )
} ;
$scope . loadHfindustry ( ) ;
$scope . onAlipayMccSelect = function ( selectedItem ) {
$scope . partner . alipay _category = selectedItem . label ;
$scope . partner . alipayindustry = selectedItem . mccCode ;
} ;
$scope . onRoyalPayIndustrySelect = function ( selectedItem ) {
$scope . partner . royalpay _label = selectedItem . label ;
$scope . partner . royalpayindustry = selectedItem . mccCode ;
} ;
$scope . onHfIndustrySelect = function ( selectedItem ) {
$scope . partner . hf _label = selectedItem . label ;
$scope . partner . hfindustry = selectedItem . mccCode ;
} ;
$scope . updatePartner = function ( form ) {
if ( form . $invalid ) {
angular . forEach ( form , function ( item , key ) {
if ( key . indexOf ( '$' ) < 0 ) {
item . $dirty = true ;
}
} ) ;
return ;
}
if ( $scope . partner . company _name . indexOf ( "Migration" ) != - 1 ) {
alert ( "Company Name包含敏感词汇, 请检查后重新提交! " ) ;
return ;
}
if ( $scope . partner . company _phone . indexOf ( ' ' ) != - 1 ) {
alert ( 'Company Phone can not contain space character' ) ;
return ;
}
if ( $scope . partner . contact _email . indexOf ( ' ' ) != - 1 ) {
alert ( 'Contact email Phone can not contain space character' ) ;
return ;
}
if ( $scope . partner . suburb . indexOf ( ' ' ) != - 1 ) {
alert ( 'suburb can not contain two and more continuous space characters' ) ;
return ;
}
if ( $scope . partner . client _pay _type . indexOf ( '2' ) >= 0 ) {
if ( ! $scope . partner . company _photo ) {
alert ( 'Shop Photo1 is necessary' ) ;
return ;
}
if ( ! $scope . partner . store _photo ) {
alert ( 'Shop Photo2 is necessary' ) ;
return ;
}
}
if ( $scope . partner . acn && $scope . partner . business _structure == 'Company' ) {
if ( $scope . partner . acn . length != 9 ) {
alert ( 'Acn is not valid' ) ;
}
}
if ( $scope . partner . referrer _id ) {
$scope . referrers . forEach ( function ( e ) {
if ( $scope . partner . referrer _id == e . org _id ) {
$scope . partner . referrer _name = e . name ;
return ;
}
} )
}
var content = '' ;
if ( ! origin _referrer _id && $scope . partner . referrer _id ) {
content = 'Update partner info successfully,But You Had add new Referrer,Please Change the BD Commission Proportion!' ;
}
if ( $scope . partner . client _pay _type . length == 0 ) {
alert ( '请选择商户支付场景' )
return ;
}
if ( $scope . partner . client _pay _desc . length == 0 ) {
alert ( '请选择商户支付方式' )
return ;
}
if ( $scope . partner . client _pay _type . indexOf ( '1' ) >= 0 ) {
if ( $scope . partner . client _pay _desc . join ( ',' ) . indexOf ( '10' ) < 0 ) {
alert ( "请检查线上支付场景是否已选择支付方式" ) ;
return ;
}
}
if ( $scope . partner . client _pay _type . indexOf ( '2' ) >= 0 ) {
if ( $scope . partner . client _pay _desc . join ( ',' ) . indexOf ( '20' ) < 0 ) {
alert ( "请检查线下支付场景是否已选择支付方式" ) ;
return ;
}
}
if ( $scope . partner . client _pay _desc . join ( ',' ) . indexOf ( '203' ) >= 0 ) {
if ( $scope . partner . client _pay _desc . join ( ',' ) . indexOf ( '2030' ) < 0 && $scope . partner . client _pay _desc . join ( ',' ) . indexOf ( '20399' ) < 0 ) {
alert ( "请检查线下支付是否已选择收银系统类型" ) ;
return ;
}
}
$scope . partner . client _pay _type = $scope . partner . client _pay _type . join ( ',' ) ;
$scope . partner . client _pay _desc = $scope . partner . client _pay _desc . join ( ',' ) ;
$http . put ( '/sys/partners/' + $scope . partner . client _moniker , $scope . partner ) . then ( function ( ) {
if ( content != '' ) {
commonDialog . alert ( {
title : 'Warning' ,
content : content ,
type : 'error'
} ) ;
} else {
commonDialog . alert ( {
title : 'Success' ,
content : 'Update partner information successfully' ,
type : 'success'
} ) ;
}
$scope . updateMerchantLocation ( ) ;
$scope . loadPartners ( ) ;
$state . go ( '^.detail' , { clientMoniker : $scope . partner . client _moniker } , { reload : true } ) ;
} , function ( resp ) {
commonDialog . alert ( { title : 'Error' , content : resp . data . message , type : 'error' } )
} ) ;
} ;
$scope . uploadLogo = function ( file ) {
if ( file != null ) {
if ( file . size > 1 * 1024 * 1024 ) {
commonDialog . alert ( { title : 'Error' , content : '文件大小不能超过1MB, 请压缩后重试' , type : 'error' } )
} else {
$scope . logoProgress = { value : 0 } ;
Upload . upload ( {
url : '/attachment/files' ,
data : { file : file }
} ) . then ( function ( resp ) {
delete $scope . logoProgress ;
$scope . partner . logo _id = resp . data . fileid ;
$scope . partner . logo _url = resp . data . url ;
} , function ( resp ) {
delete $scope . logoProgress ;
commonDialog . alert ( { title : 'Upload Failed' , content : resp . data . message , type : 'error' } )
} , function ( evt ) {
$scope . logoProgress . value = parseInt ( 100 * evt . loaded / evt . total ) ;
} )
}
}
} ;
$scope . uploadShopPhoto = function ( file ) {
if ( file != null ) {
if ( file . size > 2 * 1024 * 1024 ) {
commonDialog . alert ( { title : 'Error' , content : '文件大小不能超过2MB, 请压缩后重试' , type : 'error' } )
} else {
$scope . shopPhotoProgress = { value : 0 } ;
Upload . upload ( {
url : '/attachment/files' ,
data : { file : file }
} ) . then ( function ( resp ) {
delete $scope . shopPhotoProgress ;
$scope . partner . company _photo = resp . data . url ;
} , function ( resp ) {
delete $scope . shopPhotoProgress ;
commonDialog . alert ( { title : 'Upload Failed' , content : resp . data . message , type : 'error' } )
} , function ( evt ) {
$scope . shopPhotoProgress . value = parseInt ( 100 * evt . loaded / evt . total ) ;
} )
}
}
} ;
$scope . uploadStorePhoto = function ( file ) {
if ( file != null ) {
if ( file . size > 2 * 1024 * 1024 ) {
commonDialog . alert ( { title : 'Error' , content : '文件大小不能超过2MB, 请压缩后重试' , type : 'error' } )
} else {
$scope . storePhotoProgress = { value : 0 } ;
Upload . upload ( {
url : '/attachment/files' ,
data : { file : file }
} ) . then ( function ( resp ) {
delete $scope . storePhotoProgress ;
$scope . partner . store _photo = resp . data . url ;
} , function ( resp ) {
delete $scope . storePhotoProgress ;
commonDialog . alert ( { title : 'Upload Failed' , content : resp . data . message , type : 'error' } )
} , function ( evt ) {
$scope . storePhotoProgress . value = parseInt ( 100 * evt . loaded / evt . total ) ;
} )
}
}
} ;
$scope . getMerchantLocation = function ( ) {
$http . get ( '/sys/partners/' + $scope . partner . client _moniker + '/location' ) . then ( function ( resp ) {
$scope . merchant _location = resp . data ;
} ) ;
} ;
$scope . getMerchantLocation ( ) ;
$scope . updateMerchantLocation = function ( ) {
var params = window . frames [ 'merchant_detail' ] . merchant _location ;
if ( params ) {
$http . put ( '/sys/partners/modify/' + $scope . partner . client _moniker + '/location' , params ) . then ( function ( ) {
} ) ;
}
}
} ] ) ;
app . controller ( 'partnerListCtrl' , [ '$scope' , '$sce' , '$http' , '$filter' , '$uibModal' , 'businessStructuresMap' , 'industryMap' , 'stateMap' , 'sectorMap' , 'countryMap' ,
function ( $scope , $sce , $http , $filter , $uibModal , businessStructuresMap , industryMap , stateMap , sectorMap , countryMap ) {
@ -419,16 +858,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} ;
} ] ) ;
app . controller ( 'partnerDetailCtrl' , [ '$scope' , '$http' , '$state' , '$uibModal' , '$rootScope' , 'Upload' , 'commonDialog' , 'partner' , '$sce' , function ( $scope , $http , $state , $uibModal , $rootScope , Upload , commonDialog , partner , $sce ) {
app . controller ( 'partnerDetailCtrl' , [ '$scope' , '$http' , '$state' , '$uibModal' , '$rootScope' , 'Upload' , 'commonDialog' , 'partner' , '$sce' ,
function ( $scope , $http , $state , $uibModal , $rootScope , Upload , commonDialog , partner , $sce ) {
$scope . init = { wechat _compliance : false , local _merchant : false } ;
$scope . partner = partner . data ;
$scope . isComplianceOfCompanyName = false ;
$scope . isComplianceOfShortName = false ;
$scope . isComplianceOfBusinessStructure = false ;
$scope . cardPromotionaparams = { }
$scope . cardPromotionaparams = { } ;
var website = partner . data . company _website ;
if ( website != null ) {
if ( website . indexOf ( 'http' ) ! = 0 ) {
if ( website . indexOf ( 'http' ) ! = = 0 ) {
$scope . partner . company _website = 'http://' + angular . copy ( website ) ;
}
}
@ -436,7 +876,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
var keywords = [ 'education' , 'financial' , 'train' , 'immigrant' , 'invest' ,
'律师咨询' , '会计事务所' , '移民' , '留学' , '娱乐' , '金融' , '地产' , '投资' ] ;
for ( var i = 0 ; i < keywords . length ; i ++ ) {
if ( name . indexOf ( keywords [ i ] ) ! = - 1 ) {
if ( name . indexOf ( keywords [ i ] ) ! = = - 1 ) {
return true ;
}
}
@ -478,12 +918,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope . showFile ( ) ;
$scope . showCardFile ( ) ;
$scope . passClient = function ( ) {
if ( $scope . partner . enable _hf ) {
if ( $scope . partner . hfindustry == null ) {
alert ( "已开启HF支付通道, HF行业不可为空!" ) ;
return ;
}
}
if ( ! $rootScope . complianceCheck ) {
alert ( "please check first" ) ;
return ;
@ -684,52 +1118,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog . alert ( { title : 'Error' , content : resp . data . message , type : 'error' } ) ;
} ) ;
}
//制作促销合同
$scope . exportCardPromotionaAgreegatePDF = function ( ) {
var title = '确认生成Promotional Offer合同' ;
var promotiona _date = '' ;
var promotiona _period = '' ;
var contentHtml = $sce . trustAsHtml (
'<lable>请输入优惠开始日期(eg:2020-02-01):</lable> ' +
'<input id="promotiona_date" ng-bind="promotiona_date">' +
'<div style="margin-bottom: 5px"></div>' +
'<lable>请输入活动周数(unit:week):</lable> ' +
'<input id="promotiona_period" ng-bind="promotiona_period">' ) ;
var choises = [ { label : '取消' , className : 'btn-danger' , key : '2' , dismiss : true } ,
{ label : '确认生成' , className : 'btn-success' , key : '1' } ] ;
var content = '' ;
commonDialog . confirm ( {
title : title ,
content : content ,
choises : choises ,
contentHtml : contentHtml
} ) . then ( function ( res ) {
$scope . showBg = true ;
var date = document . getElementById ( "promotiona_date" ) . value ;
var period = document . getElementById ( "promotiona_period" ) . value ;
if ( date == '' || period == '' ) {
commonDialog . alert ( { title : 'Error' , content : '选项不得未空' , type : 'error' } ) ;
} else {
$http . get ( '/sys/partners/' + $scope . partner . client _moniker + '/export/aggregate/card_promotiona_agree_pdf?date=' + date + '&period=' + period ) . then ( function ( ) {
commonDialog . alert ( {
title : 'Success' ,
content : 'Agreement File Generate Succeed! Please notify BD!' ,
type : 'success'
} ) ;
$scope . showBg = false ;
$state . reload ( ) ;
} , function ( resp ) {
$scope . showBg = false ;
$state . reload ( ) ;
commonDialog . alert ( { title : 'Error' , content : resp . data . message , type : 'error' } ) ;
} ) ;
}
} ) ;
}
$scope . Export = function ( ) {
var url = '/dev/' + $scope . partner . client _moniker + '/export/aggregate/agreepdf' ;
return url ;
@ -814,8 +1202,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} ;
$scope . downTempPdf = function ( ) {
var url = '/sys/partners/' + $scope . partner . client _moniker + '/temp/export/pdf' ;
return url ;
return '/sys/partners/' + $scope . partner . client _moniker + '/temp/export/pdf' ;
}
$scope . refuse = function ( ) {
@ -932,7 +1319,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$state . go ( 'partners.edit' , {
clientMoniker : $scope . partner . client _moniker ,
commitCardPayment : false ,
commitCrossBorderPayment : true } ) ;
commitCrossBorderPayment : true
} ) ;
return ;
}
$http . get ( '/sys/partners/' + $scope . partner . client _moniker + '/make_agree_file' ) . then ( function ( ) {
@ -958,7 +1346,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$state . go ( 'partners.edit' , {
clientMoniker : $scope . partner . client _moniker ,
commitCardPayment : true ,
commitCrossBorderPayment : false } ) ;
commitCrossBorderPayment : false
} ) ;
return ;
}
$http . get ( '/sys/partners/' + $scope . partner . client _moniker + '/make_card_agree_file' ) . then ( function ( ) {
@ -1070,7 +1459,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope . configMasterMerchant = function ( ) {
commonDialog . inputText ( { title : 'Input Master Merchant Code' } ) . then ( function ( text ) {
$http . put ( '/sys/partners/' + $scope . partner . client _moniker + '/master_configuration' , { master _merchant : text } ) . then ( function ( ) {
commonDialog . alert ( { title : 'Success' , content : "Master Merchant Code:" + text , type : 'success' } ) ;
commonDialog . alert ( {
title : 'Success' ,
content : "Master Merchant Code:" + text ,
type : 'success'
} ) ;
} , function ( resp ) {
commonDialog . alert ( {
title : 'Config Master Merchant Failed' ,
@ -1080,7 +1473,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} )
} )
} ;
$scope . getMerchantLocation = function ( ) {
$http . get ( '/sys/partners/' + $scope . partner . client _moniker + '/location' ) . then ( function ( resp ) {
$scope . merchant _location = resp . data ;
@ -1957,7 +2349,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
} )
if ( flag ) {
$http . put ( '/sys/partners/' + $scope . partner . client _moniker + '/ext_config' , { key : name , value : value } ) . then ( function ( ) {
$http . put ( '/sys/partners/' + $scope . partner . client _moniker + '/ext_config' , {
key : name ,
value : value
} ) . then ( function ( ) {
$scope . loadPartnerPaymentInfo ( ) ;
} )
}
@ -2301,6 +2696,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope . getRates ( ) ;
} ) ;
} ;
$scope . complianceCheck = function ( ) {
if ( ! $rootScope . complianceCheck ) {
$rootScope . complianceCheck = { } ;
@ -4134,8 +4530,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
content : 'Upload Successful' ,
type : 'success'
} ) ;
$state . go ( 'partners.detail.files' , { clientMoniker : $scope . partner . client _moniker ,
commitType : "card-payment" } , { reload : true } ) ;
$state . go ( 'partners.detail.files' , {
clientMoniker : $scope . partner . client _moniker ,
commitType : "card-payment"
} , { reload : true } ) ;
} , function ( resp ) {
commonDialog . alert ( { title : 'Error' , content : resp . data . message , type : 'error' } ) ;
} )
@ -5695,12 +6093,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope . CheckImgExists = function ( url ) {
var xmlHttp ;
if ( window . ActiveXObject )
{
if ( window . ActiveXObject ) {
xmlHttp = new ActiveXObject ( "Microsoft.XMLHTTP" ) ;
}
else if ( window . XMLHttpRequest )
{
} else if ( window . XMLHttpRequest ) {
xmlHttp = new XMLHttpRequest ( ) ;
}
xmlHttp . open ( "Get" , url , false ) ;