|
|
|
@ -3258,8 +3258,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerNewSubPartnerDialogCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone',
|
|
|
|
|
'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap','wechatGoodMcc','$filter',
|
|
|
|
|
function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap,wechatGoodMcc,$filter) {
|
|
|
|
|
'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap', 'wechatGoodMcc', '$filter',
|
|
|
|
|
function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap, wechatGoodMcc, $filter) {
|
|
|
|
|
if ($scope.partner_application) {
|
|
|
|
|
$scope.partner = angular.copy($scope.partner_application);
|
|
|
|
|
delete $rootScope.partner_application;
|
|
|
|
@ -3281,22 +3281,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
|
$scope.merchantCodeChecked = false;
|
|
|
|
|
$scope.wechatMccIndustries = wechatGoodMcc.configs();
|
|
|
|
|
$scope.checkExpriedate=function (value) {
|
|
|
|
|
if(value){
|
|
|
|
|
$scope.partner.certificat_expire_date_premanent=false;
|
|
|
|
|
$scope.partner.certificat_expire_date_NA=false;
|
|
|
|
|
$scope.checkExpriedate = function (value) {
|
|
|
|
|
if (value) {
|
|
|
|
|
$scope.partner.certificat_expire_date_premanent = false;
|
|
|
|
|
$scope.partner.certificat_expire_date_NA = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$scope.checkExpriedateOther=function (value) {
|
|
|
|
|
if(value=='PERMANENT'){
|
|
|
|
|
if($scope.partner.certificat_expire_date_premanent){
|
|
|
|
|
$scope.partner.certificat_expire_date_NA=false;
|
|
|
|
|
$scope.partner.certificat_expire_date_d=null;
|
|
|
|
|
$scope.checkExpriedateOther = function (value) {
|
|
|
|
|
if (value == 'PERMANENT') {
|
|
|
|
|
if ($scope.partner.certificat_expire_date_premanent) {
|
|
|
|
|
$scope.partner.certificat_expire_date_NA = false;
|
|
|
|
|
$scope.partner.certificat_expire_date_d = null;
|
|
|
|
|
}
|
|
|
|
|
}else if(value=='N/A'){
|
|
|
|
|
if($scope.partner.certificat_expire_date_NA){
|
|
|
|
|
$scope.partner.certificat_expire_date_premanent=false;
|
|
|
|
|
$scope.partner.certificat_expire_date_d=null;
|
|
|
|
|
} else if (value == 'N/A') {
|
|
|
|
|
if ($scope.partner.certificat_expire_date_NA) {
|
|
|
|
|
$scope.partner.certificat_expire_date_premanent = false;
|
|
|
|
|
$scope.partner.certificat_expire_date_d = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3490,7 +3490,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
alert('Please select the business structure');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.business_structure!='Registered body(Sole Trader)') {
|
|
|
|
|
if ($scope.partner.business_structure != 'Registered body(Sole Trader)') {
|
|
|
|
|
if ($scope.partner.certificat_expire_date_d) {
|
|
|
|
|
$scope.partner.certificat_expire_date = $filter('dateConversionStr')($scope.partner.certificat_expire_date_d)
|
|
|
|
|
} else if ($scope.partner.certificat_expire_date_premanent) {
|
|
|
|
@ -5222,7 +5222,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
if ($scope.isAll) {
|
|
|
|
|
delete params.client_ids;
|
|
|
|
|
}
|
|
|
|
|
$http.get('/sys/partners/' + clientMoniker + '/lists_settlements', {params: params}).then(function (resp) {
|
|
|
|
|
$http.get('/sys/partners/' + clientMoniker + '/lists_settlements', { params: params }).then(function (resp) {
|
|
|
|
|
$scope.settlementLogs = resp.data.data;
|
|
|
|
|
$scope.padding = resp.data.padding;
|
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
@ -5610,7 +5610,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).result.then(function () {
|
|
|
|
|
$scope.loadPartnerInfo()
|
|
|
|
|
$state.reload();
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Modify successfully',
|
|
|
|
@ -5905,36 +5905,36 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/');
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date = new Date(datestr);
|
|
|
|
|
}
|
|
|
|
|
if($scope.subMerchantInfo.business_structure ){
|
|
|
|
|
$scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)'? "ENTERPRISE":"INDIVIDUAL";
|
|
|
|
|
if ($scope.subMerchantInfo.business_structure) {
|
|
|
|
|
$scope.subMerchantInfo.merchant_type = $scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)' ? "ENTERPRISE" : "INDIVIDUAL";
|
|
|
|
|
}
|
|
|
|
|
if(subMerchantInfo.certificat_expire_date) {
|
|
|
|
|
if(subMerchantInfo.certificat_expire_date=="PERMANENT"){
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_premanent=true;
|
|
|
|
|
}else if(subMerchantInfo.certificat_expire_date=="N/A"){
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_NA=true;
|
|
|
|
|
}else {
|
|
|
|
|
if (subMerchantInfo.certificat_expire_date) {
|
|
|
|
|
if (subMerchantInfo.certificat_expire_date == "PERMANENT") {
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_premanent = true;
|
|
|
|
|
} else if (subMerchantInfo.certificat_expire_date == "N/A") {
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_NA = true;
|
|
|
|
|
} else {
|
|
|
|
|
var datestr = 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;
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_NA=false;
|
|
|
|
|
$scope.checkExpriedate = function (value) {
|
|
|
|
|
if (value) {
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_premanent = false;
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_NA = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$scope.checkExpriedateOther=function (value) {
|
|
|
|
|
if(value=='PERMANENT'){
|
|
|
|
|
if($scope.subMerchantInfo.certificat_expire_date_premanent){
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_NA=false;
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_d=null;
|
|
|
|
|
$scope.checkExpriedateOther = function (value) {
|
|
|
|
|
if (value == 'PERMANENT') {
|
|
|
|
|
if ($scope.subMerchantInfo.certificat_expire_date_premanent) {
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_NA = false;
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_d = null;
|
|
|
|
|
}
|
|
|
|
|
}else if(value=='N/A'){
|
|
|
|
|
if($scope.subMerchantInfo.certificat_expire_date_NA){
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_premanent=false;
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_d=null;
|
|
|
|
|
} else if (value == 'N/A') {
|
|
|
|
|
if ($scope.subMerchantInfo.certificat_expire_date_NA) {
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_premanent = false;
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date_d = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -5950,46 +5950,46 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
// var merchant_type = $scope.subMerchantInfo.business_structure == 'Company'? 1:2;
|
|
|
|
|
var params = {
|
|
|
|
|
company_name : $scope.subMerchantInfo.company_name,
|
|
|
|
|
merchant_id : $scope.subMerchantInfo.merchant_id,
|
|
|
|
|
short_name : $scope.subMerchantInfo.short_name,
|
|
|
|
|
office_phone : $scope.subMerchantInfo.office_phone,
|
|
|
|
|
contact_person : $scope.subMerchantInfo.contact_person,
|
|
|
|
|
contact_phone : $scope.subMerchantInfo.contact_phone,
|
|
|
|
|
company_phone : $scope.subMerchantInfo.company_phone,
|
|
|
|
|
contact_email : $scope.subMerchantInfo.contact_email,
|
|
|
|
|
industry : $scope.subMerchantInfo.industry,
|
|
|
|
|
company_website : $scope.subMerchantInfo.company_website,
|
|
|
|
|
company_name: $scope.subMerchantInfo.company_name,
|
|
|
|
|
merchant_id: $scope.subMerchantInfo.merchant_id,
|
|
|
|
|
short_name: $scope.subMerchantInfo.short_name,
|
|
|
|
|
office_phone: $scope.subMerchantInfo.office_phone,
|
|
|
|
|
contact_person: $scope.subMerchantInfo.contact_person,
|
|
|
|
|
contact_phone: $scope.subMerchantInfo.contact_phone,
|
|
|
|
|
company_phone: $scope.subMerchantInfo.company_phone,
|
|
|
|
|
contact_email: $scope.subMerchantInfo.contact_email,
|
|
|
|
|
industry: $scope.subMerchantInfo.industry,
|
|
|
|
|
company_website: $scope.subMerchantInfo.company_website,
|
|
|
|
|
merchant_type: $scope.subMerchantInfo.merchant_type,
|
|
|
|
|
mcc_code : $scope.subMerchantInfo.mcc_code,
|
|
|
|
|
mcc_code: $scope.subMerchantInfo.mcc_code,
|
|
|
|
|
address: $scope.subMerchantInfo.address,
|
|
|
|
|
business_type:$scope.subMerchantInfo.business_type
|
|
|
|
|
business_type: $scope.subMerchantInfo.business_type
|
|
|
|
|
};
|
|
|
|
|
if(params.business_type=='ONLINE'){
|
|
|
|
|
params.address=null;
|
|
|
|
|
if (params.business_type == 'ONLINE') {
|
|
|
|
|
params.address = null;
|
|
|
|
|
}
|
|
|
|
|
else if(params.business_type=='OFFLINE'){
|
|
|
|
|
params.company_website=null;
|
|
|
|
|
else if (params.business_type == 'OFFLINE') {
|
|
|
|
|
params.company_website = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(params.merchant_type == 'ENTERPRISE'){
|
|
|
|
|
if (params.merchant_type == 'ENTERPRISE') {
|
|
|
|
|
params.director_name = $scope.subMerchantInfo.director_name;
|
|
|
|
|
params.director_id_number = $scope.subMerchantInfo.director_id_number;
|
|
|
|
|
params.company_register_no = $scope.subMerchantInfo.company_register_no;
|
|
|
|
|
params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date;
|
|
|
|
|
|
|
|
|
|
if($scope.subMerchantInfo.certificat_expire_date_d) {
|
|
|
|
|
params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date_d)
|
|
|
|
|
}else if($scope.subMerchantInfo.certificat_expire_date_premanent){
|
|
|
|
|
params.certificat_expire_date="PERMANENT";
|
|
|
|
|
if ($scope.subMerchantInfo.certificat_expire_date_d) {
|
|
|
|
|
params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date_d)
|
|
|
|
|
} else if ($scope.subMerchantInfo.certificat_expire_date_premanent) {
|
|
|
|
|
params.certificat_expire_date = "PERMANENT";
|
|
|
|
|
}
|
|
|
|
|
else if($scope.subMerchantInfo.certificat_expire_date_NA){
|
|
|
|
|
params.certificat_expire_date="N/A";
|
|
|
|
|
}else{
|
|
|
|
|
else if ($scope.subMerchantInfo.certificat_expire_date_NA) {
|
|
|
|
|
params.certificat_expire_date = "N/A";
|
|
|
|
|
} else {
|
|
|
|
|
alert("Certificate expiration time is required");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
params.principal_name = $scope.subMerchantInfo.principal_name;
|
|
|
|
|
params.principal_id_number = $scope.subMerchantInfo.principal_id_number;
|
|
|
|
|
}
|
|
|
|
@ -5998,8 +5998,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
|
$scope.$close();
|
|
|
|
|
if (subMerchantInfo.sub_merchant_id != null) {
|
|
|
|
|
commonDialog.confirm({title: 'Confirm', content: '已申请成功,是否确认使用'}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) {
|
|
|
|
|
commonDialog.confirm({ title: 'Confirm', content: '已申请成功,是否确认使用' }).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', { sub_merchant_id: $scope.apply_sub_merchant_id }).then(function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Modify Wechat Sub Merchant ID successfully',
|
|
|
|
@ -6007,11 +6007,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
$state.reload();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' })
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', { sub_merchant_id: $scope.apply_sub_merchant_id }).then(function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Apply Success And Modify Wechat Sub Merchant ID successfully',
|
|
|
|
@ -6019,35 +6019,35 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
$state.reload();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' })
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' })
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('updateApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog','wechatGoodMcc','merchantInfo', 'businessTypesMap',function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog,wechatGoodMcc,merchantInfo,businessTypesMap) {
|
|
|
|
|
app.controller('updateApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', 'wechatGoodMcc', 'merchantInfo', 'businessTypesMap', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog, wechatGoodMcc, merchantInfo, businessTypesMap) {
|
|
|
|
|
$scope.wxIndustries = angular.copy(wxMerchantIndustries);
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo.data);
|
|
|
|
|
$scope.merchantInfo = angular.copy(merchantInfo);
|
|
|
|
|
$scope.wechatMccIndustries = wechatGoodMcc.configs();
|
|
|
|
|
$scope.merchantIds = merchantIds.data;
|
|
|
|
|
$scope.businessTypesMap=businessTypesMap.configs();
|
|
|
|
|
$scope.businessTypesMap = businessTypesMap.configs();
|
|
|
|
|
|
|
|
|
|
if($scope.subMerchantInfo.business_structure ){
|
|
|
|
|
$scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)'? "ENTERPRISE":"INDIVIDUAL";
|
|
|
|
|
if ($scope.subMerchantInfo.business_structure) {
|
|
|
|
|
$scope.subMerchantInfo.merchant_type = $scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)' ? "ENTERPRISE" : "INDIVIDUAL";
|
|
|
|
|
}
|
|
|
|
|
if($scope.subMerchantInfo.industry) {
|
|
|
|
|
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.mcc_code) {
|
|
|
|
|
$scope.subMerchantInfo.mcc_code = parseInt($scope.subMerchantInfo.mcc_code);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($scope.subMerchantInfo.certificat_expire_date) {
|
|
|
|
|
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);
|
|
|
|
|
$scope.subMerchantInfo.certificat_expire_date = new Date($scope.subMerchantInfo.certificat_expire_date);
|
|
|
|
|
}
|
|
|
|
|
$scope.updateApply = function (form) {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
@ -6060,44 +6060,44 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var params = {
|
|
|
|
|
company_name : $scope.subMerchantInfo.company_name,
|
|
|
|
|
merchant_id : $scope.subMerchantInfo.merchant_id,
|
|
|
|
|
short_name : $scope.subMerchantInfo.short_name,
|
|
|
|
|
office_phone : $scope.subMerchantInfo.office_phone,
|
|
|
|
|
contact_person : $scope.subMerchantInfo.contact_person,
|
|
|
|
|
contact_phone : $scope.subMerchantInfo.contact_phone,
|
|
|
|
|
company_phone : $scope.subMerchantInfo.company_phone,
|
|
|
|
|
contact_email : $scope.subMerchantInfo.contact_email,
|
|
|
|
|
industry : $scope.subMerchantInfo.industry,
|
|
|
|
|
company_website : $scope.subMerchantInfo.company_website,
|
|
|
|
|
company_name: $scope.subMerchantInfo.company_name,
|
|
|
|
|
merchant_id: $scope.subMerchantInfo.merchant_id,
|
|
|
|
|
short_name: $scope.subMerchantInfo.short_name,
|
|
|
|
|
office_phone: $scope.subMerchantInfo.office_phone,
|
|
|
|
|
contact_person: $scope.subMerchantInfo.contact_person,
|
|
|
|
|
contact_phone: $scope.subMerchantInfo.contact_phone,
|
|
|
|
|
company_phone: $scope.subMerchantInfo.company_phone,
|
|
|
|
|
contact_email: $scope.subMerchantInfo.contact_email,
|
|
|
|
|
industry: $scope.subMerchantInfo.industry,
|
|
|
|
|
company_website: $scope.subMerchantInfo.company_website,
|
|
|
|
|
merchant_type: $scope.subMerchantInfo.merchant_type,
|
|
|
|
|
mcc_code : $scope.subMerchantInfo.mcc_code,
|
|
|
|
|
mcc_code: $scope.subMerchantInfo.mcc_code,
|
|
|
|
|
address: $scope.subMerchantInfo.address,
|
|
|
|
|
business_type:$scope.subMerchantInfo.business_type
|
|
|
|
|
business_type: $scope.subMerchantInfo.business_type
|
|
|
|
|
};
|
|
|
|
|
if(params.business_type=='ONLINE'){
|
|
|
|
|
params.address=null;
|
|
|
|
|
if (params.business_type == 'ONLINE') {
|
|
|
|
|
params.address = null;
|
|
|
|
|
}
|
|
|
|
|
else if(params.business_type=='OFFLINE'){
|
|
|
|
|
params.company_website=null;
|
|
|
|
|
else if (params.business_type == 'OFFLINE') {
|
|
|
|
|
params.company_website = null;
|
|
|
|
|
}
|
|
|
|
|
if($scope.subMerchantInfo.merchant_type == 'ENTERPRISE'){
|
|
|
|
|
if ($scope.subMerchantInfo.merchant_type == 'ENTERPRISE') {
|
|
|
|
|
params.director_name = $scope.subMerchantInfo.director_name;
|
|
|
|
|
params.director_id_number = $scope.subMerchantInfo.director_id_number;
|
|
|
|
|
params.company_register_no = $scope.subMerchantInfo.company_register_no;
|
|
|
|
|
params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date;
|
|
|
|
|
if($scope.subMerchantInfo.certificat_expire_date) {
|
|
|
|
|
params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date)
|
|
|
|
|
if ($scope.subMerchantInfo.certificat_expire_date) {
|
|
|
|
|
params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date)
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
params.principal_name = $scope.subMerchantInfo.principal_name;
|
|
|
|
|
params.principal_id_number = $scope.subMerchantInfo.principal_id_number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/'+$scope.subMerchantInfo.merchant_app_id, params).then(function (resp) {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/' + $scope.subMerchantInfo.merchant_app_id, params).then(function (resp) {
|
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
|
$scope.$close();
|
|
|
|
|
commonDialog.confirm({title: 'Confirm', content: '微信商户进件已修改成功!'})
|
|
|
|
|
commonDialog.confirm({ title: 'Confirm', content: '微信商户进件已修改成功!' })
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
@ -7141,7 +7141,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
app.filter('wechatMcc',['wechatGoodMcc', function (wechatGoodMcc) {
|
|
|
|
|
app.filter('wechatMcc', ['wechatGoodMcc', function (wechatGoodMcc) {
|
|
|
|
|
return function (values) {
|
|
|
|
|
var industry = '';
|
|
|
|
|
angular.forEach(wechatGoodMcc.configs(), function (wxMerchant) {
|
|
|
|
@ -7186,22 +7186,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return value + (tail || ' …');
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
app.filter('dateConversionStr',function () {
|
|
|
|
|
app.filter('dateConversionStr', function () {
|
|
|
|
|
|
|
|
|
|
return function (date) {
|
|
|
|
|
var year = date.getFullYear(); //获取完整的年份(4位,1970-????)
|
|
|
|
|
var month =date.getMonth() + 1; //获取当前月份(0-11,0代表1月)
|
|
|
|
|
var day = date.getDate(); //获取当前日(1-31)
|
|
|
|
|
if (month < 10) {
|
|
|
|
|
month = "0" + month;
|
|
|
|
|
}
|
|
|
|
|
if (day < 10) {
|
|
|
|
|
day = "0" + day;
|
|
|
|
|
}
|
|
|
|
|
var dateString = year + "-" + month + "-" + day;
|
|
|
|
|
return dateString;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return function (date) {
|
|
|
|
|
var year = date.getFullYear(); //获取完整的年份(4位,1970-????)
|
|
|
|
|
var month = date.getMonth() + 1; //获取当前月份(0-11,0代表1月)
|
|
|
|
|
var day = date.getDate(); //获取当前日(1-31)
|
|
|
|
|
if (month < 10) {
|
|
|
|
|
month = "0" + month;
|
|
|
|
|
}
|
|
|
|
|
if (day < 10) {
|
|
|
|
|
day = "0" + day;
|
|
|
|
|
}
|
|
|
|
|
var dateString = year + "-" + month + "-" + day;
|
|
|
|
|
return dateString;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
return app;
|
|
|
|
|
});
|
|
|
|
|