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