🐞fix(royalpay): 修复toggleChannel第一次被拦

master
xiao.tang 4 years ago
parent 541a74da48
commit 1a84fec0b5

@ -2437,10 +2437,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
if (!$scope.paymentInfo) {
return
}
if (!$scope.init.channel[channel]) {
$scope.init.channel[channel] = true
return
}
// if (!$scope.init.channel[channel]) {
// $scope.init.channel[channel] = true
// return
// }
$scope.getComplianceInfo()
if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) {
commonDialog
@ -6991,63 +6991,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.merchantIds = merchantIds.data
$scope.businessTypesMap = businessTypesMap.configs()
$scope.subMerchantInfo.company_register_no = $scope.merchantInfo.abn ? $scope.merchantInfo.abn : $scope.merchantInfo.acn
$scope.subMerchantInfo.short_name=$scope.merchantInfo.short_name;
$scope.subMerchantInfo.industry=$scope.merchantInfo.industry;
$scope.subMerchantInfo.company_website=$scope.merchantInfo.company_website;
$scope.subMerchantInfo.address=$scope.merchantInfo.address;
$scope.subMerchantInfo.company_phone=$scope.merchantInfo.company_phone;
$scope.subMerchantInfo.contact_person=$scope.merchantInfo.contact_person;
$scope.subMerchantInfo.contact_phone=$scope.merchantInfo.contact_phone;
$scope.subMerchantInfo.contact_email=$scope.merchantInfo.contact_email;
if ($scope.merchantInfo.client_pay_type) {
if ($scope.merchantInfo.client_pay_type.indexOf('1') >= 0 && $scope.merchantInfo.client_pay_type.indexOf('2') >= 0) {
$scope.subMerchantInfo.business_type = 'BOTH'
} else if ($scope.merchantInfo.client_pay_type.indexOf('1') >= 0) {
$scope.subMerchantInfo.business_type = 'ONLINE'
} else if ($scope.merchantInfo.client_pay_type.indexOf('2') >= 0) {
$scope.subMerchantInfo.business_type = 'OFFLINE'
}
} else {
$scope.subMerchantInfo.business_type = 'BOTH'
}
if ($scope.merchantInfo.industry) {
$scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.merchantInfo.industry)
}
if ($scope.merchantInfo.mc_code) {
$scope.subMerchantInfo.mcc_code = $scope.merchantInfo.mc_code
}
if ($scope.merchantInfo.business_structure) {
$scope.subMerchantInfo.merchant_type = $scope.merchantInfo.business_structure != 'Registered body(Sole Trader)' ? 'ENTERPRISE' : 'INDIVIDUAL'
}
if ($scope.merchantInfo.certificat_expire_date) {
if ($scope.merchantInfo.certificat_expire_date == 'PERMANENT') {
$scope.subMerchantInfo.certificat_expire_date_premanent = true
} else if ($scope.merchantInfo.certificat_expire_date == 'N/A') {
$scope.subMerchantInfo.certificat_expire_date_NA = true
} else {
var datestr = $scope.merchantInfo.certificat_expire_date.replace(/-/g, '/')
$scope.subMerchantInfo.certificat_expire_date_d = new Date(datestr)
}
}
if ($scope.subMerchantInfo.extra_merchant_type) {
$scope.subMerchantInfo.merchant_type = $scope.subMerchantInfo.extra_merchant_type
}
if ($scope.subMerchantInfo.industry) {
$scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.subMerchantInfo.industry)
}
if ($scope.subMerchantInfo.mcc_code) {
$scope.subMerchantInfo.mcc_code = parseInt($scope.subMerchantInfo.mcc_code)
}
// if($scope.subMerchantInfo.certificat_expire_date) {
// // var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/');
// $scope.subMerchantInfo.certificat_expire_date=new Date($scope.subMerchantInfo.certificat_expire_date);
// }
// if ($scope.subMerchantInfo.certificat_expire_date) {
// if ($scope.subMerchantInfo.certificat_expire_date == 'PERMANENT') {
// $scope.subMerchantInfo.certificat_expire_date_premanent = true
// } else if ($scope.subMerchantInfo.certificat_expire_date == 'N/A') {
// $scope.subMerchantInfo.certificat_expire_date_NA = true
// } else {
// var datestr = $scope.subMerchantInfo.certificat_expire_date.replace(/-/g, '/')
// $scope.subMerchantInfo.certificat_expire_date_d = new Date(datestr)
// }
// }
if ($scope.subMerchantInfo.certificat_expire_date) {
if ($scope.subMerchantInfo.certificat_expire_date == 'PERMANENT') {
$scope.subMerchantInfo.certificat_expire_date_premanent = true
} else if ($scope.subMerchantInfo.certificat_expire_date == 'N/A') {
$scope.subMerchantInfo.certificat_expire_date_NA = true
} else {
var datestr = $scope.subMerchantInfo.certificat_expire_date.replace(/-/g, '/')
$scope.subMerchantInfo.certificat_expire_date_d = new Date(datestr)
}
}
$scope.checkExpriedate = function (value) {
if (value) {
$scope.subMerchantInfo.certificat_expire_date_premanent = false
@ -7093,7 +7060,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
address: $scope.subMerchantInfo.address,
business_type: $scope.subMerchantInfo.business_type,
sub_mch_id: $scope.subMerchantInfo.sub_merchant_id,
merchant_remark: $scope.subMerchantInfo.merchant_remark,
}
if (params.business_type == 'ONLINE') {
params.address = null

Loading…
Cancel
Save